β€œν™•λ₯ κ³Ό 톡계(MATH230)” μˆ˜μ—…μ—μ„œ 배운 것과 κ³΅λΆ€ν•œ 것을 μ •λ¦¬ν•œ ν¬μŠ€νŠΈμž…λ‹ˆλ‹€. 전체 ν¬μŠ€νŠΈλŠ” Probability and Statisticsμ—μ„œ ν™•μΈν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€ 🎲

4 minute read

β€œν™•λ₯ κ³Ό 톡계(MATH230)” μˆ˜μ—…μ—μ„œ 배운 것과 κ³΅λΆ€ν•œ 것을 μ •λ¦¬ν•œ ν¬μŠ€νŠΈμž…λ‹ˆλ‹€. 전체 ν¬μŠ€νŠΈλŠ” Probability and Statisticsμ—μ„œ ν™•μΈν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€ 🎲

Introduction

<MLE; Maximum Likelihood Estimation>은 μ§€κΈˆκΉŒμ§€μ˜ μ ‘κ·Όλ²•κ³ΌλŠ” 사뭇 λ‹€λ₯Έ μ ‘κ·Ό 방식이닀. <MLE>λŠ” statistical inferenceλ₯Ό μˆ˜ν–‰ν•˜λŠ” λ§Žμ€ 접근법 쀑 ν•˜λ‚˜λ‘œ, statistical approach에 μƒˆλ‘œμš΄ μ² ν•™κ³Ό μ‹œμ•Όλ₯Ό μ œκ³΅ν•œλ‹€ 😁


Example.

ν™•λ₯  $p$λ₯Ό μ •ν™•νžˆ μ•Œμ§€ λͺ»ν•˜λŠ” p-coin을 10번 λ˜μ§„λ‹€κ³  ν•˜μž. 10번의 κ²°κ³ΌλŠ” μ•„λž˜μ™€ κ°™λ‹€.

H H T H T T H H H T

μ•žμ—μ„œ 배운 <proportion estimation>의 λ°©λ²•μœΌλ‘œ μ ‘κ·Όν•˜λ©΄, $p$λŠ” Point Estimator $\hat{p} = 6/10$으둜 μΆ”μ •λœλ‹€.


μ΄λ²ˆμ—λŠ” <MLE>의 λ°©μ‹μœΌλ‘œ μ ‘κ·Όν•΄λ³΄μž! λ¨Όμ € 10의 동전 λ˜μ§€κΈ°κ°€ μœ„μ™€ 같이 λ‚˜μ˜¬ ν™•λ₯ μ€ μ•„λž˜μ™€ κ°™λ‹€.

\[P(H, H, T, \dots, H, T) = p^6 q^4\]

μœ„μ˜ 식을 λ‹€μ‹œ μ“°λ©΄, $L(p) = p^6 (1-p)^4$둜, λ™μ „μ˜ ν™•λ₯ μ΄ $p$일 λ•Œ β€œH H … H Tβ€μ˜ κ²°κ³Όλ₯Ό 얻을 ν™•λ₯ μ„ μ˜λ―Έν•œλ‹€.

이제, 이 ν•¨μˆ˜ $L(p)$λ₯Ό maximize ν•˜λŠ” $p$λ₯Ό κ΅¬ν•΄λ³΄μž. 방법은 κ°„λ‹¨ν•˜λ‹€. κ·Έλƒ₯ $p$에 λŒ€ν•΄ 미뢄방정식을 ν’€λ©΄ λœλ‹€. μ΄λ•Œ, κ³„μ‚°μ˜ 편의λ₯Ό μœ„ν•΄ $\log$λ₯Ό λ¨Όμ € μ·¨ν•΄μ£Όμž.

\[\ell(p) = \log (L(p)) = 6 \log p + 4 \log (1-p)\] \[\frac{d\ell(p)}{dp} = \frac{6}{p} - \frac{4}{1-p} = 0 \quad \rightarrow \quad p = 6/10\]

즉, $p=6/10$이 β€œH H … H Tβ€λΌλŠ” κ²°κ³Όκ°€ λ‚˜μ˜¬ ν™•λ₯ μ„ Maximizeν•˜λŠ” ν™•λ₯ μ΄λΌλŠ” 말이닀!

이제 <MLE>λ₯Ό μˆ˜ν•™μ μœΌλ‘œ 정리해 λ‹€μ‹œ μ‚΄νŽ΄λ³΄μž!


MLE; Maximum Likelihood Estimation

Theorem. MLE for Bernoulli case

Let $X_1, \dots, X_n$ be a $\text{Ber}(p)$ Random Samples, with iid.

Then, the likelihood function $L(p; x_1, \dots, x_n)$ would be

\[\begin{aligned} L(p;\, x_1, \dots, x_n) &= f(x_1;\, p) \cdots f(x_n;\, p) \\ &= p^{x_1} (1-p)^{1-x_1} \cdots p^{x_n} (1-p)^{1-x_n} \\ &= p^{\sum x_i} (1-p)^{n - \sum x_i} \end{aligned}\]

Take log on it!

\[\begin{aligned} \ell(p) = \sum x_i \cdot \log p + (n - \sum x_i) \cdot \log (1-p) \end{aligned}\]

Take derivative for $p$!

\[\frac{d\ell(p)}{dp} = \frac{\sum x_i}{p} - \frac{n-\sum x_i}{1-p} = 0\]

when solve the equation, then

\[p = \frac{\sum x_i}{n} = \bar{x}\]

Theorem. MLE for Normal case

Let $X_1, \dots, X_n$ be a $N(\mu, 1)$ Random Samples, with iid.

Find the MLE of $\mu$!

\[\begin{aligned} L(\mu; \, x_1, \dots, x_n) &= f(x_1; \, \mu) \cdots f(x_n; \, \mu) \\ &= \left( \frac{1}{\sqrt{2\pi}}\right)^n \exp \left( - \sum \, (x_i - \mu)^2 / \, 2 \right) \end{aligned}\]

Take log on it!

\[\ell(\mu; \, \cdots) = n \cdot \log \left( \frac{1}{\sqrt{2\pi}}\right) - \frac{\sum \, (x_i - \mu)^2}{2}\]

Take derivative for $\mu$!

\[\frac{d\ell}{d\mu} = \sum (x_i - \mu) = 0\]

when solve the equation, then

\[\mu = \bar{x}\]

이제 λ‹€μŒ ν¬μŠ€νŠΈλΆ€ν„° ν†΅κ³„ν•™μ˜ κ½ƒπŸŒΉμ΄λΌκ³  ν•  수 μžˆλŠ” <κ°€μ„€ κ²€μ •; Hypothesis Tests>에 λŒ€ν•΄ 닀룬닀!! 😁 μš°λ¦¬κ°€ μ§€κΈˆκΉŒμ§€ μˆ˜ν–‰ν•œ β€œμΆ”μ •(Estimation)”을 ν™œμš©ν•΄ μ˜μ‚¬κ²°μ •μ„ λ‚΄λ¦¬λŠ” 것이 λ°”λ‘œ <Hypothesis Test>λ‹€!

πŸ‘‰ Introduction to Hypothesis Tests