Lesson 3

Normality and Sampling Distributions

Big question

What does normality do for OLS inference?

Lesson progress

Complete checkpoints as you learn

0% complete0 checkpoint streak
Progress tracking available after sign-in. Sign in to save your work.
Big question
Concept
Activity
Quiz

Learning objectives

  • Explain normality and sampling distributions in plain language.
  • Use normality assumption correctly in an interpretation.
  • Connect the lesson idea to a formula, graph, Python result, or real example.

Simple explanation

Normal errors make OLS coefficient estimators normally distributed conditional on the observed regressors.

Key terms

normality assumption
The condition that the regression error is normally distributed conditional on regressors.
two-sided alternative
An alternative hypothesis that looks for departure in either direction.
confidence interval
A range of plausible parameter values built from an estimate and standard error.

Core formula

uX Normal(0,sigma2)u | X ~ Normal(0, sigma^2)

Use plain-language interpretation before algebra.

Example

HPRICE1 gives students a real-data setting for normality and sampling distributions. The lesson emphasizes inference mechanics and interpretation, not memorized output.

Interactive visual

SamplingDistributionSimulator

Original Module 4 visual for Normality and Sampling Distributions.

wage_sample.csv

y variable

wage

The dependent variable. It is the outcome students want to explain.

x variable

education

The explanatory variable. It is used to describe changes in wage.

Live Python

Normality and Sampling Distributions Python example

Normality and Sampling Distributions Python example

Stdout

Run Python to see results here.

Status / stderr

Ready to run Python in your browser.

Line-by-line guide

  1. Line 1Load a Python library needed for data work or regression.
  2. Line 2Load a Python library needed for data work or regression.
  3. Line 3Load a Python library needed for data work or regression.
  4. Line 4Load a Python library needed for data work or regression.
  5. Line 6Create or update a Python object used in the analysis.
  6. Line 7Create or update a Python object used in the analysis.
  7. Line 8Run this Python instruction as part of the lesson workflow.
  8. Line 9Run this Python instruction as part of the lesson workflow.
  9. Line 10Create or update a Python object used in the analysis.
  10. Line 11Create or update a Python object used in the analysis.
  11. Line 12Create or update a Python object used in the analysis.
  12. Line 13Add an intercept column to the regression design matrix.
  13. Line 14Create or update a Python object used in the analysis.
  14. Line 15Display a result so students can inspect the output.
  15. Line 16Create or update a Python object used in the analysis.
  16. Line 17Run this Python instruction as part of the lesson workflow.

Python walkthrough

  1. 1Set a reproducible random seed for the simulation.
  2. 2Generate many samples so the repeated-sampling pattern is visible.
  3. 3Estimate the model in each sample.
  4. 4Plot or summarize the distribution of estimates or test statistics.

Live notebook

Run this lesson as a notebook

Open an editable notebook cell-by-cell, run Python in the browser, and download the `.ipynb` file for later.

Related dataset

WAGE1

Estimated time

25 to 40 min

Packages

pandas, numpy, statsmodels, patsy

Expected output

A regression or inference table with coefficients, uncertainty, and short interpretation notes.

Learning goals

  • Load and inspect WAGE1.
  • Run the Python cells connected to Testing a Single Coefficient Against Zero.
  • Interpret the output using t tests and WAGE1.

Common errors

  • File not found: check that WAGE1.DTA is installed or use the course data folder.
  • Package import error: use the browser notebook first, then download for local Jupyter if your local packages differ.
  • Column name error: compare your variable names with the dataset variables listed for this notebook.

Dataset path helper

import pandas as pd

df = pd.read_stata("/data/WAGE1.DTA")
df.head()

Interactive activity

SamplingDistributionSimulator

Compare sampling distributions

See how normal and skewed errors change the shape of estimated slopes.

Simulation

Inputs

Try it yourself

Write one plain-English sentence explaining the main idea from this lesson.

Common mistakes

Check these before you move on.

A regression coefficient describes a pattern unless the assumptions or research design support a causal interpretation.

Quick quiz

What is the safest inference focus in Normality and Sampling Distributions?

Quick quiz

Which reporting habit is most important in Normality and Sampling Distributions?

Quick quiz

Why is GPA1 a reasonable practice dataset here?

Key takeaway

Normality and Sampling Distributions turns regression output into evidence only when the hypothesis, assumptions, and magnitude are stated clearly.