We are given that X follows a binomial distribution B(n,p), so the probability P(X=k) is given by the formula:
P(X=k)=(kn)pk(1−p)n−kfork=0,1,2,…,n
We are told that P(X=2)=P(X=3). Substituting the binomial probability formula, we get:
(2n)p2(1−p)n−2=(3n)p3(1−p)n−3
Expressing the binomial coefficients, (2n)=2!(n−2)!n! and (3n)=3!(n−3)!n!, the equation becomes:
2!(n−2)!n!p2(1−p)n−2=3!(n−3)!n!p3(1−p)n−3
Since n! is common and non-zero (assuming n≥3 for the probabilities to be non-trivial), we can divide both sides by n!:
2!(n−2)!1p2(1−p)n−2=3!(n−3)!1p3(1−p)n−3
We know 2!=2 and 3!=6, so:
2(n−2)!1p2(1−p)n−2=6(n−3)!1p3(1−p)n−3
Rearranging terms, we move everything to one side:
2(n−2)!p2(1−p)n−2−6(n−3)!p3(1−p)n−3=0
Factoring out common terms p2(1−p)n−3 (assuming 0<p<1 and n≥3 so that this factor is non-zero):
p2(1−p)n−3[2(n−2)!1−p−6(n−3)!p]=0
This implies:
2(n−2)!1−p−6(n−3)!p=0
So:
2(n−2)!1−p=6(n−3)!p
Noting that (n−2)!=(n−2)(n−3)!, substitute:
2(n−2)(n−3)!1−p=6(n−3)!p
Since (n−3)! is common and non-zero, multiply both sides by (n−3)!:
2(n−2)1−p=6p
Cross-multiplying:
6(1−p)=2(n−2)p
Expanding both sides:
6−6p=2p(n−2)
Bringing all terms to one side:
6−6p−2p(n−2)=0
Factoring p:
6=6p+2p(n−2)
Simplifying the right side:
6=p[6+2(n−2)]
Expanding inside the brackets:
6+2(n−2)=6+2n−4=2n+2
So:
6=p(2n+2)
Factor out 2:
6=2p(n+1)
Dividing both sides by 2:
3=p(n+1)
Therefore:
p(n+1)=3(Equation 1)
The mean of X, denoted E(X), for a binomial distribution is E(X)=np. From Equation 1, we solve for n:
n+1=p3
So:
n=p3−1=p3−p
Now substitute into E(X)=np:
E(X)=(p3−p)p=3−p
Thus, the mean E(X) is 3−p. Comparing with the options:
A. 2−p
B. 3−p
C. 2p
D. 3p
Hence, the correct answer is Option B.