Lecture 9 – Hypothesis Testing

DSC 80, Spring 2023


We'll look at many examples, and cover the necessary theory along the way.

"Standard" hypothesis testing

"Standard" hypothesis testing helps us answer questions of the form:

I have a population distribution, and I have one sample. Does this sample look like it was drawn from the population?

Example: Coin flipping

Recap: Coin flipping

Let's recap the example we saw last time.

Generating the null distribution

Generating the null distribution, using math

The number of heads in 100 flips of a fair coin follows the $\text{Binomial(100, 0.5)}$ distribution, in which

$$P(\text{# heads} = k) = {100 \choose k} (0.5)^k{(1-0.5)^{100-k}} = {100 \choose k} 0.5^{100}$$

The probability that we see at least 59 heads is then:

Let's look at this distribution visually.