Confidence interval verdicts
A confidence interval on a number line. In the test view the learner drags the null value across it and watches the two-sided (or one-sided) test flip from 'fail to reject' to 'reject' exactly at the endpoints, where the p-value curve crosses alpha. In the practical, noninferiority and equivalence views the learner drags the estimate (or slides the SE, level or margin) and sees how the interval's position against 0 and a minimal important difference or margin decides the verdict; ratio measures can be read on log and linear axes.
Used in: Introduction to Statistics
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | depends on mode | Title bar text. |
| mode | string | "test" | test: draggable null value against the interval, with the p-value curve and the reject / fail-to-reject verdict (test-interval duality). practical: zones cut by 0 and the minimal important difference (MID) +/-margin, classified as significant-and-important, importance uncertain, significant-but-trivial, inconclusive or negligible. noninferiority: lower interval end against -margin (betterDirection higher). equivalence: the whole interval inside (-margin, margin). |
| estimate | number | 52.5 | Point estimate theta-hat (a ratio > 0 when scale is log). If omitted, the midpoint of interval (geometric midpoint on the log scale). |
| se | number | 2 | Standard error of the estimate (of its natural log when scale is log). If omitted: sigma / sqrt(n), else derived from interval and level. |
| sigma | number | none | Known population standard deviation; with n gives se = sigma / sqrt(n). Needed for an n slider. |
| n | number | none | Sample size, used with sigma (or with se, to infer sigma for an n slider). |
| interval | number[] | none | A published interval [lower, upper] at the given level; used for whatever of estimate / se is missing (both endpoints > 0 on the log scale). |
| level | number | 0.95 | Confidence level 1 - alpha (0.5 to 0.9999; 95 is read as 0.95). The test uses alpha = 1 - level. |
| df | number | none (normal z reference) | Degrees of freedom: use the t distribution for the critical value and p-value instead of z. |
| alternative | string | "two-sided" | Test view only. greater: lower confidence bound L, reject H0 when theta0 < L. less: upper bound U, reject when theta0 > U. |
| nullValue | number | 50 in the bare render, else 0 (1 on the log scale) | Starting position of the draggable null value theta0 (test view). |
| margin | number | none (a placeholder is shown in the margin modes) | The minimal important difference Delta (practical) or the noninferiority / equivalence margin delta, in the parameter's units; on the log scale a ratio such as 1.25 (zone 1/1.25 to 1.25). |
| betterDirection | string | "higher" | Which direction of theta is the benefit (practical and noninferiority views). lower mirrors the zones, e.g. for a risk or hazard ratio. |
| parameter | string | "\\theta" | TeX symbol of the parameter, e.g. "\\mu", "p", "\\mu_1 - \\mu_2"; labels show theta-hat, theta_0 with it. |
| scale | string | "linear" | log: a ratio measure (RR, OR, HR): estimate, interval, nullValue and margin are ratios, inference runs on ln(theta), the reference value is 1, and a Log / Linear axis toggle shows the interval's asymmetry. |
| axis | string | "log" | Starting axis when scale is log. |
| table | number[][] | none | 2x2 counts [[a, b], [c, d]] (rows: exposed / treated, unexposed / control; columns: event, no event). Computes the estimate and log-scale SE of measure and sets scale log (0.5 added to every cell if one is zero). |
| measure | string | "odds-ratio" with a table | odds-ratio or risk-ratio (from table, or naming a ratio given by estimate / interval; both set scale log); difference = linear scale. |
| parameters | object[] | [{name: "level", min: 0.8, max: 0.99, step: 0.01}] in the test view, else none | Sliders, as [{name, min, max, initial?, step?, label?}], name one of estimate, se, level, margin, n (n needs sigma). A missing initial starts at the prop's value. [] hides all sliders. The axis range covers every slider position, so it never jumps. |
| showPValueCurve | boolean | true in the test view | Test view: plot the p-value against theta0 above the number line, with alpha marked; it crosses alpha at the interval's endpoints. |
| drag | string | "null" in the test view, else "estimate" | What the learner drags: null (theta0, test view), estimate (moves the whole interval) or none. |
| domain | number[] | auto | Axis range [min, max] (positive on the log scale). |
| controls | string[] | all controls shown | Ids of the hideable readouts and panels to show (see the controls registry: readout.alpha, readout.p-value, readout.test-statistic, panel.p-value-curve). Core controls always show. Page building fills this from the subject's topic scope. |
PreviousNext