2

If $X$ is a random variable with binomial distribution $B[2n,p]$, with $p=0.5$, then its mean value is $2np = n$. I would like to calculate the mean value of $X$ given that $X$ is at most $n$, i.e.:

$$\frac{1}{Pr[X\leq n]}\cdot \sum_{k=0}^{n} k \binom{2n}{k} p^k q^{2n-k}$$

To calculate the sum, I used the ideas from this question: Expected Value of a Binomial distribution?

and got:

$$ \frac{2np}{Pr[X\leq n]}\cdot \sum_{k=1}^{n} \binom{2n-1}{k-1} p^{k-1} q^{(2n-1)-(k-1)}$$

$$ = \frac{2np}{Pr[X\leq n]}\cdot \sum_{j=0}^{n-1} \binom{2n-1}{j} p^{j} q^{(2n-1)-j}$$

If the inner sum were for $j=0,...,(2n-1)$, it would be exactly 1 by the binomial theorem. But it is only for half the range, and by symmetry, its value seems to be 0.5. The probability in the denominator is also 0.5, so we get:

$$\frac{2np}{0.5}\cdot 0.5 = 2np = n$$

But this doesn't make sense, since the expectation of values that are at most $n$, cannot be $n$!

Where is my mistake? And what is the correct expectation?

  • Do you need an answer only for $p=1/2$, as already given, or the general case? If so, what do you need it for? An exact expression can be given, but is complicated, while approximations will be easier. Is an approximation good enough? – kjetil b halvorsen Feb 05 '15 at 15:23
  • Consider $n=2$, and $p=\frac{1}{2}$ so that $X \sim B[4,\frac{1}{2}]$ then $Pr[X\leq 2]=\frac{11}{16}$ not $\frac{1}{2}$ as you assumed. – Math-fun Feb 05 '15 at 15:24

1 Answers1

5

Given that $p=q=\frac{1}{2}$, $$\frac{1}{\mathbb{P}[X\leq n]}\sum_{k=0}^{n}k\binom{2n}{k}\frac{1}{4^n}=\frac{1}{4^n\mathbb{P}[X\leq n]}\sum_{k=0}^{n}k\binom{2n}{k}=\frac{n}{2\mathbb{P}[X\leq n]},$$ but the probability that $X\leq n$ is not $\frac{1}{2}$; it is given by: $$ \mathbb{P}[X=n]+\mathbb{P}[X<n] = \frac{1}{2}+\frac{1}{2\cdot 4^n}\binom{2n}{n},$$ so the wanted expected value is: $$\frac{n}{1+\frac{1}{4^n}\binom{2n}{n}}.$$

Which by Stirling's formula is approximately:

$$\frac{n}{1+\frac{1}{\sqrt{\pi n}}} \approx n - \sqrt{\frac{n}{\pi}}$$

Jack D'Aurizio
  • 361,689