Likelihood Curve Explorer

The learner edits the observed data under a one-parameter model (binomial, Bernoulli, Poisson, exponential, normal mean) and drags parameter values along the likelihood, log-likelihood or relative-likelihood curve, reading off the MLE, likelihood ratios with evidence benchmarks, the score tangent and information, Wald / score / likelihood-ratio tests and intervals, the area under L, two proportional stopping-rule likelihoods, and score behaviour over repeated random samples.

Used in: Introduction to Statistics

Props

PropTypeDefaultDescription
titlestringfrom the features usedCard title.
modelstring"binomial"binomial (count of successes; L includes C(n,x) when includeConstant), bernoulli (an editable 0/1 sequence), poisson (rate lambda), exponential (rate lambda) or normal (mean mu, known sigma).
dataobject | number[] | stringper model (binomial: 7 of 10)Observed data. Binomial/bernoulli: {successes, n}, {successes, failures} or a 0/1 list. Poisson: non-negative integers. Exponential: positive values. Normal: any numbers. A comma-separated string also works.
sigmanumber1Known standard deviation for the normal model.
curvestring"likelihood"Initial curve: likelihood L, log (log-likelihood) or relative (L / L at the MLE). The learner can switch.
thetanumbera value away from the MLEInitial position of the draggable parameter value (the null value theta0 when tests or compareDesigns are on).
compare[number, number] | nullnullTwo draggable parameter values theta1, theta2 with the likelihood ratio L(theta1)/L(theta2) read out.
benchmarksnumber[][]Evidence thresholds for the likelihood ratio, e.g. [8, 32] (Royall: weak / fairly strong / strong).
testsstring[][]Test statistics at the marked null value: any of wald, lr, score (chi-squared, 1 df, with p-values).
intervalsstring[][]Intervals drawn under the curve and read out: any of wald, lr (likelihood ratio / profile), score (Wilson for the binomial).
levelnumber0.95Confidence level for intervals and the LR cut-off line.
showMlebooleantrueMark the MLE on the curve.
showScorebooleantrueLog view: draw the tangent at the marked value, whose slope is the score U (learner toggle).
showQuadraticbooleanfalseLog view: overlay the quadratic approximation with curvature I(MLE) (learner toggle).
includeConstantbooleanfalse (true with compareDesigns)Include the factor not involving the parameter (binomial coefficient, 1/prod x_i!, normal constant) in L (learner toggle).
showAreabooleanfalseShade and report the integral of L over the parameter space, which need not be 1 (learner toggle).
compareDesignsbooleanfalseBinomial/bernoulli: plot the fixed-n binomial likelihood and the stop-at-the-f-th-failure negative-binomial likelihood for the same data, with their constant ratio and the two one-sided p-values at the marked p0.
editablebooleantrueShow the data editor (sliders, clickable 0/1 outcomes or a text list).
trueThetanumber | nullnullRepeated-sample mode: new samples are drawn from the model at this value; earlier samples' curves stay faint and the mean and variance of the score at the marked value are compared with n I1.
drawsnumber0Repeated-sample mode: number of samples (seeded) already drawn when the component loads, so the faint earlier curves and score averages show at once.
seednumber | string1Seed for repeated-sample draws.
xRange[number, number]from the dataParameter axis range.
controlsstring[]all controls shownIds of the hideable toggles, readouts and curve options to show (see the controls registry, e.g. view.log, view.relative, readout.mle, readout.log-likelihood, toggle.area, toggle.tangent, readout.score-term, toggle.quadratic, readout.information). Core controls always show; the initial curve's option always stays. Page building fills this from the subject's topic scope.