Drill 5: everything, mixed
The final drill crosses tests, models, time series, experiments, causal questions and machine learning. Choose a method, and a page in CodeSplash to run it on.
What runs in CodeSplash
- Equivalence and minimal-effect tests (TOST) Verified in Python and R
- A/B test analysis — SRM check, lifts, CUPED, guardrails and a Bayesian view Verified in Python and R
- Difference-in-differences (2 × 2, two-way fixed effects, event study) Verified in Python and R
- ARIMA Verified in Python and R
- Monotonic trend tests (Mann–Kendall family) Verified in Python and R
- Meta-analysis (pool studies, heterogeneity) Verified in Python and R
- k-means clustering Verified in Python and R
- XGBoost Verified in Python and R
- Pairwise comparisons (Tukey, Games–Howell, Dunnett, Dunn, Steel–Dwass …) Verified in Python and R
- Tests of circular uniformity (Rayleigh, V, Kuiper, Watson, Rao) Verified in Python and R
- Power analysis — t tests Verified in Python and R
- Cox proportional hazards regression Verified in Python and R
You will be able to
- Choose across the whole guide from a short description
- Name the page in CodeSplash that handles the question
- Spot when a question needs a design rather than a test
Read first
Across the whole map
ReadEarlier drills stayed inside statistics. Now the choice includes pages other than Analyze.
| If the question is… | Often it goes to |
|---|---|
| A test or a model you can explain | Analyze |
| A score for new cases | Model |
| Groups or structure with no outcome | Discover |
| What comes next in a series | Forecast, Series lab |
| Did this change work, in an experiment | Studios → A/B tests |
| Did this cause that, without an experiment | Studios → Causal |
| Many studies together | Studios → Meta-analysis |
Round one
CheckpointCheck yourself
A new, cheaper assay must give the same results as the current one, within a margin agreed with the lab. Which approach fits?
Show the answer
Answer: b
"Same within a margin" is an equivalence claim. A large p-value doesn't show sameness. If paired on samples, add a method-comparison analysis.
Check yourself
You randomized users to two checkouts and want a go or no-go, with guardrail metrics and a plan set in advance. Where should you do this?
Show the answer
Answer: a
An A/B test is more than one test: sample ratio checks, guardrails, peeking rules and a decision. The studio keeps those together.
Check yourself
A state raised its minimum wage in 2022, and neighboring states didn't. You have county employment by year. What was the effect?
Show the answer
Answer: c
No randomization, but a comparison group and a before and after. The design's key assumption is parallel trends, and an event-study plot lets you examine it.
Check yourself
Monthly sales for 8 years. What will the next 12 months be, and how uncertain is that?
Show the answer
Answer: b
Forecasting needs time-ordered validation and a naive baseline. A model that can't beat seasonal naive shouldn't be deployed.
Round two
CheckpointCheck yourself
Forty years of annual river flow, serially correlated. Is there a monotonic trend?
Show the answer
Answer: b
Trend tests for series handle non-normality and, with a correction, serial dependence. Sen's slope gives the size.
Check yourself
Twelve published trials report a treatment effect and its standard error. What is the overall effect, and do trials differ?
Show the answer
Answer: c
Weight by precision, measure heterogeneity, check publication bias. Counting significant results is one of the misinterpretations in this track.
Check yourself
No labels. A retailer wants customer groups to design campaigns around. Which approach fits?
Show the answer
Answer: b
No outcome, so nothing to predict. Clusters must be useful and stable. Testing differences between clusters on the features that defined them is double-dipping.
Check yourself
Which customers will churn next month, so that retention can call them? You have thousands of rows and a mix of features.
Show the answer
Answer: b
This is prediction for new cases. Time-ordered validation avoids leakage, and the threshold comes from what a call costs and what a saved customer is worth.
Round three
CheckpointCheck yourself
Wind directions at two sites. Do they differ? A colleague proposes a t test on degrees.
Show the answer
Answer: b
Angles wrap around, so ordinary means can be wrong. In CodeSplash, the Directions & cycles card leads to circular.* methods.
Check yourself
You are planning a trial, and want to know how many patients to enrol to detect a 5-point difference. Which comes first?
Show the answer
Answer: b
The Plan a study card leads to the right calculator. Decide the smallest effect of interest before you compute anything.
Check yourself
After a significant ANOVA across six regions, you want to know which regions differ, with roughly equal variances. Which fits best?
Show the answer
Answer: b
All pairs and equal variances. Dunnett needs a single reference group, and unadjusted tests ignore the family.
When it isn't a test at all
ReflectSome questions can't be answered by choosing better. "Will this work if we roll it out?" needs a design. "Why did sales fall?" may have no single answer in your data.
Think of a question someone asked you recently. Does your data contain what would answer it? If not, what would you need to collect, and from whom?
Run one for real
In the appPick the round three question closest to your work, and follow it through to a result. Compare what you predicted with what the app suggests.
Recap
Recap- Explanations go to Analyze; predictions go to Predict; structure goes to Discover; what comes next goes to Forecast.
- Experiments and causal questions need designs, and their studios keep that design with the analysis.
- Knowing when your data can't answer the question is part of choosing.