Lesson 6

Exact Percent Changes in Log Models

Big question

When does the usual 100 times beta shortcut become too rough?

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 exact percent changes in log models in plain language.
  • Use quadratic term correctly in an interpretation.
  • Connect the lesson idea to a formula, graph, Python result, or real example.

Simple explanation

The shortcut works for small coefficients. For larger coefficients, use 100 times exp(beta)-1 for a one-unit change, or 100 times exp(delta)-1 for the fitted log change.

Key terms

Quadratic term
A squared regressor that lets the marginal effect of x vary with x.
Nonnested models
Models where neither specification is a restricted version of the other.
Bootstrap standard error
A standard error estimated by repeatedly resampling the data and re-estimating the statistic.

Core formula

exactpercentchange=100[exp(beta)1]exact percent change = 100[exp(beta)-1]

Use plain-language interpretation before algebra.

Example

M6_WAGE_SCALING is a synthetic teaching dataset for exact percent changes in log models. It is designed to practice exact percentage interpretation without presenting fabricated real-world empirical findings.

Interactive visual

Compare approximate and exact percentage effects across small, moderate, and large coefficients.

Original Module 6 visual for Exact Percent Changes in Log Models.

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

Exact Percent Changes in Log Models Python example

Exact Percent Changes in Log Models 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 3Run this Python instruction as part of the lesson workflow.
  3. Line 4Create or update a Python object used in the analysis.
  4. Line 5Create or update a Python object used in the analysis.
  5. Line 6Display a result so students can inspect the output.

Python walkthrough

  1. 1Load the synthetic teaching dataset from the Module 6 public data folder.
  2. 2Create transformed variables only after checking their meaning and valid support.
  3. 3Fit a regression that matches the lesson's interpretation target.
  4. 4Print coefficient or prediction summaries that students can connect to the formula.
  5. 5Use comments and output labels so no empirical result is presented without context.

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

M6_SALES_ADVERTISING

Estimated time

25 to 40 min

Packages

pandas, numpy

Expected output

Printed Python results that can be compared with the lesson explanation.

Learning goals

  • Load and inspect M6_SALES_ADVERTISING.
  • Run the Python cells connected to Level-Log and Log-Level Models.
  • Interpret the output using log models and percent changes.

Common errors

  • File not found: check that M6_SALES_ADVERTISING.csv 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_csv("/data/module-6/M6_SALES_ADVERTISING.csv")
df.head()

Interactive activity

ExactPercentChangeCalculator

Approximate versus exact percent

See when 100 times beta is close and when exp(beta)-1 is safer.

M6_WAGE_SCALING

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 main mistake to avoid in Exact Percent Changes in Log Models?

Quick quiz

What is the main mistake to avoid in Exact Percent Changes in Log Models?

Quick quiz

Why is M6_POLICY_CONTROLS a reasonable practice dataset here?

Key takeaway

Exact Percent Changes in Log Models helps students make multiple regression more flexible while keeping interpretation precise and honest.