What does Mechanics of Human Action conclude, in numbers, about “Practice and a Pre-Registered Trial”?
Answer: Each co-primary outcome is tested at two-sided α = 0.025, so that the overall type I error rate stays at or below 0.05. To detect a rise in completion from 40 % to 52 % with 90 % power needs 426 per arm; learners in arm B influence each other within groups of three, and allowing for a design effect at an intraclass correlation of 0.05 gives 469 per arm. The test score, at a difference of 0.30 standard deviations, needs fewer. The protocol plans 469 randomised per arm, 938 in all. The 40 % baseline completion and the intraclass correlation are assumptions to be checked in an internal pilot of the first 100 participants; if baseline completion is clearly different, the sample size will be recalculated before the main trial.
Scope of the numbers: This book is not psychotherapy or medical advice and makes no diagnostic or therapeutic claim. Marked boxes separate published evidence, runnable Python calculations (15 programs, all run and checked), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.30, 40, 426, 469, 52, 938
| completion 40 % | 52 %: 426 per arm, 469 with design effect 1.10 |
| completion 40 % | 55 %: 273 per arm, 301 with design effect 1.10 |
| test score d | 0.30: 276 per arm, 304 with design effect |
| test score d | 0.35: 203 per arm, 224 with design effect |
| plan | 469 randomised per arm (938 in all); everyone is tested on day 30, finished or not |
Show the full program
# Sample size for two co-primary outcomes, each tested at two-sided alpha = 0.025 (so the pair keeps 0.05):
# (1) completion of the 30-day course, a proportion; (2) blind-marked final test score, standardised.
# Learners in the teach-to-unlock arm tutor each other in small groups, so their outcomes are correlated:
# inflate by the design effect 1 + (m - 1) * ICC.
import math
from statistics import NormalDist
N = NormalDist()
def n_two_props(p1, p2, alpha, power):
za, zb = N.inv_cdf(1 - alpha / 2), N.inv_cdf(power)
pbar = (p1 + p2) / 2
num = za * math.sqrt(2 * pbar * (1 - pbar)) + zb * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))
return math.ceil((num / (p2 - p1)) ** 2)
def n_two_means(d, alpha, power):
za, zb = N.inv_cdf(1 - alpha / 2), N.inv_cdf(power)
return math.ceil(2 * ((za + zb) / d) ** 2)
deff = 1 + (3 - 1) * 0.05 # groups of 3, intraclass correlation 0.05 (assumed)
for p1, p2 in ((0.40, 0.52), (0.40, 0.55)):
n = n_two_props(p1, p2, 0.025, 0.90)
print(f"completion {100 * p1:.0f} % -> {100 * p2:.0f} %: {n} per arm, {math.ceil(n * deff)} with design effect {deff:.2f}")
for d in (0.30, 0.35):
n = n_two_means(d, 0.025, 0.90)
print(f"test score d = {d:.2f}: {n} per arm, {math.ceil(n * deff)} with design effect")
need = max(math.ceil(n_two_props(0.40, 0.52, 0.025, 0.90) * deff), math.ceil(n_two_means(0.30, 0.025, 0.90) * deff))
print(f"plan: {need} randomised per arm ({2 * need} in all); everyone is tested on day 30, finished or not")Single source and citation
Fan, Y. (2026). Classical and Statistical Mechanics of Human Action (Version 1.0.0), Chapter 8: Practice and a Pre-Registered Trial. 5D Library. https://doi.org/10.5281/zenodo.23738774
DOI: 10.5281/zenodo.23738774 · Read the monograph · 5DL-B-013 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026013,
author = {Fan, Yafu},
title = {Classical and Statistical Mechanics of Human Action},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23738774},
url = {https://doi.org/10.5281/zenodo.23738774}
}