Skip to content

Latest commit

ย 

History

History
257 lines (162 loc) ยท 10.2 KB

statistics-math-distribution.md

File metadata and controls

257 lines (162 loc) ยท 10.2 KB

๐Ÿ“ Table of Contents


#1

๋ฒ ๋ฅด๋ˆ„์ด ๋ถ„ํฌ

์šฐ์„  ๋ฒ ๋ฅด๋ˆ„์ด ์‹œํ–‰์ด๋ž€ ๊ฒฐ๊ณผ๊ฐ€ ๋‘ ๊ฐ€์ง€ ์ค‘ ํ•˜๋‚˜๋งŒ ๋‚˜์˜ค๋Š” ๊ฒƒ์„ ๋งํ•œ๋‹ค. ๋ฒ ๋ฅด๋ˆ„์ด ํ™•๋ฅ ๋ณ€์ˆ˜๋Š” ์‹œํ–‰๊ฒฐ๊ณผ๊ฐ€ $0$ ๋˜๋Š” $1$์ด ๋‚˜์˜ค๋ฏ€๋กœ ์ด์‚ฐํ™•๋ฅ ๋ณ€์ˆ˜์ด๋‹ค.

  • pmf : $Bern(x;\theta) = \theta^x(1-\theta)^{1-x}$
  • expectation : $E[X] = \theta$
  • variance : $Var[X] = \theta ( 1-\theta)$

References


#2

์ดํ•ญ ๋ถ„ํฌ

๋ฒ ๋ฅด๋ˆ„์ด ์‹œํ–‰์„ $N$๋ฒˆ ์‹œํ–‰ํ•œ ๊ฒƒ์„ ๋งํ•œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ๋™์ „ ๋˜์ง€๊ธฐ๋ฅผ 10๋ฒˆ ๋˜์ ธ์„œ ์•ž๋ฉด์ด ๋‚˜์˜จ ํšŸ์ˆ˜๋ฅผ ํ™•๋ฅ  ๋ณ€์ˆ˜๋กœ ๋‘”๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์‹œํ–‰ ๊ฒฐ๊ณผ๊ฐ€ ํšŸ์ˆ˜๋กœ ๋‚˜์˜ค๋ฏ€๋กœ ์ด์‚ฐํ™•๋ฅ ๋ณ€์ˆ˜์ด๋‹ค.

  • pmf : $Bin(x;N, \theta) = \binom{N}{x} \theta^N (1-\theta)^{N-x}$
  • expectation : $E[X] = N\theta$
  • variance : $Var[X] = N\theta ( 1-\theta)$

References


#3

์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ

์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ(Categorical distribution)๋Š” ๋ฒ ๋ฅด๋ˆ„์ด ๋ถ„ํฌ๋ฅผ ํ™•์žฅํ•œ ๊ฐœ๋…์ด๋‹ค. ์ฆ‰ ์นดํ…Œ๊ณ ๋ฆฌ ์‹œํ–‰(์—ฌ๋Ÿฌ๊ฐœ์˜ ์นดํ…Œ๊ณ ๋ฆฌ ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•˜๋Š” ์‹คํ—˜)์˜ ๊ฒฐ๊ณผ๋Š” ์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๊ฒŒ ๋œ๋‹ค. ์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ๋ฅผ ๋ˆ„์ ํ•˜๋ฉด ๋‹คํ•ญ๋ถ„ํฌ๋ฅผ ์–ป๊ฒŒ ๋œ๋‹ค.

์นดํ…Œ๊ณ ๋ฆฌ ํ™•๋ฅ ๋ณ€์ˆ˜๋Š” one-hot vector๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ์ฃผ์‚ฌ์œ„์˜ ๊ฒฝ์šฐ $K = 6$์ธ ์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅธ๋‹ค๊ณ  ํ‘œ๊ธฐํ•  ์ˆ˜ ์žˆ๋‹ค. ๋ˆˆ์ด 2์ธ ์ฃผ์‚ฌ์œ„๋ฉด์ด ๋‚˜์™”๋‹ค๊ณ  ํ• ๋•Œ, ์ด๋•Œ ์นดํ…Œ๊ณ ๋ฆฌ $RV = [0 , 1, 0, 0, 0, 0]$์ด ๋œ๋‹ค. $RV$์•ˆ์˜ ๊ฐ ์›์†Œ๋“ค์€ ๋ฒ ๋ฅด๋ˆ„์ด ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๊ณ , ๊ฐ๊ฐ ์ž์‹ ๋“ค๋งŒ์˜ ๋ชจ์ˆ˜๋ฅผ ๊ฐ–๋Š”๋‹ค. (RV = Random Variable = ํ™•๋ฅ ๋ณ€์ˆ˜)

