Hypothesis Testing

The heart of inferential statistics. We use data to decide whether to accept or reject a claim.

Null vs Alternative Hypothesis

  • Null Hypothesis ($H_0$): The status quo. "No difference", "No effect". (e.g., $\mu = 50$).
  • Alternative Hypothesis ($H_1$ or $H_a$): The claim we want to test. (e.g., $\mu \ne 50$ or $\mu > 50$).

The 5 Steps

  1. State $H_0$ and $H_1$.
  2. Select Level of Significance ($\alpha$, usually 0.05).
  3. Calculate the Test Statistic (Z or t).
  4. Determine the Critical Value or P-Value.
  5. Make a Decision (Reject or Fail to Reject $H_0$).

Z-Test for Mean ($\sigma$ known)

$$ Z = \frac{\bar{x} - \mu}{\sigma / \sqrt{n}} $$

t-Test for Mean ($\sigma$ unknown)

Used when $\sigma$ is unknown. We use $s$ (sample std dev) instead.

$$ t = \frac{\bar{x} - \mu}{s / \sqrt{n}} $$

Advanced Topics

Dive deeper into the nuances of testing:

Test Yourself

Q1: If we Reject $H_0$ when it is actually true, what error have we made?

  • Type I Error
  • Type II Error
  • Standard Error