Probability & Statistics Ch.2 Section 2 Question 2

· Mohammad-Ali Bandzar

Solutions for “Probability and Statistics: The Science of Uncertainty” (Second Edition). These are solutions I have come up with; I offer no guarantee of accuracy.

Question

Suppose we flip three fair coins, and let X be the number of heads showing.

a) Compute P(X=x)P(X = x) for every real number x. b) Write a formula for P(XB)P(X \in B), for any subset B of the real numbers.

Solution

(a) Compute P(X=x)P(X = x) for every real number x

All possible outcomes from flipping three coins:

  • Heads, Heads, Heads
  • Heads, Heads, Tails
  • Heads, Tails, Heads
  • Heads, Tails, Tails
  • Tails, Heads, Heads
  • Tails, Heads, Tails
  • Tails, Tails, Heads
  • Tails, Tails, Tails

The probability of no heads is 18\frac{1}{8}, therefore P(X=0)=18P(X=0)=\frac{1}{8}

The probability of one head is 38\frac{3}{8}, therefore P(X=1)=38P(X=1)=\frac{3}{8}

The probability of two heads is 38\frac{3}{8}, therefore P(X=2)=38P(X=2)=\frac{3}{8}

The probability of three heads is 18\frac{1}{8}, therefore P(X=3)=18P(X=3)=\frac{1}{8}

The probability of any other number of heads is zero: P(X=x)=0P(X=x)=0 for x{0,1,2,3}x\notin \{0,1,2,3\}

(b) Write a formula for P(XB)P(X \in B), for any subset B of the real numbers

We can simply write the probabilities we calculated above multiplied by the indicator function for that outcome. The sum of them all will represent the probability of B.

P(XB)=18IB(0)+38IB(1)+38IB(2)+18IB(3)P(X\in B)=\frac{1}{8}\textit{I}_B(0)+\frac{3}{8}\textit{I}_B(1)+\frac{3}{8}\textit{I}_B(2)+\frac{1}{8}\textit{I}_B(3)

Alternatively, assuming n coin tosses, we have 2n2^n possible outcomes. Of those outcomes, we have (nx)\binom{n}{x} ideal outcomes where x represents the desired number of coins showing heads:

(nx)2n\frac{\binom{n}{x}}{2^n}

This equation represents the probability of having x heads in n coin tosses:

P(XB)=(30)23IB(0)+(31)23IB(1)+(32)23IB(2)+(33)23IB(3)P(X\in B)=\frac{\binom{3}{0}}{2^3}\textit{I}_B(0)+\frac{\binom{3}{1}}{2^3}\textit{I}_B(1)+\frac{\binom{3}{2}}{2^3}\textit{I}_B(2)+\frac{\binom{3}{3}}{2^3}\textit{I}_B(3)

Note that this equation simplifies to exactly the same one as above.