조조하사의 Gaming Nexus☆

[170208 Probability Theory] 2-4. Discrete Probability Disribution - Geometric Distribution / Negative Binomial Distribution


<기하분포/음이항분포에 대해 정리한 노트!>
My note for Geometric/Negative Binomial Distribution.

기하분포, 음이항분포는 각각 베르누이분포, 이항분포의 역분포 버젼으로 생각하면 될 듯.
베르누이분포/이항분포가 n번 시행해서 x번 성공할 확률을 구하는 이산확률분포였다면,
기하분포/음이항분포는 r번 성공했을 때 x번 시행했을 확률을 구하는 이산확률분포.

카드게임을 예로 들면, 뽑기 확률 4%인 레어카드를 정확히 5번째에 뽑을 확률을 이야기하는 것.
(뽑기 확률 4%인 레어카드를 5번 안에 뽑을 확률은 분포함숫값을 구하면 된다. 즉  이 된다는 것이며, 레어카드는 1번만 뽑으면 되니까 이는 기하분포 문제에 해당한다. r=1임을 확인하자.)

기하분포/음이항분포의 확률질량함수에 대한 설명은 보라색으로 잘 쓰여져 있으니 과감히 패스. 보통 맨 앞에 C를 쓰지만 펜으로 쓰다보니 고칠수가 없어 맨 뒤로 배치 ㅋㅋ

Geometric/Negative Binomial Distribution are each reverse version of Bernoulli/Binomial Distribution.
Bernoulli/Binomial Distribution are focusing on the number of success based on the number of trial. But Geometric/Negative Binomial Distribution are focusing on the number of trial based on the number of success.

For example, in game, there is a rare card with its get probability 4%. How much probability you can get it on 5th trial?
(If you want to calculate 'how much probability you can get it at most 5th trial?', then you need to know the (Cumulation) Distribution function. you can calculate with this formula : )

It is a problem using Geometric Distribution because generally we assume that two or more same cards are unnecessary. Check r=1.

Explanation is enough with the purple-color note if you can read Korean or open your Probability Theory book :)
I wrote the sign of combination on right corner but generally it'll be on left.

My pen says " Sorry :( "


<기하분포의 평균은 음이항분포의 평균에 r=1을 대입하면 되니 음이항분포의 평균을 구하자.>
Let's see the Expectation of Negative Binomial Distribution because Geometric's is r=1 of this conclusion.

당연한 얘기지만, 확률합은 1이다.
이번에는 조합 왼쪽에 x-1이 있기 때문에 앞에 있는 x를 자연스럽게 넣어주면 된다. 분포의 r-1도 r로 바꿔주려면 다음 식과 같이 r을 곱해줘야 하지만 간단한 이야기니 스트레스 받을 게 없음.

x와 r을 x+1, r+1로 바꿔주기 위함이므로 p의 지수 역시 바꿔줘야 한다. 대응값으로 p를 나눠주자.
그런 뒤 확률합이 1이라는 것만 알면 시그마 안쪽이 시도 횟수 x+1, 성공 횟수 r+1인 음이항분포이므로 자연스럽게 기댓값이 도출된다. 굳

1회 시행 시의 평균은 자연스럽게, 확률값의 역수만큼 시도하면 1번쯤 얻을 수 있지 않을까 하는 생각을 해볼 수 있다.(p의 역수가 자연수가 아닐 수 있음에 주의.)

Of couse, summation of all probability is 1
In this time, we have x-1 on the left side of C. So the door is open. For change r to r+1, we have to multiply r.

Since we changed x and r to x-1 and r-1, we need to change the exponent of p. For that thing, divide p.
Now that is the summation of a negative binomial distribution with the number of trial : x+1, the number of success : r+1. We can get the expectation r/p.

For 1-time trial, the expectation is expectable(lol) naturally. When p is the success probability, then we'll say, 'just try for 1/p-times or more.(inverse of p won't be always natural number.)'


<이번에는 음이항분포의 분산을 구하는 과정.>
Now we'll see the Variance of Negative Binomial Distribution.

X표시는 ...나도 인간인지라 헤헤. 1/p를 밖으로 꺼낸걸 까먹고 적다가 고침.
마찬가지로 (변량 제곱의 평균) - (평균의 제곱) = (분산) 식을 쓰려고 한다. 첫 부분은 기댓값 구할 때와 비슷함.

그리고 다시 한 번 등장하는 기법, x=(x+1)-1. 저걸로 로 한 번 더 끌어올릴 수 있다.

헷갈리지만 않으면, 변량 제곱의 평균은 간단히 구할 수 있다. 그리고 그걸 성공했다면 분산도...

X signs are... humanity lol. Sorry 1/p.
By same method, we will use this : . Start is quite similar to expectation's calculation.

Again, here is x=(x+1)-1. With this idea, we can pick  up to .

Without mistake, we can get the expectation of square of variable quantities. And then we can also get Variance!


<적률생성함수와 이를 이용한 기댓값, 분산 구하기>
Moment Generating Function(MGF) and Expectation, Variance using MGF.

적률생성함수 구하는데 조금 애를 먹었다. 일단 값은 구했는데,
e의 t제곱을 (1-p)에 곱하면 1보다 커지지 않나 걱정했기 때문. 책을 슬쩍 보니까 그렇게 안 되도록 t가 -ln(1-p)보다 작다는 조건을 붙여놓더라. 그래서 오른쪽에 괄호를 슬쩍 추가해놓았다. 헷

푸아송분포때도 그렇고 적률생성함수 구하기는 기댓값, 분산 구하기와는 느낌이 하나씩 다른듯. 게다가 이건 미분도 상당히 복잡해 보인다. 미분계산에 자신이 없다면 그냥 음이항분포 기댓값, 분산 구하기는 정의를 따라가는게 좋아 보임.

I am wondered about the MGF of negative binomial distribution. After calculation, I worried about a case >1. In my book, this case is cleared with additional condition . So I wrote about that.(in right corner :D)

I guessed that MGF calculation has a difference with calculation of expectation and variance since Poisson Distribution. Additionally, MGF of Negative binomial Distribution is quite hard to differentiate. If you have no confidence with differentiation, find expectation and variance with definition rather than MGF.


이걸로 이산확률분포 이야기는 끝이 난다.
이제 연속확률분포 6가지를 해야 하는데, 카이제곱분포나 t-분포는 아직 머릿속에 있는게 없어서 힘들어보인다. 크흠흠.

추정에서 자주 나올만한게 정규분포랑 얘네같은데, 약간 걱정되긴 하지만 금방 뭐 잘 되겠지 헷헷

Now discrete probability distribution is over.
Since next posting we'll see about 6 continuous probability distributions but Chi-sqaure Distribution and t-Distribution seem hard.

I guess estimation part has many problems about them and Normal Distribution. I'm worried little bit but it'll be OK, right? :)