Skip to content

Drill 4: when an assumption fails

A check has come back with a problem. Name the assumption, say whether it matters, and pick the remedy, with what it changes.

Advanced ~11 min6 steps

What runs in CodeSplash

You will be able to

  • Judge whether a failed check matters at this sample size
  • Pick the standard remedy for common failures
  • State what the remedy changes

Read first

01

Three questions, every time

Read

When a row turns amber or red, ask in order:

  1. What does it threaten? The estimate, or only its standard error?
  2. How bad is it, at this sample size? Read the plot, not only the p-value.
  3. What is the smallest remedy that fixes it? And what does that remedy change?

Many remedies only fix the standard error, and leave the estimand alone. Those are the cheap ones, so try them first.

02

Round one

Checkpoint

Check yourself

Two groups, nn = 12 and 60. The small group has three times the spread. You planned Student's t. What should you do?

Show the answer

Answer: a

Student's test can be badly off when variances and sizes differ together, especially when the small group is the noisy one. Welch fixes this at almost no cost.

Check yourself

A 2×2 table has an expected count of 2.1. What should you do?

Show the answer

Answer: b

Small expected counts break the approximation, not the question. An exact test answers the same question without it.

Check yourself

Repeated-measures ANOVA with four time points. Mauchly's test flags sphericity, and ε is well below 1. What should you do?

Show the answer

Answer: a

The correction lowers the degrees of freedom to reflect unequal variance of differences. A mixed model can represent the covariance directly.

Check yourself

In a linear regression, the residuals fan out as fitted values rise. You care about the coefficient on price. Which is the smallest remedy?

Show the answer

Answer: b

Heteroskedasticity mainly damages standard errors, so HC3 fixes those and leaves the estimate alone. A log outcome changes the interpretation to percentages.

03

Round two

Checkpoint

Check yourself

A Cox model. Schoenfeld residuals show treatment's hazard ratio changes over time. What should you do?

Show the answer

Answer: b

Non-proportional hazards change what a single hazard ratio means. These remedies change what you are estimating, so state it.

Check yourself

Daily sales regression. Durbin–Watson flags positive autocorrelation in the residuals. What should you do?

Show the answer

Answer: b

Autocorrelated errors make ordinary standard errors too small. Shuffling destroys the time structure and hides the problem.

Check yourself

A Poisson model's variance is much larger than its mean. What should you do?

Show the answer

Answer: b

Overdispersion means Poisson standard errors are too small. A negative binomial adds a dispersion parameter and keeps the rate-ratio meaning.

Check yourself

n=8,000n = 8{,}000 in each group. Shapiro–Wilk rejects, and the Q–Q plot shows a slight S-curve. You are comparing means. What should you do?

Show the answer

Answer: c

The check is too powerful at this size. Means don't need normal data in large samples, and switching would change your estimand for no gain.

04

The one that can't be repaired

Predict

Predict first

An outcome was measured only on patients who survived to the end of a study, and the survivors differ by treatment. Which remedy helps?

Robust standard errorsA transformNeither fixes this
Reveal

Neither fixes this. Selection on survival isn't a violation that a technique can repair, because it changes who you are comparing. It is a design problem: go back to the question, consider a method for truncation by death, and talk to a statistician.

05

Practice on a card

In the app

Fit a regression with diagnostics set to full on one of your datasets. For each amber or red row, answer the three questions before you open its remedies. Then run one remedy and read its badge.

06

Recap

Recap
  • Ask what it threatens, how bad it is, and what the smallest fix is.
  • Many fixes only change the standard error, so start there.
  • Some problems come from the design, and no technique can repair them.

Concepts in this lesson