Lecture 02 Data Preprocessing How missing values, outliers, rescaling and a log transform change a dataset — and how to tell whether a preprocessing step actually helped.
What this lecture covers: missing values, outliers, rescaling and the log transform — what each preprocessing step actually does to a distribution, and when it helps versus when it quietly distorts the data.
What to notice & try

What to notice

  • The same two students come back on several tabs: the 54 h and 64.5 h in Study hours raise the mean you would fill with from 6.86 to 8.40 h (Distribution, Statistics Comparison), inflate the std the Z-score uses (Outliers) and squeeze everyone else into three bars (Distribution).
  • The synthetic income column is shared too: Imputation Lab fills it in, Outliers flags its long tail, Distribution log-transforms it.
  • Elsewhere in the course: is a far-out dot in a scatter plot an error or a real extreme? → Lecture 1 › Scatter Plot. Why columns in different units are standardized first → Lecture 5 › PCA 2D Projection (MATH_SCALE in the code) and Parallel Coordinates › Car Data (Shared raw scale).

Try this

  1. Open Imputation Lab with Fill with mean: the mean shift is +0.00 on both rows, but the median shift is +0.06 std on the symmetric row and +0.19 std on the skewed one — three times as much.
  2. Open Missingness Pattern and switch 'Who is missing?' through its three options with Fill with mean: the gap to the true mean goes from −0.13 h to +0.64 h to +1.02 h.
Ctrl+Enter to run

No parameters for this demo.