Proof: Mean of distribution using derivative of normalized condition

92 Views Asked by At

Let's assume i'm given a Probability Distribution as follows:

$$Bin(n; N, p)=\binom{N}{n}p^n(1-p)^{(N-n)}$$

We know that the mean of this distribution is:

$$E[n]=Np$$

However, we want to prove its true using the derivative of the normalized condition of the distribution:

$$\sum_{n=0}^{N}\binom{N}{n}p^n(1-p)^{(N-n)}=1$$

The textbook says that we can derive $E[n]$, the expectation of n, by differentiating both sides of the normalized condition with respect to p, and then rearranging to obtain the expression for the mean of n, aka: $E[n]$.

Ok, So I try to do this by differentiate both sides as follows:

$$\frac{d}{dp}\Bigg( \sum_{n=0}^{N}\binom{N}{n}p^n(1-p)^{(N-n)}\Bigg) = \frac{d}{dp} 1$$

$$\sum_{n=0}^{N}\binom{N}{n} \frac{d}{dp}\Bigg( p^n(1-p)^{(N-n)}\Bigg) = 0$$

Differentiating LHS sub-expression:

$$\frac{d}{dp}\Bigg( p^n(1-p)^{(N-n)}\Bigg)$$

applying product rule of diff:

$$= D\{p^n\}\ (1-p)^{(N-n)} + (p^n)\ D \{(1-p)^{(N-n)}\}$$

$$= n p^{(n-1)} (1-p)^{(N-n)} + (p^n)\ (N-n) (1-p)^{(N-n-1)}(-1)$$

$$= n p^{(n-1)} (1-p)^{(N-n)} - (p^n)\ (N-n) (1-p)^{(N-n-1)}$$

Substituting this result back into Summation:

$$\sum_{n=0}^{N}\binom{N}{n} \frac{d}{dp}\Bigg( n p^{(n-1)} (1-p)^{(N-n)} - (p^n)\ (N-n) (1-p)^{(N-n-1)}\Bigg) = 0$$

Now I'm wondering how do you rearrange this expression to obtain the Expectation of the Binomial Distribution, $E[p]$?

(The Textbook in question is "Pattern Recognition and Machine Learning", 8th printing, 2006, Christoper M. Bishop, page 128, exercise 2.4.)

2

There are 2 best solutions below

0
On

Differntiation of $$\sum_{n=0}^{N}\binom{N}{n}p^n(1-p)^{(N-n)}=1$$ gives $$\sum_{n=0}^{N}\binom{N}{n} [np^{n-1}(1-p)^{(N-n)}-(N-n)p^{n}(1-p)^{N-n-1}]=0$$ You can write this as

$$\sum_{n=0}^{N}\binom{N}{n} p^n(1-p)^{(N-n)}[\frac n p -\frac {N-n} {1-p}]=0$$

After multiplying by $p(1-p)$ this becomes

$$\sum_{n=0}^{N}\binom{N}{n} p^n(1-p)^{(N-n)}[n -Np]=0$$

Can you finish the proof (by splitting the sum into two parts)?

2
On

Instead say that $$B(k,n,p,q)= {n \choose k} p^k q^{n-k}~~~~~(1)$$ Now write the binomial expansion $$(p+q)^n = \sum_{k=0}^{n} {n \choose k} p^k q ^{n-k}~~~~(2)$$ paretially differentiate both sides $(\frac{\partial}{\partial p}),$ to get $$\sum_{k=0}^{n} k {n \choose k} p^{k}{q^{n-k}}=np (p+q)^{n-1}~~~~(3)$$ $$<k>=\frac{\sum_{k=0}^{n} k B(k,n,p,q)}{\sum_{k=0}^{n} B(k,n,p,q)}=\frac{np}{p+q}.$$ Finally using $p+q=1$, \you get the required result.