# For Y~B(11, 0.3) what is P(|Y-5| >= 3)?

I feel this is a simple problem, yet I cannot seem to solve it. Any help is greatly appreciated.

• What does "B(11,0.3)" mean? Would it refer to a Binomial distribution, a Beta distribution, or perhaps something else? (The nature of the question suggests it's not a Beta, but even so you should explain your notation.)
– whuber
Oct 22, 2014 at 14:28
• The binomial-tag strongly hints at $B$ meaning binomial, but it would still be better to explain the notation in the question. Oct 22, 2014 at 14:32

In this case, there are few enough possible values that $Y$ may take, that it is feasible to simply enumerate all possible values of $Y$ for which $|Y-5|\ge3$ and sum the respective probabilities.

• Note that to get a correct answer it is crucial to distinguish "$\ge$" (as stated in the question) from "$\gt$" (as given in this answer).
– whuber
Oct 22, 2014 at 14:29
• Whoops. Edited to match the question. Oct 22, 2014 at 14:31

Note that $P(|Y-5|\geq 3)=1-P(2<Y<8)=1-P(Y<8)+P(Y\leq2)$. Now you have $Y\sim B(11,0.3)$. Therefore we have $P(|Y-5|\geq 3)=1-F_{B(11,0.3)}(8)+F_{B(11,0.3)}(2)$. Where $F_{B(11,0.3)}$ is the CDF of $B(11,0.3)$. Let me know if this helps.

• Small R code assuming that $B(11,0.3)$ means binomial with 11 trials and success probability $0.3$. 1-(dbinom(8,11,0.3)+dbinom(3,11,0.3)) Oct 22, 2014 at 16:08

Since $Y \sim B(n,p)$ is a discrete variable with distribution $\binom{n}{k}p^k(1-p)^{n-k}$ for $k \in \{0,\ldots,n\}$ you have that $$P( | Y-5| \geq 3) = 1 - \sum_{k=3}^7 P(Y = k) = 1 - \sum_{k=3}^7 \binom{n}{k}p^k(1-p)^{n-k}.$$ Computing the above with $p=0.3$ and $n=11$ you get $$P( | Y-5| \geq 3) \approx 0.317$$

Code in matlab/octave for the above computation is:

k = [3:7]; p = 0.3; n = 11;
1 - sum(bincoeff(n,k).*p.^k.*(1-p).^(n-k))

• Welcome to Cross Validated! Please note this is a self-study question. The other answers are deliberately incomplete. Oct 22, 2014 at 12:48