1. ## Find expected value

i). suppose x has a binomial distribution with probability of success p over n trials. Show that E[1/(1+x)]=[1-(1-p)n+1]/[p(n+1)].

ii). suppose now x has a negative binomial distribution with density

P(X=k)=k-1Cn-1 pnqk-n with q=1-p and K>=n, prove that for any function f(x),

E[qf(x)]=E[(x-n)f(x-1)/(x-1)]

2. Hello,
Originally Posted by Jojo123
i). suppose x has a binomial distribution with probability of success p over n trials. Show that E[1/(1+x)]=[1-(1-p)n+1]/[p(n+1)].
By definition, $\displaystyle E(f(X))=\sum_{k=0}^n f(k)P(X=k)$

So $\displaystyle \mathbb{E}\left(\frac{1}{1+X}\right)=\sum_{k=0}^n \frac{1}{1+k} \cdot {n \choose k} p^k q^{n-k}$, where q=1-p.

$\displaystyle \dots=\sum_{k=0}^n \frac{1}{1+k} \cdot \frac{n!}{k!(n-k)!} p^k q^{n-k}$
$\displaystyle \dots=\sum_{k=0}^n \frac{n!}{(k+1)!(n-k)!} p^k q^{n-k}$

Let m=k+1 :
$\displaystyle \dots=\sum_{m=1}^{n+1} \frac{n!}{m!(n+1-m)!} p^{m-1} q^{n+1-m}$

$\displaystyle \dots={\color{red}-\frac{1}{n+1} \cdot \frac 1p \cdot q^{n+1}}+\sum_{m={\color{red}0}}^{n+1} \frac{n+1}{n+1} \cdot \frac{n!}{m!(n+1-m)!} p^{m-1} q^{n+1-m}$

$\displaystyle \dots=-\frac{1}{n+1} \cdot \frac 1p \cdot q^{n+1}+\frac{1}{n+1} \sum_{m=0}^{n+1} \frac{(n+1)!}{m!(n+1-m)!} p^{m-1} q^{n+1-m}$

Now what is $\displaystyle S=\sum_{m=0}^{n+1} \frac{(n+1)!}{m!(n+1-m)!} p^{m-1} q^{n+1-m}$ ?

$\displaystyle S=\sum_{m=0}^{n+1} {n+1 \choose m} p^{m-1} q^{n+1-m}=\frac 1p \sum_{m=0}^{n+1} {n+1 \choose m} p^m q^{n+1-m}$

But then the remaining sum is the sum of probabilities $\displaystyle P(Z=m)$, where Z follows a binomial distribution (n+1,p)
Thus this sum is 1 and $\displaystyle \boxed{S=\frac 1p}$

We finally have :
$\displaystyle \mathbb{E}\left(\frac{1}{1+X}\right)=-\frac{1}{n+1} \cdot \frac 1p \cdot q^{n+1}+\frac{1}{n+1} \cdot \frac 1p$

$\displaystyle \boxed{\mathbb{E}\left(\frac{1}{1+X}\right)=\frac{ 1}{p(n+1)} \left(1-q^{n+1}\right)}$

I hope this is clear to you !

3. Hi, Moo. Can you please expain how to get the following line, thanx

$\displaystyle \dots={\color{red}-\frac{1}{n+1} \cdot \frac 1p \cdot q^{n+1}}+\sum_{m={\color{red}0}}^{n+1} \frac{n+1}{n+1} \cdot \frac{n!}{m!(n+1-m)!} p^{m-1} q^{n+1-m}$

4. Hi,
Originally Posted by Jojo123
Hi, Moo. Can you please expain how to get the following line, thanx

$\displaystyle \dots={\color{red}-\frac{1}{n+1} \cdot \frac 1p \cdot q^{n+1}}+\sum_{m={\color{red}0}}^{n+1} \frac{n+1}{n+1} \cdot \frac{n!}{m!(n+1-m)!} p^{m-1} q^{n+1-m}$
I want the sum to begin at $\displaystyle m=0$, in order to get the sum of probabilities of that binomial (n+1,p).

So I add the m=0 term by putting it in the sum, but I have to subtract it, otherwise there is no longer equality !
What is the value of $\displaystyle \frac{n!}{m!(n+1-m)!} p^{m-1} q^{n+1-m}$ when m=0 ? It's precisely the red stuff : $\displaystyle \frac{1}{n+1} \cdot \frac 1p \cdot q^{n+1}$

Is it clearer ?

5. ## Negative Binomial Distribution.

Suppose now X has a negative binomial distirbution with density

$\displaystyle P(X=k) = \left(\begin{array}{cc}k-1\\n-1\end{array}\right) p^nq^{k-n}$

with $\displaystyle q = 1 - p$ and $\displaystyle k \geq n$. Prove that for any function f(x),

$\displaystyle E[qf(X)] = E \left[\frac{(X-n)f(X-1)}{X-1}\right]$

Thank you!

6. Originally Posted by panda*
Suppose now X has a negative binomial distirbution with density

$\displaystyle P(X=k) = \left(\begin{array}{cc}k-1\\n-1\end{array}\right) p^nq^{k-n}$

with $\displaystyle q = 1 - p$ and $\displaystyle k \geq n$. Prove that for any function f(x),

$\displaystyle E[qf(X)] = E \left[\frac{(X-n)f(X-1)}{X-1}\right]$

Thank you!
Okay, I got it... I was overcomplicating the problem

Start from $\displaystyle S=\mathbb{E}\left(\frac{(X-n)f(X-1)}{X-1}\right)$

By the formula $\displaystyle \mathbb{E}(g(X))=\sum_{k=0}^\infty g(k)\mathbb{P}(X=k) \quad {\color{red}\star}$, we have :

(the sum starts at k=n, because the starting value for X is n. It's like saying that P(X=k), where k<n, is 0)
\displaystyle \begin{aligned} S &=\sum_{k=n}^\infty \frac{{\color{blue}k-n}}{k-1} \cdot f(k-1) \cdot {k-1 \choose n-1} p^n q^{k-n} \\ &=\sum_{k={\color{red}n+1}}^\infty \frac{k-n}{k-1} \cdot \frac{(k-1)!}{(n-1)!(k-n)!} \cdot f(k-1)p^n q^{k-n} \quad \text{because if k=n, } {\color{blue}k-n}=0 \\ &=\sum_{k=n+1}^\infty \frac{(k-2)!}{(n-1)!(k-1-n)!} \cdot f(k-1)p^n q^{k-n} \end{aligned}

Now, let $\displaystyle m=k-1$ :

\displaystyle \begin{aligned} S &=\sum_{m=n}^\infty \frac{(m-1)!}{(n-1)!(m-n)!} \cdot f(m)p^n q^{m+{\color{red}1}-n} \\ &=\sum_{m=n}^\infty {\color{red}q} \cdot \frac{(m-1)!}{(n-1)!(m-n)!} \cdot f(m)p^n q^{m-n} \\ &=\sum_{m=n}^\infty qf(m) \cdot {m-1 \choose n-1} p^n q^{m-n} \\ &=\sum_{m=n}^\infty qf(m) \cdot \mathbb{P}(X=m) \end{aligned}

With the formula $\displaystyle {\color{red}\star}$, we get that :
$\displaystyle \boxed{\mathbb{E}\left(\frac{(X-n)f(X-1)}{X-1}\right)=S=\mathbb{E}(qf(X))}$

Looks good ?