Official Data
Official Data Observatory Data structures, trends, and evidence
PythonLoad official economic indicators from Ceteris Lab's server export endpoint, plot a time series, calculate growth rates, and discuss limitations.
Intermediate 25 to 40 min Related dataset: Official economic indicator pandas, numpy, matplotlibofficial data time series plot growth rates limitations
Module 0
Loading CSV Data in Python Loading CSV data in Python
PythonLoad wage_sample.csv, inspect rows, and identify variables in a DataFrame.
Beginner 15 to 25 min Related dataset: wage_sample.csv pandas, numpypandas CSV loading DataFrame preview
Module 0
Descriptive Statistics in Python Descriptive statistics in Python
PythonCalculate means, medians, standard deviations, and grouped wage summaries.
Beginner 15 to 25 min Related dataset: wage_sample.csv pandas, numpysummary statistics groupby interpretation
Module 0
Creating Simple Graphs in Python Creating simple graphs in Python
PythonCreate a scatter plot that compares education and wages.
Beginner 15 to 25 min Related dataset: wage_sample.csv pandas, numpy, matplotlibmatplotlib scatter plots visual interpretation
Module 0
Mini Python Practice Lab Mini Python practice lab
PythonRun a full beginner workflow: load, inspect, summarize, graph, and interpret.
Beginner 15 to 25 min Related dataset: wage_sample.csv pandas, numpy, matplotlibworkflow summaries graphs
Module 1
First Python Data Example First Python data example
PythonUse Python to describe the wage and education relationship without overclaiming causality.
Intermediate 25 to 40 min Related dataset: wage_sample.csv pandas, numpycorrelation grouped means careful interpretation
Module 2
Simple Regression in Python Regression in Python
PythonEstimate wage on education, draw the fitted line, and read the coefficient output with a statsmodels-compatible fallback.
Intermediate 25 to 40 min Related dataset: wage_sample.csv pandas, numpy, statsmodels, patsyOLS statsmodels-ready fitted line
Module 2
Fitted Values and Residuals Fitted values and residuals
PythonCalculate fitted wages, residuals, squared residuals, and residual plots from the wage regression.
Intermediate 25 to 40 min Related dataset: wage_sample.csv pandas, numpy, matplotlibfitted values residuals diagnostic plots
Module 2
OLS and R-squared by Formula Ordinary Least Squares intuition
PythonCompute the OLS slope, intercept, residual sum of squares, and R-squared step by step.
Intermediate 25 to 40 min Related dataset: wage_sample.csv pandas, numpy, statsmodels, patsyOLS formulas SSR R-squared
Module 2
Module 2 Regression Project Template Practice regression project
PythonA reusable project notebook students can edit to choose y and x, estimate the model, and write an interpretation.
Applied 35 to 55 min Related dataset: wage_sample.csv pandas, numpyproject workflow student template interpretation
Module 3
WAGE1 Multiple Regression Multiple Regression in Python
PythonEstimate log wage on education, experience, and tenure when the WAGE1 file is installed.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, statsmodels, patsymultiple regression WAGE1 statsmodels
Module 3
GPA1 Multiple Regression Holding Other Factors Fixed
PythonEstimate college GPA on high-school GPA and ACT when the GPA1 file is installed.
Intermediate 25 to 40 min Related dataset: GPA1 pandas, numpy, statsmodels, patsycontrols GPA1 coefficient interpretation
Module 3
Simple vs Multiple Regression Simple Regression versus Multiple Regression
PythonCompare the education coefficient before and after adding experience and tenure controls.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, statsmodels, patsysimple regression controls coefficient comparison
Module 3
Partialling-Out Demonstration The Partialling-Out Interpretation
PythonRecover a multiple-regression coefficient by using the leftover part of education after controls.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, matplotlibpartialling out residuals ceteris paribus
Module 3
Omitted-Variable Bias Example Omitted-Variable Bias
PythonCompare a short wage model with a controlled model and discuss the direction of omitted-variable bias.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, statsmodels, patsyomitted-variable bias controls interpretation
Module 3
VIF Calculation Multicollinearity and VIF
PythonCalculate variance inflation factors for education, experience, and tenure.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, statsmodels, patsyVIF multicollinearity precision
Module 3
Residuals and Fitted Values Fitted Values and Residuals
PythonCreate fitted values and residuals from a multiple-regression wage model.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, matplotlibfitted values residuals diagnostics
Module 3
R-squared Comparison Goodness of Fit in Multiple Regression
PythonCompare R-squared across nested models and separate fit from causal interpretation.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpyR-squared model comparison fit
Module 4
T Tests with WAGE1 Testing a Single Coefficient Against Zero
PythonEstimate a wage equation and test education, experience, and tenure with real t statistics.
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, statsmodels, patsyt tests WAGE1 statsmodels
Module 4
One-Sided and Two-Sided Tests One-Sided and Two-Sided Tests
PythonCompare tail choices and hypothesis wording using GPA1.
Intermediate 25 to 40 min Related dataset: GPA1 pandas, numpy, scipyone-sided tests two-sided tests p-values
Module 4
p-Values and Critical Values p-Values for t Tests
PythonUse scipy to compute p-values and critical values from the t distribution.
Intermediate 25 to 40 min Related dataset: GPA1 pandas, numpy, scipyp-values critical values scipy
Module 4
Confidence Intervals Confidence Intervals for Regression Coefficients
PythonBuild confidence intervals from estimates, standard errors, and t critical values.
Applied 35 to 55 min Related dataset: WAGE1 pandas, numpy, statsmodels, patsyconfidence intervals WAGE1 inference
Module 4
Linear Combinations Testing One Linear Combination of Parameters
PythonTest whether two coefficients are equal using WAGE2.
Intermediate 25 to 40 min Related dataset: WAGE2 pandas, numpy, statsmodels, patsylinear combinations coefficient equality t_test
Module 4
F Tests for Exclusion Restrictions F Tests for Exclusion Restrictions
PythonCompare restricted and unrestricted models and compute an F statistic.
Intermediate 25 to 40 min Related dataset: BWGHT pandas, numpy, statsmodels, patsyF tests restricted model unrestricted model
Module 4
R-Squared F Test R-Squared Form of the F Statistic
PythonUse R-squared values to compute the F statistic for valid exclusion restrictions.
Intermediate 25 to 40 min Related dataset: BWGHT pandas, numpyR-squared F statistic nested models
Module 4
General Linear Restrictions General Linear Restrictions
PythonUse statsmodels f_test for restrictions beyond simple variable exclusion.
Intermediate 25 to 40 min Related dataset: HPRICE1 pandas, numpygeneral restrictions f_test housing data
Module 4
Reporting Regression Results Reporting Regression Results Professionally
PythonAssemble coefficient, uncertainty, p-value, fit, and interpretation into a report table.
Intermediate 25 to 40 min Related dataset: CEOSAL2 pandas, numpy, statsmodels, patsyreporting regression table professional interpretation
Module 4
Applied Inference Project Applied Inference Project
PythonRun a complete inference workflow and draft a concise empirical report.
Applied 35 to 55 min Related dataset: WAGE1 pandas, numpyapplied project inference workflow reporting
Module 5
Consistency Simulation What Consistency Means
PythonSimulate OLS under exogeneity and watch estimates concentrate as n grows.
Intermediate 25 to 40 min Related dataset: SIMULATION pandas, numpy, scipyconsistency simulation large samples
Module 5
OLS Inconsistency from Endogeneity Inconsistency and Asymptotic Bias
PythonShow estimates converging to the wrong target when x and u are correlated.
Intermediate 25 to 40 min Related dataset: SIMULATION pandas, numpy, scipyinconsistency endogeneity simulation
Module 5
Omitted-Variable Inconsistency Omitted Variable Inconsistency
PythonCompare true and omitted models as sample size grows.
Intermediate 25 to 40 min Related dataset: SIMULATION pandas, numpy, scipyomitted variables probability limits simulation
Module 5
Asymptotic Normality Large-Sample Inference without Normal Errors
PythonShow coefficient distributions becoming approximately normal under several error distributions.
Applied 35 to 55 min Related dataset: SIMULATION pandas, numpy, scipyasymptotic normality CLT simulation
Module 5
Nonnormal Errors and Large-Sample Inference Large-Sample t and F Tests
PythonUse 401K to discuss bounded, nonnormal outcomes and approximate inference.
Applied 35 to 55 min Related dataset: 401K pandas, numpy, scipynonnormality large-sample tests 401K
Module 5
Standard Errors Shrink with n Asymptotic Standard Errors
PythonEstimate growing GPA2 subsamples and compare standard errors.
Intermediate 25 to 40 min Related dataset: GPA2 pandas, numpystandard errors sample size GPA2
Module 5
Histograms, Skewness, and Transformations Histograms, Normality, and Transformations
PythonCompare WAGE1 residual histograms for wage and log(wage).
Intermediate 25 to 40 min Related dataset: WAGE1 pandas, numpy, matplotlibhistograms skewness log transformations
Module 5
LM Test with CRIME1 The Lagrange Multiplier Test
PythonCompute the n-R-squared LM statistic and compare it with exclusion-test logic.
Intermediate 25 to 40 min Related dataset: CRIME1 pandas, numpy, statsmodels, patsyLM test auxiliary regression CRIME1
Module 5
Asymptotic Efficiency Simulation Asymptotic Efficiency of OLS
PythonCompare OLS with an alternative consistent estimator in simulation.
Applied 35 to 55 min Related dataset: SIMULATION pandas, numpy, scipyasymptotic efficiency simulation estimator comparison
Module 5
Applied Asymptotics Project Module 5 Applied Project
PythonPlan a complete large-sample inference workflow with simulations, diagnostics, and limitations.
Applied 35 to 55 min Related dataset: WAGE1 pandas, numpy, scipyapplied project asymptotics reporting
Module 6
Scaling and Coefficient Interpretation Why Units Matter in Multiple Regression
PythonConvert slopes across wage units and confirm that fitted relationships do not change when units are handled correctly.
Intermediate 25 to 40 min Related dataset: M6_WAGE_SCALING pandas, numpyscaling unit conversion coefficient interpretation
Module 6
Standardized Betas Standardized Coefficients
PythonCompare raw and standardized coefficients while avoiding causal importance rankings.
Intermediate 25 to 40 min Related dataset: M6_GPA_INTERACTIONS pandas, numpystandardized beta comparison interpretation
Module 6
Log Models and Percent Changes Level-Log and Log-Level Models
PythonPractice level-log, log-level, and log-log interpretations with exact percentage conversions.
Intermediate 25 to 40 min Related dataset: M6_SALES_ADVERTISING pandas, numpylog models percent changes elasticity
Module 6
Quadratic Turning Points Quadratic Terms and Turning Points
PythonEstimate a quadratic model and calculate turning points and marginal effects.
Intermediate 25 to 40 min Related dataset: M6_HOUSING_LOGS pandas, numpyquadratics turning points marginal effects
Module 6
Interaction Effects Interactions between Continuous Variables
PythonCalculate interaction-based marginal effects at meaningful values.
Intermediate 25 to 40 min Related dataset: M6_GPA_INTERACTIONS pandas, numpyinteractions dummy variables marginal effects
Module 6
Centering Interactions Centering Variables before Interactions
PythonShow how centering changes coefficient meaning while preserving fitted values.
Intermediate 25 to 40 min Related dataset: M6_GPA_INTERACTIONS pandas, numpycentering interactions collinearity
Module 6
Adjusted R-Squared and Model Comparison Adjusted R-Squared and Model Size
PythonCompare candidate specifications using adjusted R-squared and modeling logic.
Intermediate 25 to 40 min Related dataset: M6_POLICY_CONTROLS pandas, numpy, statsmodels, patsyadjusted R-squared model comparison controls
Module 6
Bad Controls and Precision Controls Over-Control and Bad Controls
PythonDistinguish harmful controls from safe precision controls.
Intermediate 25 to 40 min Related dataset: M6_POLICY_CONTROLS pandas, numpy, statsmodels, patsybad controls precision controls design
Module 6
Prediction and Prediction Intervals Prediction with Multiple Regression
PythonCreate fitted predictions and compare mean and individual prediction intervals.
Intermediate 25 to 40 min Related dataset: M6_STARTUP_PREDICTION pandas, numpyprediction prediction intervals uncertainty
Module 6
Log Prediction and Smearing Predictions when the Dependent Variable Is Logged
PythonCompare naive and smearing-adjusted retransformation from log outcomes.
Intermediate 25 to 40 min Related dataset: M6_HOUSING_LOGS pandas, numpylog prediction smearing retransformation
Module 6
Bootstrap Standard Errors Project Module 6 Applied Forecasting Project
PythonBootstrap a coefficient and write a careful interpretation with uncertainty.
Applied 35 to 55 min Related dataset: M6_WAGE_SCALING pandas, numpybootstrap standard errors project
Module 7
Binary Variables Creating Binary Variables
PythonCreate and audit binary indicators from transparent rules.
Intermediate 25 to 40 min Related dataset: MODULE7_STUDENT_COMPLETION_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Group Mean Comparisons Comparing Two Means with Regression
PythonShow how a dummy-only regression reproduces a two-group mean difference.
Intermediate 25 to 40 min Related dataset: MODULE7_WAGE_GROUPS_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Dummy Variables in Log Models Dummy Variables in Log-Dependent Models
PythonConvert log-dummy coefficients using approximate and exact percentages.
Intermediate 25 to 40 min Related dataset: MODULE7_WAGE_GROUPS_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Multiple Categories Multiple Categories
PythonEncode categories with a base group and compare coefficient meanings.
Intermediate 25 to 40 min Related dataset: MODULE7_CATEGORY_EFFECTS_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Dummy Interactions Binary by Binary Interactions
PythonInterpret binary-by-binary interactions as conditional group differences.
Intermediate 25 to 40 min Related dataset: MODULE7_WAGE_GROUPS_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Different Slopes and Centering Binary by Continuous Interactions
PythonEstimate group-specific slopes and show how centering changes the reference point.
Intermediate 25 to 40 min Related dataset: MODULE7_WAGE_GROUPS_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Chow-Style Group Difference Tests Full Regression Differences Across Groups
PythonUse interaction restrictions to test full group differences.
Intermediate 25 to 40 min Related dataset: MODULE7_WAGE_GROUPS_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Linear Probability Model Linear Probability Model
PythonEstimate an LPM and interpret coefficients as probability-point changes.
Intermediate 25 to 40 min Related dataset: MODULE7_STUDENT_COMPLETION_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
LPM Robust Standard Errors Limitations of the Linear Probability Model
PythonInspect fitted probabilities and use HC1 robust standard errors.
Intermediate 25 to 40 min Related dataset: MODULE7_LOAN_APPROVAL_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Policy Evaluation and Self-Selection Policy Evaluation and Self-Selection
PythonCompare randomized and self-selected treatment comparisons.
Intermediate 25 to 40 min Related dataset: MODULE7_PROGRAM_EVALUATION_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Discrete Dependent Variables Discrete Dependent Variables
PythonDescribe count outcomes and explain why discrete models may be needed later.
Intermediate 25 to 40 min Related dataset: MODULE7_DISCRETE_OUTCOME_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 7
Module 7 Capstone Module 7 Capstone
PythonComplete a full qualitative-variable modeling checklist.
Intermediate 25 to 40 min Related dataset: MODULE7_STUDENT_COMPLETION_SYNTHETIC pandas, numpy, statsmodels, patsydummy variables qualitative information Python statsmodels
Module 8
Simulating Heteroskedasticity What Is Heteroskedasticity?
PythonGenerate and visualize changing variance.
Intermediate 25 to 40 min Related dataset: MODULE8_INCOME_SAVINGS_SYNTHETIC pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Conventional versus Robust Standard Errors Robust Standard Errors
PythonCompare conventional, HC0, HC1, HC2, and HC3 standard errors.
Intermediate 25 to 40 min Related dataset: MODULE8_ROBUST_SE_DEMO pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Breusch-Pagan Test The Breusch-Pagan Test
PythonRun and manually audit the Breusch-Pagan workflow.
Intermediate 25 to 40 min Related dataset: MODULE8_INCOME_SAVINGS_SYNTHETIC pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
White Test The White Test
PythonUse full and fitted-value White diagnostics.
Intermediate 25 to 40 min Related dataset: MODULE8_HOUSING_VARIANCE_SYNTHETIC pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Robust Joint Tests Robust Joint Tests
PythonTest multiple restrictions with robust covariance.
Intermediate 25 to 40 min Related dataset: MODULE8_ROBUST_SE_DEMO pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Weighted Least Squares Weighted Least Squares Intuition
PythonChoose inverse-variance weights and compare OLS with WLS.
Intermediate 25 to 40 min Related dataset: MODULE8_INCOME_SAVINGS_SYNTHETIC pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Population and Group-Size Weights Group Means, Population Weights, and Aggregated Data
PythonUse group size as a precision weight.
Intermediate 25 to 40 min Related dataset: MODULE8_WLS_GROUP_MEANS pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Feasible GLS Feasible GLS
PythonEstimate a variance function and fit FGLS.
Intermediate 25 to 40 min Related dataset: MODULE8_FGLS_DEMO pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Robust Standard Errors after WLS What If the WLS Variance Model Is Wrong?
PythonCompare WLS conventional and robust standard errors.
Intermediate 25 to 40 min Related dataset: MODULE8_FGLS_DEMO pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Prediction Intervals with Changing Variance Prediction under Heteroskedasticity
PythonPlot prediction intervals under changing variance.
Intermediate 25 to 40 min Related dataset: MODULE8_HOUSING_VARIANCE_SYNTHETIC pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
LPM Robust Inference The Linear Probability Model Revisited
PythonEstimate a linear probability model with HC1 robust standard errors.
Applied 35 to 55 min Related dataset: MODULE8_BINARY_OUTCOME_LPM pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels
Module 8
Module 8 Capstone Module 8 Capstone
PythonComplete a full diagnostic and correction workflow.
Intermediate 25 to 40 min Related dataset: MODULE8_INCOME_SAVINGS_SYNTHETIC pandas, numpy, statsmodels, patsyheteroskedasticity robust standard errors Python statsmodels