Teaching labs
80 English labs in four courses. Each lab pairs an economic question with equations, a synthetic Excel dataset and a complete Python analysis you can run in OpenEconometrics. All material is original and free under Apache 2.0.
- Download the lab's Excel workbook and keep its file name.
- Import the workbook into OpenEconometrics.
- Open the lab's Python file in a new document and run the whole file.
Student editions include an offline course, a reading PDF, workbooks, scripts, figures and LaTeX tables. Instructor editions add worked answers. See the release on GitHub
Econometrics
Regression, policy evaluation and introductory time series. 20 labs.
- 01HandoutPythonExcel
The Economic Question Comes First
Research questions, observational units, data types and study design.
- 02HandoutPythonExcel
A First Look at Wages
Descriptive statistics, distributions and clear exploratory plots.
- 03HandoutPython
What Changes Across Random Samples?
Sampling variation, standard errors and the central limit theorem.
- 04HandoutPythonExcel
Does Class Size Predict Test Scores?
Simple OLS with robust inference.
- 05HandoutPythonExcel
How Precise Is Our Estimate?
Confidence intervals, t tests and the difference between precision and importance.
- 06HandoutPythonExcel
What Changes When We Add Controls?
Multiple regression, omitted variable bias and same-sample comparisons.
- 07HandoutPythonExcel
Do Groups Have Different Wage Profiles?
Indicator variables, interactions and conditional comparisons.
- 08HandoutPythonExcel
Modeling Percentage Changes and Curvature
Log transformations, polynomial terms and interpretation.
- 09HandoutPythonExcel
Same Coefficient, Different Standard Error?
Heteroskedasticity and robust covariance estimation.
- 10HandoutPythonExcel
Testing Several Claims Together
Joint restrictions, F/Wald tests and specification questions.
- 11HandoutPythonExcel
Comparing Firms to Themselves
Panel data, fixed effects and cluster-robust uncertainty.
- 12HandoutPythonExcel
Explaining Labor-Force Participation
Linear probability, logit/probit models and marginal effects.
- 13HandoutPythonExcel
Estimating Effects with an Instrument
IV/2SLS, relevance, exclusion and weak-instrument limitations.
- 14HandoutPythonExcel
Evaluating a Randomized Training Program
Random assignment, treatment contrasts and uncertainty.
- 15HandoutPythonExcel
Before and After a Policy Reform
Difference-in-Differences, parallel trends and treatment-unit clustering.
- 16HandoutPythonExcel
What Happens Around an Eligibility Cutoff?
Regression discontinuity, bandwidths, continuity and local effects.
- 17HandoutPythonExcel
The Trap of Trending Series
Stationarity, unit roots and spurious regression.
- 18HandoutPythonExcel
Accounting for Persistent Shocks
Serial correlation and HAC inference.
- 19HandoutPythonExcel
Forecasting Inflation Without Looking Ahead
Autoregressive models, time-ordered evaluation and forecast errors.
- 20HandoutPythonExcel
From Research Question to Finished Report
Capstone: design, data, estimation, diagnostics and reproducible reporting.
Statistics
Data, probability, sampling, intervals, tests and reporting. 20 labs.
- 01HandoutPythonExcel
What Does One Row Represent?
Observational units, measurement scales and missing values.
- 02HandoutPythonExcel
Which Average Answers the Question?
Mean, median, geometric mean and the influence of a tail.
- 03HandoutPythonExcel
How Variable Are Delivery Times?
Sample variance, standard deviation, IQR and rescaling.
- 04HandoutPythonExcel
Which Denominator Belongs in a Probability?
Joint, marginal and conditional event frequencies.
- 05HandoutPythonExcel
What Does a Quality Alert Tell Us?
Bayes theorem, sensitivity, specificity and base rates.
- 06HandoutPythonExcel
How Many Orders Arrive in Ten Offers?
Binomial probabilities, expectation and variance.
- 07HandoutPythonExcel
From Parcel Weights to Standard Scores
Normal models, standardization and model versus observed tails.
- 08HandoutPythonExcel
Why Do Averages Vary Less Than Observations?
Repeated sampling, standard errors and the CLT.
- 09HandoutPythonExcel
What Does a Confidence Interval Cover?
Student-t intervals, coverage and interval width.
- 10HandoutPythonExcel
Is the Filling Process Centered on Its Target?
Null hypotheses, t statistics, p values and practical importance.
- 11HandoutPythonExcel
How Uncertain Is an Opt-In Rate?
Proportion z tests, Wald and Wilson intervals.
- 12HandoutPythonExcel
Comparing Two Delivery Methods
Independent samples, Welch uncertainty and group order.
- 13HandoutPythonExcel
The Same Workers Before and After
Pairing, complete pairs and the variance of differences.
- 14HandoutPythonExcel
Did Two Messages Produce Different Response Rates?
Pooled null tests, unpooled intervals and percentage points.
- 15HandoutPythonExcel
Do Study Hours and Scores Move Together?
Pearson correlation, common samples and noncausal association.
- 16HandoutPythonExcel
Are Shopping Channels and Membership Independent?
Expected counts, Pearson chi-square and association size.
- 17HandoutPythonExcel
Comparing Three Training Formats
Between/within variation, ANOVA F and adjusted comparisons.
- 18HandoutPythonExcel
Comparing Ordinal Customer Ratings
Midranks, ties, rank-sum tests and probability of superiority.
- 19HandoutPythonExcel
Resampling the Observed Baskets
Nonparametric bootstrap, Monte Carlo error and percentile intervals.
- 20HandoutPythonExcel
From a Question to a Statistical Report
Primary outcomes, missingness, uncertainty and multiple testing.
Microeconomics
Consumer choice, production, markets, strategic interaction and welfare. 20 labs.
- 01HandoutPythonExcel
Scarcity and Increasing Opportunity Cost
Why does producing more of X require an increasing sacrifice of Y?
- 02HandoutPythonExcel
Comparative Advantage and Trading Prices
Can both economies gain from trade even when productivity comparisons differ by good?
- 03HandoutPythonExcel
Market Equilibrium and a Demand Shift
How does a demand shift differ from moving along a demand curve?
- 04HandoutPythonExcel
Point Elasticity and Total Revenue
When does raising price increase revenue?
- 05HandoutPythonExcel
A Budget Line and Cobb–Douglas Choice
How do preferences and a budget determine a consumption bundle?
- 06HandoutPythonExcel
Income and Price Comparative Statics
What changes when income rises, and what changes when only one price rises?
- 07HandoutPythonExcel
Separating Substitution and Income Effects
How much of a price response reflects substitution rather than lost purchasing power?
- 08HandoutPythonExcel
Affordability and Revealed Preference
What can observed choices reveal when another bundle was affordable?
- 09HandoutPythonExcel
Marginal Product and Labor Demand
When should a firm stop adding labor to a fixed technology?
- 10HandoutPythonExcel
Total, Average and Marginal Cost
Why does marginal cost cross average cost at its minimum?
- 11HandoutPythonExcel
Cost Minimization with Two Inputs
How can a firm produce a fixed output at minimum cost?
- 12HandoutPythonExcel
Competitive Supply and Shutdown
Why might a firm produce while making a loss?
- 13HandoutPythonExcel
Monopoly Output, Markup and Welfare
Why does a monopolist restrict output relative to a competitive benchmark?
- 14HandoutPythonExcel
A Binding Price Ceiling and Rationing
How can a lower legal price reduce total gains from trade?
- 15HandoutPythonExcel
A Unit Tax: Incidence and Deadweight Loss
Who bears a tax when the legal remitter is the seller?
- 16HandoutPythonExcel
A Producer Subsidy and Overproduction
Can buyers and sellers both gain while total surplus falls?
- 17HandoutPythonExcel
An External Cost and a Corrective Tax
How does an unpriced external cost change efficient output?
- 18HandoutPythonExcel
Vertical Summation for a Public Good
Why are public-good marginal benefits added vertically?
- 19HandoutPythonExcel
Cournot Competition and the Number of Firms
How does strategic quantity competition change with the number of firms?
- 20HandoutPythonExcel
From a Demand Model to an Estimated Elasticity
How can a log-demand coefficient be interpreted without confusing identification and fit?
Advanced Econometrics
Projection algebra, covariance, panel transformations, IV, likelihood and dynamic responses. 20 labs.
- 01HandoutPythonExcel
The Frisch–Waugh–Lovell Identity
Why can residualizing both outcome and exposure recover a controlled regression slope?
- 02HandoutPythonExcel
An Exact Sample Omitted-Variable Decomposition
How does omitting a correlated control change a regression coefficient?
- 03HandoutPythonExcel
Measurement Error and Attenuation
Why can noisy exposure measurement shrink an ordinary regression slope?
- 04HandoutPythonExcel
Collinearity, Coefficients and Stable Combinations
Why can individual slopes be uncertain while their sum is estimated well?
- 05HandoutPythonExcel
Leverage and Leave-One-Out Sensitivity
How do unusual predictor values affect a fit and its uncertainty?
- 06HandoutPythonExcel
Known Variance Weights and WLS
How do inverse-variance weights change a least-squares fit?
- 07HandoutPythonExcel
Clustered Errors and the Sampling Unit
Which observations provide independent information when errors share a group shock?
- 08HandoutPythonExcel
Serial Dependence and HAC Covariance
How can uncertainty account for correlated scores over time?
- 09HandoutPythonExcel
Joint Wald Restrictions with Robust Covariance
Why is a joint test different from reading two individual p values?
- 10HandoutPythonExcel
Delta-Method Inference for a Coefficient Ratio
How should uncertainty be propagated through a nonlinear function of coefficients?
- 11HandoutPythonExcel
Specification Changes and Common Samples
When coefficients change after adding a control, how much came from changing rows?
- 12HandoutPythonExcel
Centering a Polynomial without Changing Its Fit
Why does centering change coefficients while leaving a polynomial fit unchanged?
- 13HandoutPythonExcel
Fixed Effects as Dummies and Within Variation
How do unit dummies recover the same slope as within-unit demeaning?
- 14HandoutPythonExcel
First Differences and Their Error Structure
What does differencing remove, and what dependence can it introduce?
- 15HandoutPythonExcel
Instrumental Variables and the Projection Formula
How does an instrument isolate exposure variation that is orthogonal to the structural error?
- 16HandoutPythonExcel
Weak Relevance and IV Sensitivity
What changes when an otherwise valid instrument barely predicts exposure?
- 17HandoutPythonExcel
Logit Probabilities, Odds and Marginal Effects
Why is a logit coefficient not a probability change?
- 18HandoutPythonExcel
Poisson Rates with an Exposure Offset
How can counts from different observation exposures be compared?
- 19HandoutPythonExcel
Local Projections over Several Horizons
How can horizon-specific regressions trace the response to an exogenous shock?
- 20HandoutPythonExcel
A Reproducible Treatment-Effect Report
How should a report retain its estimand, sensitivity specifications and full evidence?