statable Statistics for study and research

Learning lab: samples, bootstrap, random experiments and four-field table to try out

In brief

The learning lab plays through chance thousands of times and shows what comes out. It has six tabs and needs no data. Everything shown comes as a picture, a number and a sentence; nothing is saved.

The seed

All random numbers come from the seed at the top (default 1). Same seed, same numbers: this is how a run can be repeated and compared with others. “Again (new seed)” counts up by 1 and runs the open tab again. The seed is stated in every sentence. The random numbers do not match those of R or SPSS; same distribution, different numbers.

The six tabs

What “95%” means

The level belongs to the procedure, not to a single interval: in the long run such a procedure covers the true value about 95 times in 100; a single interval either covers it or not.

Wilson and the textbook formula (Wald)

Statable calculates intervals for proportions with Wilson. Textbooks often give the approximation p̂ ± z·√(p̂(1−p̂)/n) (Wald); it is the simple solution of the inequality whose exact solution is the Wilson interval. This is why the textbook number differs slightly. Example 7 of 40, 95%: Wilson [0.0875, 0.3195], textbook formula [0.0572, 0.2928]. Only in the “Confidence intervals” tab can the textbook formula be switched on for comparison; there it shows that with small n and small or large p it covers clearly less often than the level (for example n = 50, p = 5%: Wald 92.0%, Wilson 96.2%).

Limits

For specialists

Generator: mulberry32; sub-streams are mixed from (seed, running number), not “+1”. Normal values by Box-Muller, discrete distributions by inverting the distribution function from the mode outwards. Checked by properties with a fixed seed: uniformity of the generator (Kolmogorov-Smirnov), chi-square fit of the transformations to the distributions computed in R, standard error, randomization against full enumeration, coverage against the exact coverage probability (sum over dbinom). Percentile interval: quantile type 7 as in R. Bayes: pure arithmetic, checked against R and against the diagnostic accuracy from data.

Sources

Related

Open in Statable