Skip to content

Statistics for Machine Learning: Samples, Splits, and Metrics

Understand sampling, variability, train/test splits, and why an evaluation metric must match the prediction task.

Part of Data Science & Machine Learning Course

Model evaluation is a statistical estimate, not a guarantee. Its usefulness depends on how examples were collected, how data was split, and whether the metric represents the question being asked.

Sampling affects what a result represents

A sample may not reflect the population or future data. Check coverage, missing groups, time period, and collection process. Report the sample size and known limitations.

Keep evaluation data separate

Use training data to fit the model and a separate validation process to make modeling choices. Reserve a test set for a final check. If observations are time-dependent or grouped, choose a split that prevents related or future information from leaking across boundaries.

Choose metrics with the task in mind

Regression metrics summarize numeric error in different ways. Classification metrics such as precision and recall describe different error tradeoffs. There is no universally best metric; define the cost and meaning of errors first.

Report uncertainty

Small samples and noisy data produce unstable estimates. Avoid over-interpreting tiny score differences, and state what additional validation would be needed before using a model in a new setting.

Keep learning

Data Science & Machine Learning Course course Statistics and Visualization for Machine Learning guide