Empirical Rule Bands
A histogram of a simulated or given data set with shaded bands x̄ ± s, ± 2s, ± 3s and the observed share inside each, set against 68%, 95% and 99.7%. The learner switches the shape (bell, skewed, bimodal, ...), grows n and redraws to see the rule hold for bell-shaped data and fail for other shapes; a Curve view shows the rule as areas under the normal curve, as on the classic slide.
Used in: Introduction to Statistics
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| controls | string[] | all controls shown | Ids of the hideable controls and text blocks to show (see the controls registry, e.g. readout.rule, legend.normal-curve, toggle.view). Core controls always show. Page building fills this from the subject's topic scope; without readout.rule a page shows the shares inside each band but no comparison with 68%, 95%, 99.7%. |
| title | string | The empirical rule: 68, 95, 99.7 | Card title. |
| view | string | sample | Starting view: 'sample' (histogram of the data with its bands and observed shares) or 'curve' (a normal curve with mean ± k sd lines and double-headed arrows labelled with the areas, like the classic slide). |
| allowViewSwitch | boolean | true | Show the Sample / Curve switch in the title bar. |
| family | string | normal | Population shape of the simulated sample: normal (bell), skewed (exponential, right tail), left-skewed, bimodal (two separated bells), uniform (flat) or heavy-tailed (t, 3 df). Ignored when `data` is given. |
| compareShapes | string[] | ["skewed", "bimodal"] | Further shapes the learner can switch to (same names as `family`). [] hides the shape switch. |
| data | number[] | (none) | A data set to show instead of a simulated sample (at least 2 values). The shape switch then offers it first, labelled `dataLabel`. |
| dataLabel | string | Data | Name of `data` in the shape switch. |
| n | number | 500 | Size of the simulated sample (10 to 5000). |
| nSlider | boolean | true | Show the n slider (simulated samples only); larger n keeps the earlier values and adds more. |
| seed | number | string | 1 | Seed of the simulated sample (same seed, same sample). 'New sample' moves on from it. |
| mean | number | 50 (simulated) / x̄ of data | Population mean of simulated samples; in the curve view, the centre of the curve. |
| sd | number | 10 (simulated) / s of data | Population standard deviation of simulated samples; in the curve view, the spread of the curve. |
| showBands | number[] | [1, 2, 3] | Which bands (k = 1, 2, 3) start shown; the learner can toggle each. |
| axisLabels | string | values (sample view) / sample (curve view) | Tick labels at mean + k sd: 'values' (numbers), 'sample' (x̄ − 2s, ...), 'population' (μ − 2σ, ...), 'words' (mean −2s, as on the slide) or 'z' (−2, ..., 2). Narrow screens stagger or shorten them. |
| percentLabels | string | rule | Curve view arrow labels: 'rule' (68%, 95%, 99.7%) or 'exact' (68.27%, 95.45%, 99.73%). |
| shade | boolean | true | Shade the nested bands. |
| showCurve | boolean | true | Sample view: overlay the normal curve with the sample's x̄ and s, scaled to the bins. |
| showTable | boolean | true | Show the table of bands (interval, share inside, rule). |
| showPopulation | boolean | false | Sample view: add a column with the population share within k sd for the chosen shape (e.g. 86.5% within 1 sd for the skewed shape). |
| showKSlider | boolean | false | Add a k slider and a green band x̄ ± ks with its share and the normal area 2Φ(k) − 1. |
| k | number | 1.5 | Starting k of the slider band (0.25 to 4). |
| showChebyshev | boolean | false | Add a column with Chebyshev's lower bound 1 − 1/k², which holds for every shape. |
| xLabel | string | (none) | Axis title ($...$ TeX allowed), e.g. 'check amount ($)'. |
| digits | number | from the scale of the sd | Decimal places of interval endpoints, x̄ and s. |
PreviousNext