Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Machine Learning Foundations for LLM Work

Free · sign in to start and track progress

1 · Learning from data

  • 1Problems, data and baselines
  • 2Train, validation, test and leakage
  • 3Loss functions and gradient descent

2 · Classifiers and generalisation

  • 4Logistic regression, step by step
  • 5Metrics, thresholds and calibration
  • 6Overfitting, regularisation and cross-validation

3 · The maths the later courses assume

  • 7Probability for evaluation
  • 8Standard errors, intervals and paired tests

    Exercise answers

    • Answer: Intervals and a paired comparison on the test tickets
    • Answer: Clustered standard errors by customer
  • 9Vectors, dot products and embeddings
  • 10A small neural network from scratch
CapstoneTicket triage you can defendReference implementation

Module 3 · The maths the later courses assume · Lesson 8

Standard errors, intervals and paired tests

How sure an eval score is, how many cases it takes to tell two systems apart, and how to compare them on the same cases without fooling yourself, worked on the keyword rule and the logistic regression from earlier lessons.

80 min 2 videos 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvThe Hollowbrook ticket data

By the end of this lesson you can

  • Compute the standard error of a proportion and of a mean, build a 95% confidence interval, and show why 30 cases cannot separate 80% from 85%
  • Build bootstrap confidence intervals for accuracy and F1 and say when the bootstrap is preferable to the normal approximation
  • State what a p-value is and is not, and run a paired comparison (paired bootstrap and McNemar's test) of two systems scored on the same cases
  • Do a back-of-envelope power calculation for the cases needed to detect a given gain at a given correlation between systems
  • Explain clustered standard errors and apply them when several eval cases share a source

On this page

  • The standard error
  • The bootstrap
  • Comparing two systems on the same cases
  • What the p-value says
  • How many cases do you need?
  • When cases share a source
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01The standard error
  2. 02The bootstrap
  3. 03Comparing two systems on the same cases
  4. 04How many cases do you need?
  5. 05When cases share a source
  6. 06Connections
  7. 07Summary

Sources & further reading

  • Adding Error Bars to Evals: A Statistical Approach to Language Model EvaluationsPaper · Miller · Anthropic · 2024The whole paper, written in eval language. Standard errors of the mean, clustered standard errors for grouped questions, paired differences for comparing models, and power analysis, each with the formula this lesson uses.
  • Position: Don't Use the CLT in LLM Evals With Fewer Than a Few Hundred DatapointsPaper · Bowyer, Aitchison, Ivanova · 2025Shows where the normal-approximation interval fails on small evals (too narrow, poking past 0 or 1) and what to use instead; section 3 has the comparisons.
  • Approximate Statistical Tests for Comparing Supervised Classification Learning AlgorithmsPaper · Dietterich · 1998The classic comparison of tests for two classifiers. Section 3 introduces McNemar's test and shows why the naive difference-of-proportions test has an inflated false-positive rate. Author-hosted PDF; the journal page is paywalled.
  • The Hitchhiker's Guide to Testing Statistical Significance in Natural Language ProcessingPaper · Dror, Baumer, Shlomov, Reichart · 2018A decision procedure for choosing a significance test for paired comparisons of text systems, with the paired bootstrap and McNemar among the options.
  • Model Evaluation, Model Selection, and Algorithm Selection in Machine LearningPaper · Raschka · 2018Tutorial-level treatment of confidence intervals for accuracy, the normal approximation and the bootstrap (sections 1 and 2), with the pessimistic bias of small test sets.
  • A statistical approach to model evaluationsLab research · Anthropic · 2024The short version of the paper above, with its five recommendations; read it first if the paper looks long.
  • An Introduction to Statistical Learning with Applications in PythonBook · James, Witten, Hastie, Tibshirani, Taylor · 2023Chapter 5, section 5.2, the bootstrap, with the standard-error estimate it produces; chapter 3 introduces standard errors and confidence intervals for a fitted quantity.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 7 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks