We leave the discrete world of counts for continuous measurement. When a quantity is the sum of many small independent influences, ability, preparation, luck on the day, it tends toward the normal distribution. Standardized test scores are the classic example.
academic_standardized_testing.csv holds exam_score for 1,000 students (plus test
center and gender). We fit the normal and use it to rank, compare, and grade.
Fit the Bell Curve
Two numbers fix a normal: the mean μ ≈ 150 and the standard deviation σ ≈ 8.4. The mean and median nearly coincide and the skewness is near zero, the symmetry that signals a normal, and the fitted bell tracks the histogram of scores.
A matching histogram is suggestive, not proof. The real test is a QQ plot, which lines the data's sorted values up against the values a perfect normal would produce: if the points hug the diagonal, the data is normal, and here they do. A formal Shapiro-Wilk goodness-of-fit test agrees (W = 0.998, p ≈ 0.20, so we cannot reject normality), with skewness 0.07 and near-zero excess kurtosis 0.19. The QQ plot is the ten-second diagnostic worth running any time a method assumes normality.
Symmetry is the normal's calling card: the mean equals the median, and roughly as many students sit a given distance above the average as below it. From here, two numbers locate every student.
The Empirical Rule & z-Scores
For any normal, 68% of values fall within 1σ of the mean, 95% within 2σ, and 99.7% within 3σ. On the real scores these come out to 69.3%, 94.8%, and 99.7%, essentially exact.
| Score | z-score | percentile |
|---|---|---|
| 135 | −1.82 | 3.5% |
| 150 (the mean) | −0.02 | 49% |
| 165 | +1.77 | 96.1% |
A z-score turns any raw score into a percentile that is comparable across exams of any scale. A 165 sits about 1.8 standard deviations above the mean, the 96th percentile; a 135 lands near the 3rd. The same score on a different test, with a different μ and σ, would map to its own z and percentile, which is exactly how scores from different years or forms are made comparable.
Setting Grade Boundaries
Grading on a curve means running the normal backward: pick a target percentile and read off the score cutoff with the inverse CDF (the percent-point function).
The top-10% cutoff is about 161 (μ + 1.28σ), and indeed roughly 10% of students clear it, the model and the data agree to within a point. The 25th-percentile cutoff is about 145. This is how standardized tests set grade bands, scholarship thresholds, and pass marks: choose a percentile, invert the CDF, and the boundary is fixed, fair and reproducible.
Run the scores analysis
The companion notebook fits the normal to the exam scores, overlays the bell on the histogram, then validates the fit with a QQ plot and a Shapiro-Wilk test, verifies the 68-95-99.7 rule on the real data, converts scores to z-scores and percentiles, and inverts the CDF to set grade boundaries, every number from code.
View opens the rendered notebook instantly (no setup). Open in Colab runs &
edits it live in your browser. To run locally, install numpy, pandas, scipy,
and matplotlib and launch jupyter notebook.
🎓 Key Takeaways
- ✓Exam scores are normal: a symmetric bell set by μ ≈ 150 and σ ≈ 8.4.
- ✓The 68-95-99.7 rule held on the real data (69.3 / 94.8 / 99.7%), confirming the fit.
- ✓z-scores (x − μ)/σ convert any score to a percentile comparable across exams.
- ✓Inverting the CDF sets grade boundaries: the top-10% cutoff is about 161 (μ + 1.28σ).
- ✓Two parameters turn a pile of scores into a fair, reproducible ranking.
Quiz: Test Yourself
Eight quick questions on the normal case study. Answer them, hit Check Answers, and keep refining until you score 100%. Your progress is saved, so you can hop back to the chapter and return anytime.