์นดํ…Œ๊ณ ๋ฆฌ๊ฐ€ $K$๊ฐœ์ผ ๋•Œ, ์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ์˜ ํ™•๋ฅ ์งˆ๋Ÿ‰ํ•จ์ˆ˜๋Š” ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

$$ \text{Cat}(x; \mu) = \begin{cases} \mu_1 & \text{if } x = (1, 0, 0, \dots, 0) \\ \mu_2 & \text{if } x = (0, 1, 0, \dots, 0) \\ \mu_3 & \text{if } x = (0, 0, 1, \dots, 0) \\ \vdots & \vdots \\ \mu_K & \text{if } x = (0, 0, 0, \dots, 1) \end{cases} $$

$$\text{Cat}(x; \mu) = \mu_1^{x_1} \mu_2^{x_2} \cdots \mu_K^{x^K} = \prod_{k = 1}^{K} \mu_k^{x^k}$$

References


#4

๋‹คํ•ญ ๋ถ„ํฌ

์„ฑ๊ณตํ™•๋ฅ ์ด $\theta$์ธ ๋ฒ ๋ฅด๋ˆ„์ด ์‹œํ–‰์„ n๋ฒˆ ๋ฐ˜๋ณตํ–ˆ์„ ๋•Œ์˜ ์„ฑ๊ณตํšŸ์ˆ˜๊ฐ€ ์ดํ•ญ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๋Š” ๊ฒƒ์ฒ˜๋Ÿผ, ์„ฑ๊ณตํ™•๋ฅ ์ด $\theta=(\theta_1 ... \theta_k)$์ธ ์นดํ…Œ๊ณ ๋ฆฌ ์‹œํ–‰์„ $n$๋ฒˆ ๋ฐ˜๋ณตํ–ˆ์„ ๋•Œ์˜ ๊ฐ ์นดํ…Œ๊ณ ๋ฆฌ๋ณ„ ์„ฑ๊ณตํšŸ์ˆ˜๋Š” ๋‹คํ•ญ๋ถ„ํฌ(Multinomial distribution)์„ ๋”ฐ๋ฅด๊ฒŒ ๋œ๋‹ค.

$$ \left( \begin{matrix} \text{๋ฒ ๋ฅด๋ˆ„์ด ๋ถ„ํฌ} \\ \downarrow \\ \text{์ดํ•ญ ๋ถ„ํฌ} \end{matrix} \right) \approx \left( \begin{matrix} \text{์นดํ…Œ๊ณ ๋ฆฌ ๋ถ„ํฌ} \\ \downarrow \\ \text{๋‹คํ•ญ ๋ถ„ํฌ} \end{matrix} \right) $$

๋‹คํ•ญ๋ถ„ํฌ์˜ ์ˆ˜์‹์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

$$ \text{Mu}(x; N, \mu) = \binom{N}{x} \prod_{k=1}^{K} \mu_k^{x_k} = \binom{N}{x_1, \cdots, x_K} \prod_{k=1}^{K} \mu_k^{x_k} $$

์˜ˆ๋ฅผ๋“ค์–ด, ์ฃผ์‚ฌ์œ„๋ฅผ 10๋ฒˆ ๋˜์กŒ์„ ๋•Œ, 1์ด 1๋ฒˆ, 2๊ฐ€ 2๋ฒˆ, 3์ด 1๋ฒˆ, 4๊ฐ€2๋ฒˆ, 5๊ฐ€ 3๋ฒˆ, 6์ด 1๋ฒˆ ๋‚˜์˜ค๋Š” ํ™•๋ฅ ์„ ๊ณ„์‚ฐํ•˜๊ณ ์ž ํ•œ๋‹ค. ์ด๋ฅผ ๋ฒกํ„ฐ๋กœ ๋‚˜ํƒ€๋‚ด๋ฉด $(1, 2, 1, 2, 3, 1)$์ด ๋œ๋‹ค. 6๋ฒˆ์„ ๋˜์กŒ์„ ๋•Œ $x$ ๋ฒกํ„ฐ์ฒ˜๋Ÿผ ๋‚˜์˜ฌ ์กฐํ•ฉ์„ ๊ณ„์‚ฐํ•ด์•ผํ•˜๋ฉฐ, ์ˆ˜์‹์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

$$\binom{N}{x_{1}, \cdots , x_{K}} = \frac{N!}{x_{1}!, \cdots, x_{K}!} $$

