# Segment 5 Sanmit Narvekar

## Segment 5

#### To Calculate

1. You throw a pair of fair dice 10 times and, each time, you record the total number of spots. When you are done, what is the probability that exactly 5 of the 10 recorded totals are prime?

We use the formula from the slides, making the appropriate substitutions ($\displaystyle N = 10, n = 5, p = \frac{15}{36}$ (15 of the possible 36 dice rolls sum to a prime number)):

$\displaystyle \binom{N}{n} p^n (1-p)^{N-n} = \binom{10}{5} (15/36)^5 (21/36)^5 = 0.2138$

2. If you flip a fair coin one billion times, what is the probability that the number of heads is between 500010000 and 500020000, inclusive? (Give answer to 4 significant figures.)

Here is the code:

cdfs = binocdf([500010000, 500020000], 10^9, 0.5);
cdfs(2)-cdfs(1)