To calculate the probability of getting exactly 3 heads when tossing a fair coin 5 times, we can use the binomial probability formula:
P(X=k) = C(n, k) × pk × (1-p)n-k
Where:
- C(n, k) is the binomial coefficient (the number of ways to choose k successes in n trials),
calculated as: C(n, k) = n! / (k! × (n-k)!) - n is the total number of trials (in this case, 5 tosses),
- k is the number of successful outcomes we are looking for (3 heads),
- p is the probability of getting heads in a single toss (0.5 for a fair coin).
Now, substituting the values:
- n = 5
- k = 3
- p = 0.5
First, calculate the binomial coefficient C(5, 3):
C(5, 3) = 5! / (3! × (5-3)!) = 5! / (3! × 2!)
Calculating factorials:
- 5! = 120
- 3! = 6
- 2! = 2
So, C(5, 3) = 120 / (6 × 2) = 120 / 12 = 10
Next, we can plug the values into the binomial formula:
P(X=3) = C(5, 3) × (0.5)3 × (1-0.5)5-3
Which simplifies to:
P(X=3) = 10 × (0.5)3 × (0.5)2 = 10 × 0.125 × 0.25 = 10 × 0.03125 = 0.3125
Therefore, the probability of getting exactly 3 heads when tossing a fair coin 5 times is 0.3125 or 31.25%.