 # I saw the following claim in some book without a proof and couldn't prove it myself. d/(dp)P(Bin(n,p)<=d)=−n⋅P(Bin(n−1,p)=d) acapotivigl 2022-09-14 Answered
I saw the following claim in some book without a proof and couldn't prove it myself.
$\frac{d}{dp}\mathbb{P}\left(\text{Bin}\left(n,\phantom{\rule{thinmathspace}{0ex}}p\right)\le d\right)=-n\cdot \mathbb{P}\left(\text{Bin}\left(n-1,\phantom{\rule{thinmathspace}{0ex}}p\right)=d\right)$
So far I got:
$\begin{array}{l}\frac{d}{dp}\mathbb{P}\left(\text{Bin}\left(n,\phantom{\rule{thinmathspace}{0ex}}p\right)\le d\right)=\\ \frac{d}{dp}\sum _{i=0}^{d}\left(\begin{array}{c}n\\ i\end{array}\right){p}^{i}{\left(1-p\right)}^{n-i}=\\ -n\cdot {\left(1-p\right)}^{n-1}+\sum _{i=1}^{d}\left(\begin{array}{c}n\\ i\end{array}\right)\left[i{p}^{i-1}{\left(1-p\right)}^{n-i}-{p}^{i}\left(n-i\right){\left(1-p\right)}^{n-i-1}\right]\end{array}$
But I am not very good playing with binomial coefficients and don't know how to proceed.
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it Jazmin Bryan
Step 1
Consider the derivative of the logarithm:
$\frac{d}{dp}\left[\mathrm{log}Pr\left[X=x\mid p\right]\right]=\frac{d}{dp}\left[x\mathrm{log}p+\left(n-x\right)\mathrm{log}\left(1-p\right)\right]=\frac{x}{p}-\frac{n-x}{1-p},$
hence
$\frac{d}{dp}\left[Pr\left[X=x\mid p\right]\right]=\left(\genfrac{}{}{0}{}{n}{x}\right){p}^{x}\left(1-p{\right)}^{n-x}\left(\frac{x}{p}-\frac{n-x}{1-p}\right)$
and
$\begin{array}{rl}\frac{d}{dp}\left[Pr\left[X\le x\mid p\right]\right]& =\sum _{k=0}^{x}\left(\genfrac{}{}{0}{}{n}{k}\right){p}^{k}\left(1-p{\right)}^{n-k}\left(\frac{k}{p}-\frac{n-k}{1-p}\right)\\ & =\sum _{k=0}^{x}\left(\genfrac{}{}{0}{}{n}{k}\right)k{p}^{k-1}\left(1-p{\right)}^{n-k}-\left(\genfrac{}{}{0}{}{n}{k}\right)\left(n-k\right){p}^{k}\left(1-p{\right)}^{n-1-k}.\end{array}$
Step 2
But observe that
$\left(\genfrac{}{}{0}{}{n}{k}\right)\left(n-k\right)=\frac{n!}{k!\left(n-k-1\right)!}=\frac{\left(k+1\right)n!}{\left(k+1\right)!\left(n-\left(k+1\right)\right)!}=\left(k+1\right)\left(\genfrac{}{}{0}{}{n}{k+1}\right),$
hence the second term can be written
$\left(k+1\right)\left(\genfrac{}{}{0}{}{n}{k+1}\right){p}^{\left(k+1\right)-1}\left(1-{p}^{n-\left(k+1\right)}\right),$
which is the same as the first term except the index of summation has been shifted by 1. Therefore, the sum is telescoping, leaving
$\frac{d}{dp}\left[Pr\left[X\le x\mid p\right]\right]=0-\left(\genfrac{}{}{0}{}{n}{x}\right)\left(n-x\right){p}^{x}\left(1-p{\right)}^{n-1-x}.$
Step 3
All that remains is to observe
$\left(\genfrac{}{}{0}{}{n}{x}\right)\left(n-x\right)=\frac{n!}{x!\left(n-x-1\right)!}=\frac{n\left(n-1\right)!}{x!\left(n-1-x\right)!}=n\left(\genfrac{}{}{0}{}{n-1}{x}\right),$
therefore
$\frac{d}{dp}\left[Pr\left[X\le x\mid p\right]\right]=-nPr\left[{X}^{\ast }=x\mid p\right],$
where ${X}^{\ast }\sim \mathrm{Binomial}\left(n-1,p\right)$, as claimed.

We have step-by-step solutions for your answer!