Knowing If It WorksLesson 21 of 76

Module 3 · Deciding whether a difference is real

Asking what pure chance would have produced

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 1 of 9 in this chapter

This chapter’s goalDecide whether an observed difference between two systems is larger than the noise in your set, compute an interval for any metric you can calculate using the bootstrap, and state in advance how many items the comparison needs to detect the effect you would act on.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
A permutation test in five stepsPer-item scoresBoth systems,the same items,the same order.Observed gapMean of B minusmean of A, say+0.050.Flip signs atrandomEach item’sdifference times±1: the same asswapping whichsystem is calledA.Repeat 10,000timesThe spread ofgaps that chancealone produces.Count the tailThe share ofshuffles atleast as largeas the observedgap.For 200 items the null gaps spread about ±0.021 either way, so an observed +0.050 is beaten by roughly1.5% of shuffles. That share is the p-value, with no table and no normality assumption.
For 200 items the null gaps spread about ±0.021 either way, so an observed +0.050 is beaten by roughly 1.5% of shuffles. That share is the p-value, with no table and no normality assumption.

Figure 3.1

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

The question under every comparison

Prompt B scores 5 points above prompt A on the same 200 items. Before anything else, one question has to be answered: if the two prompts were identical in quality, how often would a gap that big appear anyway?

There are two ways to answer it. You can look up the right named test, check its assumptions, and hope you chose correctly. Or you can build the world where the null is true and count. The second is a permutation test, it takes ten lines, and it is very hard to get wrong in a way you would not notice.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Shipping It exam.

Stuck on something?Ask Sayali, your AI tutor

How to cite: Addaly (2026) ‘Asking what pure chance would have produced’, in Knowing If It Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/evaluating-ai/simulating-the-null (Accessed: 29 November 2026).