Hello, guys! It’s me! Warotan!
So…Who are you?→ABOUT ME
This time let us calculate the expected value of the number of trials until it occors with probability \(p\)!
There are so many ways to do it, but here we use summation of inifinite series.
I write this article in case we need it but can’t remember and panic
I write similar articles and will add contents, so please read more other articles.
Summation of infinite geometric series
First, let us review the formula.
We set the geometric ratio \(r < 1\) for converge and consider the series
The answer is
Below are the specific calculation to find this, please skip it if you don’t need it.
Starting from the partial sum
and multiple \(r\) on it,
Subtract the lower one from the upper one, we get
Letting \(n \to \infty\), we finally reach the answer as \(r < 1\).
Expected value of the number of trials with probability \(p\)
The main part.
We consider an event with probability \(p\) and calculate the expected value of the trials until it occurs.
Setting the value \(E\), the answer is
We will derive this below.
The number can be from 1 time to \(\infty\) times.
According to the definition of an expected value, we can write \(E\) as
and dividing this into the part \(k = 1\) and others,
Rewriting the index of the second term from \(k \geq 2\) to \(k \geq 1\) and do some breaking up,
Here, the summation of the second term of the right hand side is exactly the same of the original form \(E\),
and the third one is just an infinite geometric series and easily calculated from the formula above,
Finally we get
and
However, it’s not so hard to see why.
I feel like an event with probability \(p = 1/n\) happen if we do it \(n\) times and \(p = 2/n\) needs \(n/2\) times.
Summary
Now, that’s all what I wanted to write.
This time, we calculated the expected value of the number of trials until it occurs with probability \(p\).
Thank you for reading and please spread this blog if you like.
If you have any comment, please let me know from the e-mail address below or the CONTACT on the menu bar.
tsunetthi(at)gmail.com
Please change (at) to @.
Or you can also contact me via twitter (@warotan3)