이 글은 유튜브에 업로드된 강의 김성범[소장 / 인공지능 공학 연구소] 핵심 확률/통계를 보고 작성했다.
이전 장에 작성한 지수 분포와 푸아송 분포를 간단히 설명하면 다음과 같다.
Poisson Distribution, Exponential Distribution
푸아송 분포는 어떤 기간 내에 발생한 이벤트의 개수를 나타내는 확률 분포이다.
지수분포는 발생한 이벤트 간의 시간을 확률 분포를 나타낸다.
Chapter 05. Continuous Random Variable
Gamma Distribution[감마분포]
- 지수 분포의 일반화된 버전
확률 번수 $X$ : $k$개의 이벤트가 발생하기까지 걸리는 시간
$$f(x)=\begin{cases}\frac{\lambda^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\lambda x}&\quad \text{for }x>0 \\ 0& \quad \text{otherwise} \end{cases}$$
$$\text{Gamma function : } \Gamma(\alpha)=\int_0^\infty x^{\alpha-1}e^{-x}\,\mathrm{d}x $$
- Gamma function의 특징 :
$\Gamma(1)=1$, $\Gamma(1/2)=\sqrt{\pi}$,
$\Gamma(\alpha)=(\alpha -1)\Gamma(\alpha -1)$, For $\alpha>1$, if $n$ is a positive integer, $\Gamma(n)=(n-1)!$
- Gamma Distribution의 파라미터 $\alpha, \lambda$
$\alpha$ : Shape Parameter
$\lambda$ : Rate(Scale) Parameter
- 기댓값과 분산
$$E[X]=\frac{\alpha}{\lambda}, \quad V[X]=\frac{\alpha}{\lambda^2}$$
- 감마 분포의 특성
지수 분포의 일반화된 형태이다.
$$\text{Gamma}(1,\lambda)=\text{Exponential}(\lambda)$$
따라서, 확률변수 $X_1,X_2, \cdots, X_\alpha$가 지수분포를 따르고, $X_1 + X_2 + \cdots + X_\alpha = X$가 감마분포를 따른다.
즉, 하나의 이벤트가 아닌 $\alpha$개의 이벤트가 발생할 때 까지 시간을 의미한다.
Gamma Distribution Example)
낚시를 하고 있는데 물고기를 평균 30분에 한마리 씩 잡는다. 이 때 4마리를 2~4시간에 잡을 확률을 구하시오.
- $\lambda$ : 단위 시간당 이벤트 평균 개수. 시간당 두마리의 물고기.
- $\alpha$ : 4마리의 물고기
- $X$ : 물고기 4마리를 잡을 때 까지 소요된 시간
$$P(2\leq X \leq 4)=\int_2^4 \frac{2^4}{\Gamma(4)}x^3e^{-2x}dx=0.39$$
Beta Distribution[베타 분포]
비율을 나타낼 때 주로 사용하는 분포이다. 주로 불순률, 작동률, 결함률과 같은 상황에서 쓰인다.
베타분포의 확률 밀도 함수는 다음과 같다.
$$f(x)=\begin{cases}\frac{1}{B(\alpha, \beta)}x^{\alpha-1}(1-x)^{\beta-1}& \quad \text{for }0\leq x\leq 1 \\ 0 & \text{otherwise} \end{cases}$$
$$\text{Beta function : }B(\alpha, \beta)=\frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}=\int^1_0 x^{\alpha-1}(1-x)^{\beta-1} dx$$
- Beta function의 특징 :
$B(\alpha, \beta)=B(\beta, alpha), B(1,\beta)=\frac{1}{\beta}, B(\alpha+1, \beta)=\frac{\alpha}{\alpha+\beta}B(\alpha, \beta)$
- Beta Distribution의 파라미터
$\alpha=\beta$ 이면 대칭형으로 나타난다.
- 기댓값과 분산
$$E[X]=\frac{\alpha}{\alpha+\beta}, \quad V[X]=\frac{\alpha \beta}{(\alpha+\beta)^2(\alpha+\beta+1))}$$
Beta Distribution Example
DVDs 배송시 불량률에서 beta distribution의 파라미터 $\alpha=2, \beta=5$이다. 불량률이 평균 0.2~ 0.3이다.
- $X$ : 배송 시 발생하는 DVD 불량률
$$P(0.2\leq X\leq 0.3)=\int^{0.3}_{0.2}\frac{1}{B(2,5)}x(1-x)^4 dx = 0.235$$