Likelihood from coarsened observations
Build the likelihood of recorded reports, fit a hidden trial rate and audit what coarsening removes.
38 minutes · intermediate · Original Poker4Quant lessonWhat you will learn
Derive and maximize a paired-trial observed-data likelihood under count and alarm reporting, distinguishing report frequencies, hidden trial rates and boundary estimates.
Prerequisites: Testing event independence · Transforming distributions and losing information · Likelihood ratios
Specify what the instrument actually records
An invented training sensor watches eight packets. Every packet contains two independent binary trials with the same unknown success probability p, and packets are independent of each other. The number eight is fixed before observing any results. The sensor is accurate and its reporting rule is known. These are assumptions about a teaching model, not findings about actual poker hands or market observations. If trials share a hidden condition, or their rates change over time, the likelihood below needs rebuilding.
Two reporting settings answer different questions. Count mode reports zero, one or two successes per packet. Alarm mode reports only whether at least one success occurred. In alarm mode an alarm could conceal 01, 10 or 11; it does not reveal which. Write down the elementary pairs before estimating anything: 00 has probability (1−p)², each of 01 and 10 has probability p(1−p), and 11 has probability p². Add these probabilities within the report actually observed. Do not select one convenient hidden pair to represent an alarm. This observation design is part of the model, rather than a cosmetic label on the data.
Turn report probabilities into a likelihood
For count reports the three probabilities are r0=(1−p)², r1=2p(1−p), r2=p². For alarm reports they are r0=(1−p)² and rA=2p−p². Let c0,c1,c2 be count-mode frequencies summing to n. The probability of one particular ordered sequence of those reports is L(p)=r0^c0 r1^c1 r2^c2. The data remain fixed while p ranges through [0,1]. A likelihood is not a probability distribution over p, and its integral does not need to equal one. A prior would be additional input for a posterior calculation.
If only a histogram is observed, multiply that expression by n!/(c0!c1!c2!). The factor counts possible report orders and is independent of p, so it changes the probability of the recorded event but leaves the maximizing parameter unchanged. The workshop explicitly displays the ordered-sequence likelihood, avoiding an unexplained combinatorial factor. Products include a factor of one when a report occurs zero times, even at a parameter where that report has probability zero. A positive count with zero model probability instead forces the entire likelihood to zero.
Derive the estimate in count mode
Collect powers of p in the count likelihood. With s=c1+2c2 successes among 2n elementary trials, L(p)=2^c1 p^s(1−p)^(2n−s). For an interior value and both successes and failures present, log L(p)=c1 log 2+s log p+(2n−s)log(1−p). Differentiating gives s/p−(2n−s)/(1−p). Setting it to zero gives s(1−p)=(2n−s)p, hence p̂=s/(2n). The second derivative is −s/p²−(2n−s)/(1−p)², which is negative. This proves the interior stationary point is the unique maximum.
Use the original histogram (2,2,4). There are 2+8=10 successes among sixteen trials, so p̂=5/8. The fitted alarm probability is 1−(3/8)²=55/64, even though six of eight observed packets alarmed. The constrained trial model does not have to match every empirical report fraction simultaneously. Independently substitute p=5/8 into the cell probabilities: (9,30,25)/64. The ordered likelihood is (9/64)²(30/64)²(25/64)^4. This direct product must agree with 2²(5/8)^10(3/8)^6, providing a check that the factor for the two ways to obtain one success was retained.
Coarsen first, then maximize the observed likelihood
Now erase the distinction between one and two successes in those same eight packets. Only two quiet reports and six alarms remain. Let k be the number of alarms and q=1−(1−p)². The observed likelihood becomes (1−q)^(n−k) q^k. Maximization in q gives q̂=k/n by the same derivative argument. Because q increases continuously and one-to-one from zero to one as p runs from zero to one, transform back: p̂=1−√(1−k/n). For k=6,n=8 this gives q̂=3/4 and p̂=1/2. Using 6/8 as the trial estimate confuses a packet event with an elementary event.
Check without calculus at the worked value. At p=1/2 every elementary pair has mass 1/4, so an alarm has mass 3/4 and a quiet packet mass 1/4. The ordered likelihood is (1/4)²(3/4)^6=729/65536. At the naive p=3/4, quiet mass is 1/16 and alarm mass is 15/16, giving 15^6/16^8, approximately 0.00265209; the correct maximum is approximately 0.01112366. Coarsening changes the estimate from 5/8 to 1/2 for this dataset. Neither estimate is the known truth. They summarize different retained information under the stipulated model.
Audit boundaries and manipulate the report design
When all reports are quiet, the likelihood is (1−p)^(2n), maximized at p=0. When every alarm-mode report is an alarm it increases to its maximum at p=1. These are valid boundary estimates, not failed derivative calculations. They do not establish that future successes or failures are impossible. With no observed packets every p would have the same likelihood, so a unique estimate could not be justified. The activity always keeps eight reports, making its endpoint cases informative rather than empty-data cases. It shows a zero likelihood explicitly rather than attempting the logarithm of zero.
In the workshop, route each elementary pair to its reported cell, then move conserved report markers between cells. Probe candidate p values in eighths to inspect the report probabilities and ordered likelihood. Reconstruct both p̂ and its implied alarm probability; fractions and decimals are accepted, with a stated numerical tolerance. Switching from count mode to alarm mode merges the current positive reports, preserving that actual coarsening. Returning to count mode starts a clearly labeled new example because the erased split cannot be recovered. Every data or design change clears the fitted answer and feedback. Hints and reset support another attempt; drafts last for this visit and carry no account credit. This fits a parameter, not a confidence interval, calibration certificate or proof of independence. A practical analyst must validate the recording process before interpreting the fit.
Worked example
Eight independent paired packets have count histogram (2,2,4). Estimate the trial success rate before and after merging positive counts into alarms.
- Assign report probabilities ((1−p)²,2p(1−p),p²). Count 10 successes in 16 trials.
- Collect the likelihood into 4p^10(1−p)^6. The negative second derivative verifies p̂=10/16=5/8.
- Coarsen the same reports to two quiet and six alarms. Set q=1−(1−p)².
- Maximize (1−q)²q^6 at q=6/8=3/4, then invert to p̂=1−√(1/4)=1/2.
- At p=1/2, independently sum masses of 01,10,11 to get 3/4. The likelihood equals 729/65536.
- At naive p=3/4 the likelihood is 15^6/16^8, which is smaller. Keep probability of data separate from probability of a parameter.
The report design determines the likelihood. A valid fit uses only the distinctions the instrument retained.
Hands-on: Reconstruct the observed likelihood
Route hidden pairs into report cells, coarsen a conserved histogram and fit the trial rate using only retained information.
Reconstruct the observed likelihood
Eight independent packets, each with two independent trials at unknown rate p. Reports are synthetic. Route each hidden pair; transfer report markers to change the data. Candidate likelihoods refer to one ordered report sequence.
Route the hidden pairs
Pair 00
Pair 01
Pair 10
Pair 11
Conserved report histogram
Zero reports: 2
One reports: 2
Two reports: 4
Total reports: 8. These are observed report counts, not probabilities.
Probe the likelihood
Probe p: 4/8. Probabilities rounded to eight decimals.
P(Zero): 0.25000000
P(One): 0.50000000
P(Two): 0.25000000
Ordered likelihood: 6.10351563e-5
Fit the recorded data
Fractions or decimals; absolute tolerance 0.000001. The probe is exploratory and does not submit your fit.
Construct the recording rule, then fit eight reports. Draft lasts for this visit.
Common mistakes
- Treating a positive packet as exactly one elementary success.
- Plugging the alarm frequency directly into the trial probability.
- Multiplying hidden alternatives rather than summing their masses within a report.
- Normalizing a likelihood over p and calling it a posterior without a prior.
- Using an interior derivative to discard valid boundary maxima.
- Reconstructing an erased count split as if it had been observed.
Keep these ideas
- Define the recording rule before fitting.
- Sum over hidden alternatives, then multiply independent report probabilities.
- Count reports fit p=s/(2n); alarm reports fit p=1−√(1−k/n).
- A parameter-independent histogram multiplier preserves the MLE.
- A point estimate does not quantify uncertainty or validate assumptions.
Further reading
- UC Berkeley STAT 135, Lecture 10: Maximum Likelihood Estimation ↗
Read Introduction and Estimating the parameter values, including Bernoulli product likelihood, log maximization and the interior derivative. Used for the general fitting method; paired sensors, coarsening derivation, numbers and diagnostics are original. No video reviewed. Checked 2026-10-25.
- UC Berkeley STAT 135, Lecture 11: MLEs for the Multinomial ↗
Read The Multinomial Distribution and Computing the MLE, especially the histogram coefficient and fixed total constraint. Used to distinguish an ordered report likelihood from its histogram probability. Our constrained paired-trial fit and activity are original; no source exercise reused. Checked 2026-10-25.