Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 7 of 12

Simulate treatment reassignment under a null

Build a sharp-null assignment distribution and compare a seeded approximation with exact enumeration.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

Six fictional participants have measured outcomes 1, 2, 3, 6, 7 and 9 points. A randomized study assigned exactly three participants to treatment and three to control. Before inspecting a result, the investigator chose the statistic treatment mean minus control mean and decided that unusually large differences in either direction would count as evidence against no treatment effect. Why might a difference appear even if treatment changes nobody’s outcome?

Label the participants A through F in the order listed. On paper, assign A, E and F to treatment. The treatment total is 17; the remaining total is 11. Therefore the observed statistic is 17/3 − 11/3 = 2 points. Predict whether every possible reassignment would produce a difference of 2. The action here is to change labels while retaining the participants and their measured numbers, rather than generate six new people.

Predict

Under the sharp null hypothesis, treatment would change no individual participant’s outcome. This strong statement lets us reuse each observed outcome under any assignment. It differs from merely saying that the average effect is zero: positive and negative individual effects could average to zero while invalidating this fixed-outcome construction.

There are 6 × 5 × 4 / (3 × 2 × 1) = 20 equally likely treatment groups under uniform assignment of three of the six participants. If the treatment total is S, the control total is 28 − S, so the statistic is (2S − 28)/3. Predict which assignment produces the most positive difference, and explain why exchanging the treatment and control labels changes only its sign. Also predict whether sampling 100 assignments can produce 100 different groups when only 20 exist.

Experiment

The live experiment deliberately uses a different fixed dataset: 2, 4, 5, 7, 8 and 10 points. Select an observed assignment, predict whether its absolute difference is extreme, then inspect the exact reference distribution. Run the seeded assignment simulation and compare its tail fraction with exact enumeration. Repeat with a different seed, keeping the observed statistic and the two-sided rule fixed. Record the number of draws, the extreme count, and at least two assignment records.

Reassign treatments while retaining each person

Six synthetic participants have outcomes A: 2, B: 4, C: 5, D: 7, E: 8 and F: 10. Exactly three receive treatment and three control. Assume every size-three assignment was equally likely. Under the sharp null, treatment changes no participant's outcome, so each outcome stays attached to its identity when labels are reassigned.

Before simulating, fix the observed assignment and the two-sided statistic: |treatment mean − control mean|. Count assignments at least as extreme, including ties. Choosing the tail after seeing simulations would change the analysis.

Observed treatment A, B, C has sum 11; control D, E, F has sum 25. Difference = (11 − 25) / 3 = -4.6667. Exact two-sided tail: 2/20 = 0.1000.

There are 6 choose 3 = 20 equally likely treatment groups. Exchanging treatment and control is a different assignment and reverses the signed difference; it is not discarded as a duplicate.

All twenty signed assignment differencesEach numbered dot represents one equally likely assignment. Horizontal position is treatment mean minus control mean on a fixed scale from minus six to six. Filled dots meet the two-sided tail threshold; hollow dots do not. The full table gives each assignment and tail status.-6-30361234567891011121314151617181920

Dots with the same difference stack vertically so each assignment remains visible. Stack height counts assignments, and each dot has mass 1/20. The table supplies all identities and values.

Exact assignment space and sums
NumberTreatmentControlTreatment sumControl sumDifferenceIn tail?
1A, B, CD, E, F1125-4.6667yes
2A, B, DC, E, F1323-3.3333no
3A, B, EC, D, F1422-2.6667no
4A, B, FC, D, E1620-1.3333no
5A, C, DB, E, F1422-2.6667no
6A, C, EB, D, F1521-2.0000no
7A, C, FB, D, E1719-0.6667no
8A, D, EB, C, F1719-0.6667no
9A, D, FB, C, E19170.6667no
10A, E, FB, C, D20161.3333no
11B, C, DA, E, F1620-1.3333no
12B, C, EA, D, F1719-0.6667no
13B, C, FA, D, E19170.6667no
14B, D, EA, C, F19170.6667no
15B, D, FA, C, E21152.0000no
16B, E, FA, C, D22142.6667no
17C, D, EA, B, F20161.3333no
18C, D, FA, B, E22142.6667no
19C, E, FA, B, D23133.3333no
20D, E, FA, B, C25114.6667yes

