โ€œํ™•๋ฅ ๊ณผ ํ†ต๊ณ„(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