Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Likelihoods from Simulated Observables

    A simulator predicts possible data at a chosen coupling. Inference reverses that question: which couplings remain compatible with one observed dataset? The answer depends on what was counted, what was selected, and which features of the observation apparatus are known.

    We will recover a coupling from a Poisson count and its angular distribution, then give the efficiency an independently measured nuisance parameter. An exact likelihood makes this a useful baseline for learned likelihood ratios.

    Preparation: The angular scattering and weighted-event model, elementary conditional probability and differentiation.

    Specify a distribution of observations

    Use the fixed incoming-helicity, two-body family

    h±(c)=38(1±c)2,f(c∣g)=h+(c)+g2h−(c)1+g2,−1≤c≤1,g>0.(1)h_\pm(c)=\frac38(1\pm c)^2,\qquad f(c\mid g)=\frac{h_+(c)+g^2h_-(c)}{1+g^2}, \quad -1\le c\le1,\quad g>0. \tag{1}

    Its cross section is σ0(1+g2)\sigma_0(1+g^2), where σ0=κ2/(12πs)\sigma_0=\kappa^2/(12\pi s) for amplitudes κ(1+c)\kappa(1+c) and −κg(1−c)-\kappa g(1-c). The previous article derives this normalization with no initial spin average. Fix exposure τ=Lintσ0=200\tau=\mathcal L_{\rm int}\sigma_0=200. The synthetic detection probability is

    ϵ(c∣α)=ϵ0(1+αc),ϵ0=0.7,−0.4≤α≤0.4.(2)\epsilon(c\mid\alpha)=\epsilon_0(1+\alpha c),\qquad \epsilon_0=0.7,\quad -0.4\le\alpha\le0.4. \tag{2}

    It stays between 0.420.42 and 0.980.98 over the allowed domain. Selection is independent between events. There are no backgrounds, angular smearing or correlated detector losses in this model.

    Poisson production followed by independent thinning gives a Poisson process of detected angles with intensity

    ν(c∣g,α)=τϵ0(1+αc)[h+(c)+g2h−(c)],μ(g,α)=∫−11ν(c∣g,α) dc=τϵ0A(g,α),A(g,α)=1+g2+α2(1−g2).(3)\begin{aligned} \nu(c\mid g,\alpha) &=\tau\epsilon_0(1+\alpha c)[h_+(c)+g^2h_-(c)],\\ \mu(g,\alpha)&=\int_{-1}^1\nu(c\mid g,\alpha)\,dc =\tau\epsilon_0 A(g,\alpha),\\ A(g,\alpha)&=1+g^2+\frac\alpha2(1-g^2). \end{aligned} \tag{3}

    Consequently an observation consists of

    N∼Poisson⁡(μ),c1,…,cN∣N independent withpdet(c∣g,α)=(1+αc)[h+(c)+g2h−(c)]A(g,α).(4)N\sim\operatorname{Poisson}(\mu),\qquad c_1,\ldots,c_N\mid N\ \text{independent with}\quad p_{\rm det}(c\mid g,\alpha) =\frac{(1+\alpha c)[h_+(c)+g^2h_-(c)]}{A(g,\alpha)}. \tag{4}

    The selected density is not the production density ff. Its normalizer depends on the coupling because the efficiency has angular dependence. For example, Ef(c)=(1−g2)/[2(1+g2)]\mathbb E_f(c)=(1-g^2)/[2(1+g^2)], so the mean efficiency is ϵ0[1+αEf(c)]\epsilon_0[1+\alpha\mathbb E_f(c)].

    The generator samples ff by mixing the two elementary inverse-CDF maps and applies rejection to obtain pdetp_{\rm det}. An independent check draws the production Poisson count and thins its events individually. Both constructions have the same detected count law. The retained finite-replica means and variances fluctuate around that law; they are not forced to agree exactly.

    Count and shape belong in the same likelihood

    For the observed dataset D=(N,c1,…,cN)\mathcal D=(N,c_1,\ldots,c_N), the likelihood is

    L(g,α;D)=e−μμNN!∏i=1Npdet(ci∣g,α).(5)L(g,\alpha;\mathcal D) =\frac{e^{-\mu}\mu^N}{N!} \prod_{i=1}^N p_{\rm det}(c_i\mid g,\alpha). \tag{5}

    Factors independent of the parameters can be dropped when maximizing or taking ratios. Substituting pdet=ν/μp_{\rm det}=\nu/\mu gives the equivalent log likelihood

    ℓ(g,α)=−μ(g,α)+∑ilog⁡ν(ci∣g,α)+data-only constant.(6)\ell(g,\alpha)=-\mu(g,\alpha)+\sum_i\log\nu(c_i\mid g,\alpha) +\text{data-only constant}. \tag{6}

    This cancellation is useful, but does not authorize dropping selection from the model. It cancels only because the count and conditional shape use the same selected intensity. Conditioning on the observed NN instead discards count information and leaves the product of selected densities in Eq. (4).

    The likelihood is a function of parameters for fixed data. It is not normalized as a probability density over those parameters. A simulator's random seed is an algorithmic setting, not another physical parameter to infer. The exposure, helicity preparation, coupling and efficiency have distinct roles in the generative model.

    Products of count probabilities with auxiliary measurements, and maximization over nuisance parameters, are developed in Cowan et al., §2, Eqs. (6)–(9). Our unbinned shape is the corresponding explicitly normalized continuous observation model. Cowan et al.

    An exact maximization check

    For known α\alpha, introduce t=g2t=g^2 and write ai=h+(ci)a_i=h_+(c_i), bi=h−(ci)b_i=h_-(c_i). Up to terms independent of tt,

    ℓ(t)=−τϵ0[(1+α/2)+t(1−α/2)]+∑ilog⁡(ai+tbi),ℓ′(t)=−τϵ0(1−α/2)+∑ibiai+tbi,ℓ′′(t)=−∑i(biai+tbi)2≤0.(7)\begin{aligned} \ell(t)&=-\tau\epsilon_0[(1+\alpha/2)+t(1-\alpha/2)] +\sum_i\log(a_i+tb_i),\\ \ell'(t)&=-\tau\epsilon_0(1-\alpha/2) +\sum_i\frac{b_i}{a_i+tb_i},\\ \ell''(t)&=-\sum_i\left(\frac{b_i}{a_i+tb_i}\right)^2\le0. \end{aligned} \tag{7}

    The score is monotone. Check its signs at the parameter boundaries; otherwise a bracketed root finds the unique interior maximum whenever at least one informative event gives strict concavity. This independent check is stronger than accepting a generic optimizer's success flag. If N=0N=0, the likelihood decreases with tt, and the constrained maximum is the lower boundary.

    Our fixed fitting domain is 0.2≤g≤1.60.2\le g\le1.6. The generated demonstration uses truth g=0.8g=0.8, α=0.2\alpha=0.2, for which μ=234.64\mu=234.64. The chosen independent random stream produces N=246N=246. Its results are:

    Analysis of the same observationEstimated ggSet from −2log⁡λ(g)≤1-2\log\lambda(g)\le1
    Count only, correct efficiency0.85449[0.77994, 0.92590]
    Shape only, correct efficiency0.88393[0.81447, 0.95811]
    Count and shape, correct efficiency0.86949[0.81946, 0.92001]
    Count and shape, incorrectly flat efficiency0.81294[0.76538, 0.86096]

    Here λ(g)=L(g)/L(g^)\lambda(g)=L(g)/L(\widehat g) for each specified analysis. The exact score root and generic numerical maximum agree to 1.3×10−81.3\times10^{-8} in gg. The retained direct count-times-shape and intensity log likelihoods agree within 3.5×10−133.5\times10^{-13}. Finite-difference score checks show the expected small-step rounding limitation in the second derivative; the analytic score supplies the fit.

    One realized estimate happens to lie closer to truth when the efficiency is wrong. An estimator's bias and coverage concern repeated observations, not its distance from truth in one selected dataset. The next article performs those repeated tests.

    Count and shape contain complementary information. For the Poisson process, information in tt decomposes as

    Ifull(t)=∫(∂tν)2ν dc=(∂tμ)2μ+μ∫pdet(∂tlog⁡pdet)2 dc.(8)\mathcal I_{\rm full}(t) =\int\frac{(\partial_t\nu)^2}{\nu}\,dc =\frac{(\partial_t\mu)^2}{\mu} +\mu\int p_{\rm det}(\partial_t\log p_{\rm det})^2\,dc. \tag{8}

    The cross term vanishes because the expectation of the normalized shape score is zero. At the stated truth, independent quadrature gives 149.05426=67.66110+81.39317149.05426=67.66110+81.39317. These are information values with respect to tt; conversion to gg multiplies by (2g)2(2g)^2. They describe the local large-sample curvature, not an exact finite-sample interval.

    Measure an efficiency nuisance instead of fixing it away

    Suppose ϵ0\epsilon_0 is known, while α\alpha must be calibrated. Send 200 independently prepared probes at each known angle c=+1c=+1 and c=−1c=-1. The two accepted counts obey

    K±∼Binomial⁡(200,ϵ0(1±α)).(9)K_\pm\sim\operatorname{Binomial} \bigl(200,\epsilon_0(1\pm\alpha)\bigr). \tag{9}

    This deliberately simple calibration model shares the same efficiency as the main observation. The retained sample has K+=167K_+=167, K−=117K_-=117. Multiply both binomial probabilities into Eq. (5). The joint fit gives

    g^=0.86366,α^=0.18089.(10)\widehat g=0.86366,\qquad \widehat\alpha=0.18089. \tag{10}

    To test a particular gg, maximize the joint likelihood over α\alpha at that gg:

    λprof(g)=L(g,α^g;D,K+,K−)L(g^,α^;D,K+,K−).(11)\lambda_{\rm prof}(g) =\frac{L(g,\widehat\alpha_g;\mathcal D,K_+,K_-)} {L(\widehat g,\widehat\alpha;\mathcal D,K_+,K_-)}. \tag{11}

    The set defined by −2log⁡λprof≤1-2\log\lambda_{\rm prof}\le1 is [0.81314,0.91479][0.81314,0.91479]. Maximization over an unknown nuisance uses a different question from averaging it with a prior. The auxiliary binomial likelihood is actual calibration data in this example, not a Gaussian penalty invented after looking at the main sample.

    Likelihood-ratio curves for known, calibrated and incorrectly flat efficiencies, using the same 246-event synthetic observation.

    Each curve is measured from its own likelihood maximum, so parameter-independent normalization constants do not affect the comparison. The dotted vertical line is the generating coupling; horizontal lines mark the asymptotic one- and 3.84146-unit thresholds. The incorrectly flat model happens to peak closer to truth in this one observation, which does not establish good repeated-data performance.

    Thresholds 1 and 3.84146 are the asymptotic 68.27% and 95% quantiles of a one-degree-of-freedom chi-square law for the two-sided likelihood-ratio statistic. Interior identifiability, regularity and adequate information matter. Boundaries and small counts can invalidate that approximation; our N=0N=0 example shows why an interior Gaussian argument cannot be universal. Cowan et al., §3.1, Eqs. (17)–(20), state the large-sample approximation. This single nuisance fit is not a measured coverage study. Cowan et al.

    A posterior needs a prior measure

    For known α\alpha and a prior density π(g)\pi(g) on the specified domain,

    p(g∣D)=L(g;D)π(g)∫0.21.6L(g′;D)π(g′) dg′.(12)p(g\mid\mathcal D) =\frac{L(g;\mathcal D)\pi(g)} {\int_{0.2}^{1.6}L(g';\mathcal D)\pi(g')\,dg'}. \tag{12}

    With a uniform prior in gg, the displayed observation gives posterior mean 0.870230.87023, median 0.869980.86998, and a central 95% credible interval [0.77246,0.96940][0.77246,0.96940]. A prior uniform in t=g2t=g^2 instead has density proportional to 2g2g and gives mean 0.873130.87313 and central 95% interval [0.77544,0.97223][0.77544,0.97223]. Doubling the normalization/quantile quadrature from 128 to 256 nodes changes the retained quantiles by less than 8×10−148\times10^{-14}.

    The numerical closeness of these intervals to likelihood-ratio sets in this informative example does not identify their meanings. A credible interval contains a specified posterior probability conditional on the prior and model. A confidence procedure is assessed by repeated-data coverage at fixed truth. Neither interpretation is supplied by an optimizer alone. The prior dependence of posterior inference and the distinct uses of likelihood surrogates are discussed by Cranmer, Brehmer and Louppe, §§1.2 and 3.2. Cranmer et al.

    The companion observation_likelihood.py retains the actual synthetic angles, calibration counts, likelihood curves and quadrature checks. Later exact and learned analyses reuse this observation and the same declared model; no physical data or detector performance measurement is claimed.

    Summary

    Specify the random count, selected shape and calibration observations before fitting. The exact angular model has a concave score in g2g^2, giving a transparent numerical baseline. Count information, efficiency uncertainty, prior dependence and repeated-sampling calibration remain separate parts of the inference.

    Exercises

    1. Derive the count-only constrained maximum-likelihood estimate of t=g2t=g^2 when α\alpha is known. Explain how the full score in Eq. (7) determines an interior solution or a boundary maximum, including N=0N=0.
    Solution

    Set a=τϵ0(1+α/2)a=\tau\epsilon_0(1+\alpha/2), b=τϵ0(1−α/2)>0b=\tau\epsilon_0(1-\alpha/2)>0, so μ=a+bt\mu=a+bt. The count log likelihood is −μ+Nlog⁡μ-\mu+N\log\mu plus a constant, with derivative b(N/μ−1)b(N/\mu-1). An unconstrained interior maximum satisfies μ=N\mu=N, hence

    t^count=N/(τϵ0)−(1+α/2)1−α/2.\widehat t_{\rm count}=\frac{N/(\tau\epsilon_0)-(1+\alpha/2)}{1-\alpha/2}.

    Clip this value to the allowed tt interval, then take its positive square root. The clipping follows because the derivative is monotone decreasing and changes sign only at that value.

    For the full likelihood, Eq. (7) proves the same monotonicity of the score. If the score at the lower boundary is nonpositive, that boundary is optimal. If the score at the upper boundary is nonnegative, the upper boundary is optimal. Otherwise the unique score zero is the maximum when the log likelihood is strictly concave. For N=0N=0, the score is the negative constant −b-b; no interior root exists. A solver that insists on finding one has posed the wrong numerical problem.

    1. Starting with production density ff and independent efficiency ϵ\epsilon, derive the selected density. Show how omitting its normalizer changes a shape likelihood. Then transform a uniform prior in t=g2t=g^2 to a density in g>0g>0.
    Solution

    The joint probability of an angle in dcdc and detection is ϵ(c)f(c∣g)dc\epsilon(c)f(c\mid g)dc. Divide by the detection probability ϵ‾(g)=∫ϵf dc\overline\epsilon(g)=\int\epsilon f\,dc to obtain

    p(c∣g,detected)=ϵ(c)f(c∣g)ϵ‾(g).p(c\mid g,{\rm detected})=\frac{\epsilon(c)f(c\mid g)}{\overline\epsilon(g)}.

    For NN selected events the log shape likelihood therefore contains −Nlog⁡ϵ‾(g)-N\log\overline\epsilon(g). Omitting it adds a parameter-dependent term, changes the score, and generally changes the estimate. The term cancels against the matching selected count normalization only when the complete count-and-shape likelihood is used consistently.

    Under t=g2t=g^2, probability conservation requires πg(g)dg=πt(g2)2g dg\pi_g(g)dg=\pi_t(g^2)2g\,dg. On g∈[gmin⁡,gmax⁡]g\in[g_{\min},g_{\max}], a uniform-tt prior is

    πg(g)=2ggmax⁡2−gmin⁡2.\pi_g(g)=\frac{2g}{g_{\max}^2-g_{\min}^2}.

    It differs from 1/(gmax⁡−gmin⁡)1/(g_{\max}-g_{\min}). Reparameterizing a fixed prior with its Jacobian leaves posterior probabilities unchanged; replacing one uniform prior by the other changes the prior measure and thus the inference.

    References

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.