[170211 확률론] 3-5-2. 연속확률분포 - 카이제곱분포(정리 2, 3, 자유도 관련)
[170211 Probability Theory] 3-5-2. Continuous Probability Distribution - Chi-square Distribution(Theorem 2, 3 / Degree of Freedom)
<다시 한 번 올리는 정리샷. 이번에는 정리2와 정리3을 보자.>
Memo for Chi-square distribution again. We'll focus on theorem 2, 3 in this post.
<정리 2, 정리 3 증명 첫 시도. 정리 3은 증명에 실패했다.>
Proof of Theorem 2 and the first trial to prove Theorem 3. It has failed.
정리 2의 내용은 유한 개의 카이제곱분포 확률변수들의 합은 각각의 자유도를 모두 합한 값을 자유도로 가지는 카이제곱분포를 따른다는 것이다. 증명은 상당히 짧다. 자유도를 나타낸 문자 $n$과 구분하기 위해 확률변수를 n개 대신 $k$개 뽑았음.
정리 2의 증명 역시 적률생성함수로 접근했다. 확률변수들을 모두 합한 녀석에 대한 적률생성함수의 형태가 카이제곱분포의 형태다. 지수를 잘 보면 각 확률변수들이 따르는 카이제곱분포의 자유도가 모두 더해진 형태.
Theorem 2 shows the sum of $k$-random variables(each variable follows Chi-square distribution) follows Chi-square distribution with $\sum_{i=1}^k n_i$ degree of freedom, where $n_i$ is degree of freedom of $X_i$ for $i=1,2,\dots ,k$. I used $k$ as the number of random variables to distinguish n and $n$(degree of freedom).
For proof, I used MGF(Moment Generating Function) again. MGF of $\sum_{i=1}^k X_i$ forms Chi-square distribution's. Let's see exponent. It shows us the sum of each degree of freedom of $X_i$ became the degree of freedom of new Chi-square distribution.
정리 3의 내용은 정규분포 $N(\mu ,\sigma^2)$를 따르는 모집단에서 임의추출한 $k$개의 독립확률변수들의 표본분산 $s^2=\frac{1}{n-1}\sum_{i=1}^k (X_i-\bar{X})^2$에 대하여, $\frac{(n-1)s^2}{\sigma^2}$이 자유도 $(n-1)$인 카이제곱분포를 따른다는 것이다.
이번에도 냅다 적률생성함수로 시도했지만 결국 실패하고야 말았다. 그러면서 표본평균과 모평균의 차이 제곱이 분명 정확히 0이 되지는 않을 것 같다는 생각에 오른쪽 식을 유도해보았다. 다행히 2번만에 결과가 나와주었다.
이건 여담이지만, 카이제곱분포 관련 첫 포스팅에서 마지막 사진에 있던 오른쪽 위 빗금친 부분이 이걸 하다가 한 번 실패한 것.
Theorem 3 shows when we took $k$-random variables from population follows $N(\mu, \sigma^2)$ independently, for the Sample Variance $s^2=\frac{1}{n-1}\sum_{i=1}^k (X_i-\bar{X})^2$, $\frac{(n-1)s^2}{\sigma^2} \sim \chi^2(n-1)$.
I tried the proof with MGF again, but failed for this. But I thought there are some difference between population mean and sample mean, and I got right-side formula at 2nd trial.
In the last shot of the first post about Chi-square distribution, trial on upper right corner was the first trial for this.
<그래서, 다시 한 번 해보았습니다. 오랜만에 푸아송분포의 적률생성함수 등장!>
So I tried again. There's the MGF of Poisson distribution lol. long time no see!
차근차근 $X_i$와 그 표준화, 표준화의 제곱, 표본평균이 따르는 분포를 각각 정리해두고 이번엔 $\frac{(n-1)s^2}{\sigma^2}$ 자체를 분석, 앞에서 얻은 식을 대입하여 썩 괜찮은 성과를 얻었다.
여기에서, 분명 카이제곱분포의 확률변수끼리 더해지는 경우에는 자유도도 더해지지만 빼는 경우에는 자유도를 과연 뺄 수 있을까 하는 의문이 들었다.
뭐, 확인해보니 책에도 이렇게 증명하긴 하던데, 그럼 자유도가 0이나 음수가 안 되는 한도 내에서는 같이 빼진다는 얘기겠지.
이러고 대충 넘어가서 원하는 결과를 얻었다.
여기에 추가로, 책에서는 $\bar{X}$와 $s^2$이 서로 독립이라면서, 증명은 생략한다고 되어 있더라. 확률은 50 대 50이지만, 독립추출한 확률변수들에서 계산되어져 나오니 독립이지 않을까 생각하며 은근히 이 사실을 내면화시키는 조조하사였다.
At first I remarked each distributions that $X_i$, $\frac{X_i-\mu}{\sigma}$, $[\frac{X_i-\mu}{\sigma}]^2$, $\bar{X}$ follow. After that, I analysed $\frac{(n-1)s^2}{\sigma^2}$ directly. Additionally I got something nice by using previous formula about difference between $\bar{X}$ and $\mu$.
By previous theorem 2, when we do addition between random variables follow Chi-square distribution, their degrees of freedom are also added. But how about subtraction?
Well, because my book told me like that, maybe alright where not negative degree of freedom? lol
Then I got what I wanted.
Additionally, my book told that $\bar{X}$, $s^2$ are mutually independence without proof. Probability is 50% but I'll take it with the independence of each $X_i$
<자유도에 따른 카이제곱분포 확률밀도함수의 형태>
Graph of Chi-square Distribution's Probability density functions with 1~6 degrees of freedom.
www.desmos.com에서 $n$의 값을 1에서 6까지 바꿔가면서 함수식을 입력해봤다.
자유도가 높아지면 $x=0$ 근방에서의 값이 극도로 줄어들고, 대신 오른쪽으로 갈수록 점점 함숫값이 커지려 하는 움직임을 확인할 수 있었다.
http://www.desmos.com ← In here,
I put the probability density functions of Chi-square distribution with 1~6 degrees of freedom. As degree of freedom becomes larger, value of $f(x)$ becomes smaller extremely as $x \rightarrow 0$ and becomes larger as $x \rightarrow \infty$