# Math Insight

### Introduction to probability distributions

Names:
1. When you flip a fair coin, the two possible outcomes, heads ($H$) or tails ($T$), have equal probability.
$P(H) =$

$P(T) =$
1. If an experiment consisted flipping one coin and recording the number of heads observed, we could let the random variable $N$ be the observed number of heads. In this case, the two possible outcomes are the event $N=0$ of observing no heads and the vent $N=1$ of observing one head. To capture the possible values of $N$ and their probabilities, we can use a probability distribution function, or probability mass function, which we'll denote by $f_N(n)$. The function is defined by $$f_N(n) = P(N = n).$$ Note how $N$ and $n$ represent different objects. $N$ is the random variable and $n$ is a number (in this case $0$ or $1$) that could be the value of $N$. The definition of $f_N$ is shorthand for \begin{align*} f_N(0) &= P(N=0)\\ f_N(1) &= P(N=1)\\ f_N(2) &= P(N=2)\\ &\ldots \end{align*} Given that we are flipping just one coin, we can easily fill in the values.
$f_N(0) =$

$f_N(1) =$

$f_N(2) =$

$f_N(3) =$

In fact, since we can get at most one head, if $n>1$, we know that $f_N(n) =$
.

We can graph the probability distribution $f_N(n)$ using either a bar graph or a line graph.

Feedback from applet
Point heights:

(You can click the “toggle” button to switch between a bar graph and a line graph.)

2. A similar experiment is to flip a coin twice and let $N$ be the observed number of heads. We define the probability distribution function (or probability mass function) $f_N$ in the same way: $$f_N(n) = P(N = n).$$ The values are only slightly trickier to fill in.
$f_N(0) =$

$f_N(1) =$

$f_N(2) =$

$f_N(3) =$

In fact, since we can get at most two heads, if $n>2$, we know that $f_N(n) =$
.

Graph the probability distribution $f_N(n)$.

Feedback from applet
Point heights:
3. A another experiment is to flip a coin four times and let $N$ be the observed number of heads. We define the probability distribution function $f_N$ in the same way: $$f_N(n) = P(N = n).$$ This time, it's a bit trickier to determine the probabilities.
$f_N(0) =$

$f_N(1) =$

$f_N(2) =$

$f_N(3) =$

$f_N(4) =$

Since we can get at most four heads, if $n>4$, we know that $f_N(n) =$
.

Graph the probability distribution $f_N(n)$.

Feedback from applet
Point heights:
4. If you flip a coin ten times and let $N$ be the number of heads, the probability distribution function $f_N(n)$ looks like the following bar graph.

What is the probability of getting getting seven heads out of the ten coin flips? $f_N(7) \approx$
What is the probability of getting just one head? $f_N(1) \approx$

(This probability distribution of the number of heads is common probability distribution, so it is given a special name: the binomial distribution.)

2. Let's experiment with coins is to count how many heads you can obtain in a row. Continue flipping a coin until you obtain your first tail and let $N$ be the number of heads before that tail. What is the probability distribution $f_N(n)$ of the random variable $N$?
1. First of all, what valid options for $N$? The smallest value that $N$ could be is
. Is there a largest possible value of $N$?
The probability that the first $13,462,305$ flips result in a head before you see your first tail is
. Therefore, $N$ could be any non-negative integer. It would just be extremely unlikely to be a large number.

2. What is the probability that the first coin flip is a tail, $T$?
Therefore, the probability that $N$ is zero is $f_N(0) = P(N=0)=$
.
3. What is the probability that the first coin flip is a head, $H$?
In terms of the random variable $N$, this probability is
$=＿$.
4. So far, we've introduced two events, which we labeled in terms of the random variable $N$.

• $N=0$: the event that the first coin flip was $T$, so that we obtained zero heads.
• $N \ge 1$: the event that the first coin flip was $H$, so that we know we obtained at least one head.

Since we keep flipping coins only if we obtain an $H$, we continue with more events only conditioned on the event $N \ge 1$. In that case, we consider two more events.

• : the event that the second coin flip was $T$, so we obtained exactly

• : the event that the second coin flip was $H$, so we know we obtained at least

(Online, enter $\ge$ as >= or as the symbol ≥.)

The probabilities of these two events, conditioned on the event $N \ge 1$, are simple since they involve just one more coin flip.

• $P(N=1\,|\,N \ge 1) =$
• $P(N \ge 2 \,|\,N \ge 1) =$

From the definition of conditional probability, recall that $P(A,B) = P(A\,|\,B)P(B)$. Substituting the event $N \ge 1$ for $B$ and either event $N=1$ or $N \ge 2$ for $A$, we can calculate that

• $P(N=1, N \ge 1) = P(N=1\,|\,N \ge 1) P(N \ge 1) =$
$\times$
$=$
• $P(N \ge 2, N \ge 1) = P(N \ge 2\,|\,N \ge 1) P(N \ge 1) =$
$\times$
$=$

But now, the notation is a bit silly. If we've obtained exactly one head ($N=1$), then obviously we've obtained at least one head ($N \ge 1$). Similarly, if we've obtained at least two heads ($N \ge 2$), then obviously we've obtained at least one head ($N \ge 1$). The events $N=1$ and $N \ge 2$ cannot occur without the event $N \ge 1$. Hence, $P(N=1)=P(N=1, N \ge 1)$ and $P(N \ge 2) = P(N \ge 2, N \ge 1)$. We summarize by giving the probabilities of obtaining exactly one head and of obtaining at least two heads.

• $f_N(1) = P(N=1) =$
• $P(N \ge 2) =$
5. We can repeat this procedure to include one more coin flip and calculate the probability that $N=2$ (if third coin flip is $T$) and that $N \ge 3$ (if third coin flip is $H$).

Calculate the probabilities of these events conditioned on the fact that we already flipped heads twice in a row.

• $P(N=2 \,|\, N \ge 2)=$
• $P(N \ge 3 \,|\, N \ge 2)=$

Multiply by $P(N \ge 2)$ to determine the probabilities of obtaining exactly two heads or obtaining at least three heads.

• $f_N(2) = P(N=2)=$
• $P(N \ge 3)=$
6. Notice to get from $P(N \ge 1)$ to $P(N \ge 2)$ we multiply by $\frac{1}{2}$, the probability of getting one more $H$. Similarly, we multiply by $\frac{1}{2}$ to get from $P(N \ge 2)$ to $P(N \ge 3)$. In general, the event $N \ge n$ corresponds to flipping $H$ $n$ times in a row, so the probability $P(N \ge n)$ is the product of $n$ $\frac{1}{2}$'s. $P(N \ge n)$ is the exponential function
$P(N \ge n) =$
.
(Online enter $a^b$ as a^b.)

To know that we obtained exactly $n$ heads, we need to flip a coin one more time and this time obtain a $T$. We need to multiply by one more $\frac{1}{2}$ (the probability of $T$) to determine the probability distribution function $f_N(n)$.
$f_N(n) = P(N=n) =$

(Online, you'll need to use parentheses after the ^ to put a n+1 in the exponent.)

7. Use the below applet to sketch the probability distribution $f_N(n)$ of the number $N$ of consecutive heads. The distribution continues for all non-negative integers $n$, but we just plot $0 \le n \le 5$.

Feedback from applet
Point heights: