00:01
For convenience, let's use x to represent the random variable or to represent the event of the number of leaps until the k is half.
00:27
So now we want to consider the distribution of x.
00:32
First, it's very easy to notice for any j which is greater or equal to 0 and less than k, the probability x equal to j, this probability is equal to 0.
00:50
Because we cannot get k halves if the number of leaps is strictly less than k.
01:01
Now let's consider the probability of x is equal to k.
01:15
That means the probability of for us to get k halves in k flips.
01:22
So this is equal to p to the power k because in every flip we always get a half.
01:34
Now let's consider the probability of x is equal to k plus 1.
01:42
That means we get one half at the k plus 1 flip and k minus half in the first k flip.
02:21
As we get one half at the k plus 1 flip, we have fixed p here and we get k minus one half in the first k flip.
02:35
So we have p to the k minus 1 times 1 over p, 1 minus p.
02:45
1 minus p means we will get 1.
02:51
In one of those flips, we don't get the half.
03:00
How many ways can we finish this process? we have k choosing k minus 1 choices.
03:22
Okay, now let's consider the probability of x is equal to k plus 2.
03:31
For this process, we know this is the same if we change k plus 1 to k plus 2.
03:42
Now we have k plus 2 flips.
03:45
We want to get one half at the last flip, which is the k plus 2 flip.
03:53
We get k minus one half in the first.
03:56
Now we have k plus 1 flips.
04:00
Okay, so it is equal to p times the same thing, p minus 1.
04:08
However, now we should raise 1 minus p to the power 2 because at two flips, we don't get the half.
04:29
Okay, repeat this process by the same logic.
04:33
We know actually for any j which is greater or equal to zero, we have x is equal to k plus j.
04:44
The probability of this thing is equal to p to the power k times 1 minus p to the power k plus j minus k minus 1 times k plus j minus 1 choose k minus 1.
05:11
Okay, we can repeat this process or just by doing the induction.
05:17
Simplify this, we get p to the power k times 1 minus p times j plus 1 k plus j minus 1 choose k minus 1.
05:35
Okay, this is the distribution for x.
05:41
Here, it should be k plus j minus 1 minus k minus 1.
05:47
Okay, so we have to subtract 1 here.
05:50
That means our distribution is actually equal to this term.
06:00
Okay, so what about the expectation of x? by the definition, expectation of x is equal to n goes from 0 to positive n times the probability of x is equal to n.
06:17
Because our random variable is a discrete random variable.
06:22
Okay, by our discussion, we know it is equal to k.
06:28
N goes from k to positive infinity n times the probability of x is equal to n.
06:37
Because when n is less than k, then the probability is equal to 0.
06:44
So it can be written as j goes from 0 to positive infinity n plus j times k plus j times the probability of x is equal to k plus j.
07:05
That means use the expression here.
07:11
It is equal to the summation of j goes from 0 to positive infinity k plus j times p to the power k times 1 minus p to the power j.
07:23
Here, we want to write it in the fractional form.
07:31
K plus j minus 1 the factorial of k plus j minus 1 divided by the factorial of k minus 1 times the factorial of j...