Conditional expected value of binomial random variable above a threshold?

There are $n$ IID experiments all with a success rate of $p$. Let $a_i=1$ denote a success in experiment $i$ and $a_i=0$ denote a failure. Is there a way to calculate the following: $E(\sum a_i|\sum a_i>B)$ for any $B\in\{1\cdots n\}$?

• If $np$ and $n(1-p)$ are large enough, a normal approximation works well, unless if you really need an exact solution. – jdods Dec 4 '17 at 14:13
• I wish to avoid using approximations, although it will prob. be good enough for my asymptomatic analysis. I guess there is no closed form" for this, is there? – MoRkO Dec 4 '17 at 15:44

Can you do something with the formula for conditial expectation?

Given $X$ a discrete random variable and $\mathbb{P}(B) > 0$, then is the conditional expectation of $X$ given $B$ defined by

$\mathbb{E}(X|B) = \sum_{x\in Im(X)} x\mathbb{P}(X=x|B)$, with

$\mathbb{P}(X=x|B) = \frac{\mathbb{P}(X=x \cap B)}{\mathbb{P}(B)}$

Note that if the sum is smaller than $B$, the conditional probability is zero.

Yes.

The summation of successes is a random variable $\sim\mathsf{Bin}(n,p)$

If it is denoted by $X$ then to be calculated is: $$\mathbb E[X\mid X>B]$$

• Thanks, but I am afraid this is obvious, I am looking for the formula for $E(X|X>B)$. I know it is above $B*Pr(X>B)$ and below $n*Pr(x>B)$, is there anything more I can say on it? – MoRkO Dec 4 '17 at 15:47
• There is not a closed form for this. – drhab Dec 4 '17 at 17:51
• Thanks, I suspected this was the answer.... – MoRkO Dec 4 '17 at 22:07