Block 94: Hypothesis Testing: t-tests
Test statistical hypotheses using t-tests in Python.
Concepts
- Null and alternative hypotheses
- One-sample, two-sample, and paired t-tests
- p-value, alpha level, Type I and II errors
- scipy.stats.ttest_1samp, ttest_ind, ttest_rel
Code Examples
See exercise below.
Exercise
One-sample test: is mean height of a sample significantly different from 170cm? Two-sample test: do male and female passengers on Titanic have different mean fares? Interpret p-value.
Homework
Explain Type I and Type II errors using a medical testing analogy. Which is worse for a cancer screening test? Wednesday