Module 02 Summary
What this module established
Five decisions define the analysis: outcome, predictor, grouping, unit and time window. The unit is the one that catches people — 8 rows from 3 drivers gives n = 8 or n = 3, and every standard error divides by the square root of it.
Carry forward
- pandas skips NaN in almost every aggregation without saying so. Put
countin every summary, because it reports what was actually used. duplicated()finds rows identical in every column, which repeated measurements are not. Comparelen(df)withdf[unit].nunique()instead.- statsmodels takes the alphabetically first level as the reference.
economysorts beforestandard, so a delivery model silently compares against the slowest plan. - Run the check dictionary before the test. A duplicated id or a group of three will not stop
ttest_indreturning a confident answer.
Before moving on
Move on when you can state what one row is, how many distinct units you have, and what your reference level is.