References


#5

๊ฐ€์šฐ์‹œ์•ˆ ์ •๊ทœ ๋ถ„ํฌ

ํ‰๊ท ์„ ์ค‘์‹ฌ์œผ๋กœ ์ขŒ์šฐ๊ฐ€ ๋Œ€์นญ์ธ ์ข… ๋ชจ์–‘์„ ๊ทธ๋ฆฌ๋Š” ์ •๊ทœ๋ถ„ํฌ์ด๋‹ค. ์ •๊ทœ ๋ถ„ํฌ์˜ ํ™•๋ฅ  ๋ฐ€๋„ ํ•จ์ˆ˜์™€ ๊ทธ ๊ทธ๋ž˜ํ”„๋Š” ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

$$ f(x) = \frac{1}{\sigma\sqrt{2\pi}} exp(- \frac{(x - \mu)^2}{2 \sigma^2}), -\infty < x < \infty, -\infty < \mu < \infty, \sigma > 0 $$

์ •๊ทœ ๋ถ„ํฌ ์‹์—์„œ ๋ณ€์ˆ˜๋Š” $x$์ด๋‹ค. $\sigma$์™€ $\mu$๋Š” ๊ทธ๋ž˜ํ”„๋ฅผ ์ข…๋ชจ์–‘์œผ๋กœ ๋งŒ๋“œ๋Š”๋ฐ ์‚ฌ์šฉ๋œ๋‹ค. $\mu$๋Š” ํ™•๋ฅ  ๋ณ€์ˆ˜ $X$์˜ ํ‰๊ท ์ด๊ณ  $\mu$๋Š”ํ™•๋ฅ  ๋ณ€์ˆ˜ $X$์˜ ํ‘œ์ค€ ํŽธ์ฐจ์ด๋‹ค. ์ข… ๋ชจ์–‘์˜ ๊ทธ๋ž˜ํ”„๋Š” ํ‰๊ท ์„ ๊ธฐ์ค€์œผ๋กœ ์ขŒ์šฐ ๋Œ€์นญ์„ ์ด๋ฃฌ๋‹ค. ํ‘œ์ค€ ํŽธ์ฐจ๊ฐ€ ๋†’์„ ์ˆ˜๋ก ๊ทธ๋ž˜ํ”„๋Š” ์™„๋งŒํ•œ ๊ณก์„  ํ˜•ํƒœ๋ฅผ ๋„๊ฒŒ ๋œ๋‹ค.

References


#6

t ๋ถ„ํฌ

t ๋ถ„ํฌ๋Š” ์ •๊ทœ๋ถ„ํฌ์™€ ๊ฐ™์ด ์ค‘์‹ฌ์„ ๊ธฐ์ค€์œผ๋กœ ์ขŒ์šฐ ๋Œ€์นญ์ด๊ณ  ์ข…๋ชจ์–‘ ํ˜•ํƒœ๋ฅผ ๊ฐ–๊ณ  ์ค‘์‹ฌ์€ 0์œผ๋กœ ๊ณ ์ •๋˜์–ด ์žˆ๋Š” ๋ถ„ํฌ์ด๋‹ค.

์ž์œ ๋„(degree of freedom, df)์— ๋”ฐ๋ผ ์ข…์˜ ํ˜•ํƒœ๊ฐ€ ์กฐ๊ธˆ์”ฉ ๋ณ€ํ™”ํ•œ๋‹ค.

df๋Š” ํ‘œ๋ณธ์ˆ˜์™€ ๊ด€๋ จ์ด ์žˆ๋Š” ๊ฐœ๋…์œผ๋กœ, ํ‘œ๋ณธ์ด ๋งŽ์•„์ง€๋ฉด ํ‘œ์ค€์ •๊ทœ๋ถ„ํฌ์™€ ๊ฑฐ์˜ ๋™์ผํ•œ ํ˜•ํƒœ๋ฅผ ๋ณด์ธ๋‹ค.

$Y \sim t(n)$์ด๋ฉด,

$$ f(y) = \frac{\Gamma\left(\frac{n+1}{2}\right)}{\Gamma\left(\frac{n}{2}\right)\cdot\sqrt{\pi n}}\cdot\left(\frac{n}{y^2+n}\right)^{\frac{n+1}{2}},\quad-\infty < y < \infty $$

$$ E[Y] = 0 \quad Var[Y] = \frac{n}{n-2} $$

๊ฐ๋งˆ ํ•จ์ˆ˜

$$ \Gamma(x) = \int_{0}^{\infty}u^{x-1}e^{-u}du $$