This exact randomization reference depends on the stated assignment mechanism and sharp null, not a normal model. A small tail challenges that null; it does not give its probability, establish an individual effect, or justify population generalization without appropriate sampling. Different assignment restrictions require a different reference space.

State is temporary and bounded at 200 draws. Record settings, selected tail, exact comparison and trace evidence in your written response; this tool awards no mastery.

Repeated assignments are legitimate repeated simulation draws, not additional participants and not distinct new evidence about the actual treatment. The simulation samples uniformly with replacement from the 20 possible assignments. A different Monte Carlo tail fraction is computational sampling variation. It does not mean the exact finite reference distribution changed. The widget keeps the trace so you can check that the statistic follows from the selected group rather than trust a moving bar alone.

Understand

Return to the fixed worked dataset. Its 20 treatment totals can be listed without random computation:

Treatment groupTotal STreatment groupTotal S
ABC6DEF22
ABD9CEF19
ABE10CDF18
ABF12CDE16
ACD10BEF18
ACE11BDF17
ACF13BDE15
ADE14BCF14
ADF16BCE12
AEF17BCD11

For the observed difference 2, the inclusive two-sided tail consists of assignments with absolute statistic at least 2. Since ∣(2S − 28)/3∣ ≥ 2, these have S ≤ 11 or S ≥ 17. There are six on each side, so the exact tail probability is 12/20 = 0.6. This is the chance, under the sharp null and specified assignment mechanism, of a statistic at least as extreme as the observed one. It is not the probability that the null hypothesis is true, nor the probability that this particular assignment occurred.

The enumeration is exact because it includes every allowed assignment with its correct probability. A simulation of B independent assignment draws estimates that same probability by counting tail hits and dividing by B. Increasing B often stabilizes the estimate but does not repair a wrong assignment model. If the actual study randomized within pairs or assigned unequal probabilities, the reference procedure must preserve that design.

Apply

Write a short report with four separate claims: the observed difference and its units; the assignment mechanism; the null hypothesis used to hold outcomes fixed; and the conclusion justified by the reference comparison. Include the exact result and the simulation result separately. Explain why changing from a two-sided tail to a one-sided tail after seeing the sign would change the planned question.

Random assignment supports treatment comparisons for the participants under the study assumptions. It does not make those participants a random sample of a wider population. A volunteer study can have a valid randomized comparison and still lack support for population-wide claims. A large tail probability also does not prove that treatment effects are absent: six people may provide limited information. These are distinct limitations, not interchangeable disclaimers.

Continue

Save the retained assignment examples and your interpretation in the written practice response. In a new case, begin by stating what is randomized and what stays fixed. The next lesson distinguishes ordered and unordered sample spaces, the counting step that made these 20 assignments interpretable. Exact finite enumeration is a useful check on simulation, while an inspectable simulation connects the theoretical reference law to repeated computation.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Six distinct units are assigned uniformly to a treatment group of three and a control group of three. How many treatment subsets are possible?

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Synthetic treatment outcomes are 8,9,11 and control outcomes are 1,3,4. Find the treatment-minus-control mean difference.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Run RandomizationExplorer with its six fixed outcomes and three units per group. Before drawing, record the observed assignment and two-sided |difference| tail rule. Run 200 seeded draws, retain three assignment/statistic rows and the tail fraction, then compare with the exact 20-assignment reference.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

For distinct outcomes 1,3,4,8,9,11 assigned three per group, the observed treatment group is 8,9,11. Find the exact two-sided randomization fraction at least as extreme as the observed mean difference. Justify the tail count.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

A classroom volunteers for a randomized training experiment. A small simulated null-tail fraction is reported as proof that the training works for every school. Repair the conclusion and distinguish random assignment from random sampling.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

A matched-pair experiment assigns one treated unit within each pair. A simulator freely chooses half of all units as treated. Explain why its reference distribution is wrong and specify the repair.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.