I was given the following problem:
Given:
For the r.v $\displaystyle F=number\ of\ failures\ before\ first\ success$.
$\displaystyle E[ F] \ =\ \frac{1-p}{p}$ and $\displaystyle Var[ F] \ =\ \frac{1-p}{p^{2}}$.
Let's now define $\displaystyle X=number\ of\ failure\ before\ r^{th} \ success$, calculate the $\displaystyle E[ X] ,\ Var[ X]$.
My solution was:
Let's notice that if $\displaystyle X=the\ number\ of\ failures\ till\ r^{th} \ success$, then we can define it using the previous question. We have $\displaystyle r$ successes, each success has an $\displaystyle i$ number of falilures before it, for $\displaystyle 0\leqslant i\leqslant k$.
So we can define:
$\displaystyle X\ =F_{1} +F_{2} +F_{3} +...+F_{r}$.
Where each $\displaystyle F_{i} =the\ number\ of\ failures\ after\ the\ ( i-1)^{th} \ success\ and\ before\ the\ i^{th} \ success$.
For example:
$\displaystyle F_{1}$ will be the number of failures before the $\displaystyle 1^{st}$ success.
$\displaystyle F_{2}$ will be the number of failure between the $\displaystyle 1^{st}$ and $\displaystyle 2^{nd}$ success.
$\displaystyle F_{3}$ will be the number of failure between the $\displaystyle 2^{nd}$ and $\displaystyle 3^{rd}$ success.
etc.
Note that each $\displaystyle F_{i}$ is simply the number of failures before some first success, meaning, it is exactly the random variable $\displaystyle F$ we were given.
Expectation:
$\displaystyle E[ X] =E[ F_{1} +F_{2} +F_{3} +...+F_{r}] =E[ F_{1}] +[ F_{2}] +[ F_{3}] +...+[ F_{r}] =r\cdotp \frac{1-p}{p} .$
Variance:
As per the $\displaystyle Var[ X]$, I'm having some trouble calculating it.
I can't use linearity with Variance, and I fail to understand wether I can simply say that:
$\displaystyle Var[ X] \ =\ Var[ rF] =r^{2} Var[ F]$.
Or, I should prove that each $\displaystyle F_{1} +F_{2} +F_{3} +...+F_{r}$ is indepentent, and so deduct that:
$\displaystyle Var[ X] \ =rVar[ F]$.
Which one of the two is correct? And how would I prove that the $\displaystyle F_{i}$ are independet?
You are correct. This is the negative binomial distribution and if you think a bit, you'll realise that any failure will be independent of the previous succeses that have occurred so the variance would be the $r\frac{1-p}{p^2}$