# 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 (**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N = 10, n = 5, p = \frac{15}{36}}**
(15 of the possible 36 dice rolls sum to a prime number)):

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\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)

The resulting answer is: 0.1606

#### To Think About

1. Suppose that the assumption of independence (the first "i" in "i.i.d.") were violated. Specifically suppose that, after the first Bernoulli trial, every trial has a probability Q of simply reproducing the immediately previous outcome, and a probability (1-Q) of being an independent trial. How would you compute the probability of getting n events in N trials if the probability of each event (when it is independent) is p?

2. Try the Mathematica calculation on slide 5 without the magical "GenerateConditions -> False". Why is the output different?