MakarovSuites
English
EnglishDeutschРусскийУкраїнськаFrançaisEspañolItalianoPolski
Contact & licences

Math

The average settles, the count does not

A chain you can read - outcome, sum, mean - and two charts on one log-n axis with one cursor: the mean's deviation walks into a funnel of ±2σ/√n, while the excess count S_n − nμ grows like √n and never settles. Predict first whether the excess goes to zero too, then let the run climb; six other runs under the same conditions stand beside it. A forced streak is forgotten by the mean and kept by the count; for the coin the numbers are exact from the binomial; and a Cauchy source, which has no mean, never settles at all.

The average settles, the count does not — Actual application image
Actual application image

What happens

Toss a coin a thousand times and the fraction of heads is near one half; toss it a million times and it is nearer. That is the law of large numbers, and it is more precise than it sounds: the fraction converges as 1/√n, and the band the panel draws holds the running mean about 95 % of the time. But the excess of heads over tails does not shrink - it grows, as √n, and a streak of ten heads forced at the start is still there, uncorrected, thousands of tosses later. The law is about fractions, not counts. Toss, watch the mean settle and the pile of excess climb, then force a streak.

Equations used in the module
Equations
running mean m_n = S_n/n → μ, scatter σ/√n
excess S_n − nμ: scatter σ√n - it GROWS
fair coin: E|S_n − n/2| = √(n/2π)
Chebyshev: P(|m_n − μ| ≥ kσ/√n) ≤ 1/k²

Related experiments

Back to catalogue
Ninety-five times out of a hundred — Actual application image

Math

Ninety-five times out of a hundred

Inspect the observations behind a confidence interval. Repeat the experiment and compare coverage and width of methods on the same samples.

The p-value, and how to fool yourself with it — Actual application image

Math

The p-value, and how to fool yourself with it

Two thousand experiments ask whether a mean is zero; the share that rejects at α = 0.05 is counted. With no effect it is 5 % - the type I rate - and the p-values are uniform. With an effect it is the power, which rises with the effect and with n: half a σ is found 32 % of the time with ten observations and 82 % with thirty-four. Look at the data every five observations and stop when p dips below 0.05, and the false positive rate is a quarter. Everything is counted; Student's curve comes from the code.

Three answers people refuse — Actual application image

Math

Three answers people refuse

Monty Hall: switching wins 2/3 - and only 1/2 if the host did not know where the prize was, though he opened the same door. The two children: 'at least one is a boy' makes two boys 1/3, 'the older is a boy' 1/2, 'a boy born on a Tuesday' 13/27. Bertrand's chord: a random chord is longer than the triangle's side with probability 1/3, 1/2 or 1/4, depending on what 'random' means. Every answer is an exact fraction and a count over twenty thousand seeded trials, and the picture shows the procedure that produced it.