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

PropTypeDefaultDescription
titlestringdepends on modeTitle bar text.
modestring"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).
estimatenumber52.5Point estimate theta-hat (a ratio > 0 when scale is log). If omitted, the midpoint of interval (geometric midpoint on the log scale).
senumber2Standard error of the estimate (of its natural log when scale is log). If omitted: sigma / sqrt(n), else derived from interval and level.
sigmanumbernoneKnown population standard deviation; with n gives se = sigma / sqrt(n). Needed for an n slider.
nnumbernoneSample size, used with sigma (or with se, to infer sigma for an n slider).
intervalnumber[]noneA published interval [lower, upper] at the given level; used for whatever of estimate / se is missing (both endpoints > 0 on the log scale).
levelnumber0.95Confidence level 1 - alpha (0.5 to 0.9999; 95 is read as 0.95). The test uses alpha = 1 - level.
dfnumbernone (normal z reference)Degrees of freedom: use the t distribution for the critical value and p-value instead of z.
alternativestring"two-sided"Test view only. greater: lower confidence bound L, reject H0 when theta0 < L. less: upper bound U, reject when theta0 > U.
nullValuenumber50 in the bare render, else 0 (1 on the log scale)Starting position of the draggable null value theta0 (test view).
marginnumbernone (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).
betterDirectionstring"higher"Which direction of theta is the benefit (practical and noninferiority views). lower mirrors the zones, e.g. for a risk or hazard ratio.
parameterstring"\\theta"TeX symbol of the parameter, e.g. "\\mu", "p", "\\mu_1 - \\mu_2"; labels show theta-hat, theta_0 with it.
scalestring"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.
axisstring"log"Starting axis when scale is log.
tablenumber[][]none2x2 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).
measurestring"odds-ratio" with a tableodds-ratio or risk-ratio (from table, or naming a ratio given by estimate / interval; both set scale log); difference = linear scale.
parametersobject[][{name: "level", min: 0.8, max: 0.99, step: 0.01}] in the test view, else noneSliders, 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.
showPValueCurvebooleantrue in the test viewTest view: plot the p-value against theta0 above the number line, with alpha marked; it crosses alpha at the interval's endpoints.
dragstring"null" in the test view, else "estimate"What the learner drags: null (theta0, test view), estimate (moves the whole interval) or none.
domainnumber[]autoAxis range [min, max] (positive on the log scale).
controlsstring[]all controls shownIds 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.