References


#7

์นด์ด์ œ๊ณฑ ๋ถ„ํฌ

์ •๊ทœ ๋ถ„ํฌ์˜ ์ œ๊ณฑํ•ฉ์€ $\chi^2$ ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅธ๋‹ค.

$$ Z \sim N(0, 1) \quad \Rightarrow \quad Z^2 \sim \chi^2(df=1) \quad \Rightarrow \quad \sum_{i=1}^{n}Z^2_i \sim \chi^2(df=n) $$

References


#8

F ๋ถ„ํฌ

F ๋ถ„ํฌ๋Š” ๋…๋ฆฝ์ ์ธ $\chi^2$ ๋ณ€์ˆ˜์˜ ๋น„๊ฐ€ ๋”ฐ๋ฅด๋Š” ๋ถ„ํฌ์ด๋‹ค.

$$ Q_1 \sim \chi^2(n_1), \quad Q_2 \sim \chi^2(n_2) \quad \Rightarrow \quad \frac{Q_1/n_1}{Q_2/n_2} \sim F(n_1, n_2) $$

References


#9

๊ฐ๋งˆ ๋ถ„ํฌ

๊ฐ๋งˆ ๋ถ„ํฌ๋Š” ๊ฐ๋งˆ ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์ฒด k๋ฒˆ์˜ ์‚ฌ๊ฑด์ด ์ผ์–ด๋‚  ๋•Œ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„์„ ๋‚˜ํƒ€๋‚ด๋Š” ์—ฐ์† ํ™•๋ฅ ๋ถ„ํฌ์ด๋‹ค.

$\theta$์™€ $k$๋Š” ๊ฐ๋งˆ ๋ถ„ํฌ์˜ ๋ชจ์ˆ˜์ด๋‹ค.

๊ฐ๋งˆ ๋ถ„ํฌ๋Š” $0 \sim \infty$๊นŒ์ง€ ๊ฐ’์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์œผ๋ฉฐ ๋ชจ์ˆ˜์˜ ๋ฒ ์ด์ง€์•ˆ ์ถ”์ •์„ ์œ„ํ•ด ์‚ฌ์šฉ๋œ๋‹ค.

$$ f(x, k, \theta) = x^{k-1}\frac{e^{-x / \theta}}{\theta^k \Gamma (k)} \quad \text{for x > 0} $$

๊ฐ๋งˆ ํ•จ์ˆ˜
ํŒฉํ† ๋ฆฌ์–ผ์„ ํ•จ์ˆ˜๋กœ ์ผ๋ฐ˜ํ™”ํ•œ ๊ฒƒ

$$ \Gamma (z) = \int_0^\infty t^{z-1} e^{-t} dt \ (\Re \ z > 0) $$

$$ \Gamma (n) = (n - 1)! $$

References


#10

๋ฒ ํƒ€ ๋ถ„ํฌ

๋ฒ ํƒ€ ๋ถ„ํฌ๋Š” ๋‘ ๋ชจ์ˆ˜ $a$, $b$ ์— ๋Œ€ํ•œ ๋ฒ ํƒ€ ํ•จ์ˆ˜๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์—ฐ์†ํ™•๋ฅ ๋ถ„ํฌ์ด๋‹ค.

๋ฒ ํƒ€ ํ•จ์ˆ˜๋Š” ์ดํ•ญ ๊ณ„์ˆ˜(์กฐํ•ฉ, combination ์œผ๋กœ๋„ ๋ถˆ๋ฆผ) ๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ํ•จ์ˆ˜์ธ๋ฐ, ์ดํ•ญ ๊ณ„์ˆ˜๋Š” ํŒฉํ† ๋ฆฌ์–ผ๋กœ ์ด๋ฃจ์–ด์ ธ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฒ ํƒ€ ํ•จ์ˆ˜๋Š” ๊ฐ๋งˆ ํ•จ์ˆ˜๋กœ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

๋ฒ ํƒ€ ๋ถ„ํฌ์˜ ๊ฐ’์€ $0 \sim 1$์‚ฌ์ด์ด๋ฉฐ ๊ฐ๋งˆ ๋ถ„ํฌ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋ฒ ์ด์ง€์•ˆ ์ถ”์ •์„ ์œ„ํ•ด ์‚ฌ์šฉ๋œ๋‹ค.

$$ Beta(x; a, b) = \frac{\Gamma(\alpha + \beta )}{\Gamma ( \alpha ) \Gamma ( \beta )} x^{\alpha - 1} (1 - x)^{\beta - 1} $$

References