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
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | from the features used | Card title. |
| model | string | "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). |
| data | object | number[] | string | per 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. |
| sigma | number | 1 | Known standard deviation for the normal model. |
| curve | string | "likelihood" | Initial curve: likelihood L, log (log-likelihood) or relative (L / L at the MLE). The learner can switch. |
| theta | number | a value away from the MLE | Initial position of the draggable parameter value (the null value theta0 when tests or compareDesigns are on). |
| compare | [number, number] | null | null | Two draggable parameter values theta1, theta2 with the likelihood ratio L(theta1)/L(theta2) read out. |
| benchmarks | number[] | [] | Evidence thresholds for the likelihood ratio, e.g. [8, 32] (Royall: weak / fairly strong / strong). |
| tests | string[] | [] | Test statistics at the marked null value: any of wald, lr, score (chi-squared, 1 df, with p-values). |
| intervals | string[] | [] | Intervals drawn under the curve and read out: any of wald, lr (likelihood ratio / profile), score (Wilson for the binomial). |
| level | number | 0.95 | Confidence level for intervals and the LR cut-off line. |
| showMle | boolean | true | Mark the MLE on the curve. |
| showScore | boolean | true | Log view: draw the tangent at the marked value, whose slope is the score U (learner toggle). |
| showQuadratic | boolean | false | Log view: overlay the quadratic approximation with curvature I(MLE) (learner toggle). |
| includeConstant | boolean | false (true with compareDesigns) | Include the factor not involving the parameter (binomial coefficient, 1/prod x_i!, normal constant) in L (learner toggle). |
| showArea | boolean | false | Shade and report the integral of L over the parameter space, which need not be 1 (learner toggle). |
| compareDesigns | boolean | false | Binomial/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. |
| editable | boolean | true | Show the data editor (sliders, clickable 0/1 outcomes or a text list). |
| trueTheta | number | null | null | Repeated-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. |
| draws | number | 0 | Repeated-sample mode: number of samples (seeded) already drawn when the component loads, so the faint earlier curves and score averages show at once. |
| seed | number | string | 1 | Seed for repeated-sample draws. |
| xRange | [number, number] | from the data | Parameter axis range. |
| controls | string[] | all controls shown | Ids 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. |
PreviousNext