Skip to contents

The Egidi, Pauli and Torelli conflict p-value $$P_\psi(t) = \Pr_{T \sim m_\psi}\{m_\psi(T) \le m_\psi(t)\},$$ where \(m_\psi = \psi m_q + (1 - \psi) m_p\) is the prior-predictive density of the mixture and each component predictive is normal.

Usage

egidi_normal_conflict_pvalue(
  t_obs,
  psi,
  mu_p,
  sigma_p,
  mu_q,
  sigma_q,
  root_tolerance = 1e-13
)

Arguments

t_obs

Observed target statistic, one per replicate.

psi

Weight on the weak component, in \([0, 1]\).

mu_p

Mean of the informative component's predictive.

sigma_p

Standard deviation of the informative component's predictive, \(\sqrt{s_T^2 + \tau_p^2}\).

mu_q

Mean of the weak component's predictive.

sigma_q

Standard deviation of the weak component's predictive, \(\sqrt{s_T^2 + \tau_q^2}\).

root_tolerance

Relative width at which each bracketed turning point and each root is considered found.

Value

The conflict p-value, one per replicate.

Details

The inequality is taken on the density of the complete mixture, not by averaging component-specific p-values, which would be a different quantity whenever the two components have different centres.

No quadrature is needed. A two-component normal mixture density is a sum of two unimodal bumps, so \(\{m_\psi > c\}\) is a union of at most two bounded intervals and \(m_\psi(t) = c\) has at most four roots. Integrating the mixture between consecutive roots is closed form, so only the roots are found numerically.

The roots are located by first splitting the line into the pieces on which the density is monotone, which is what makes the result robust. Below both component means every term of \(m_\psi'\) is positive and the density is strictly increasing; above both means it is strictly decreasing. All turning points therefore lie between the two means, where \(m_\psi'\) is scanned on a grid fine enough to resolve the narrower component and its sign changes are refined by root-finding. There are at most three of them, giving at most four monotone pieces, each of which holds at most one root. Both refinements run vectorised_bracketed_root() on a bracket found beforehand, so neither can lose its root.

Scanning for the level crossings directly would not be robust: when the observed statistic sits near a turning point the region above the level can be far narrower than either component, and any fixed grid will step over it. Turning points do not have that failure mode, because they are separated on the components' own scales.

Two cases are exact and need no root-finding. A degenerate weight collapses the mixture to a single normal, whose conflict p-value is \(2\Phi(-|t - \mu| / \sigma)\) whatever the two centres are; this is what decides the common no-conflict case. Equal centres make the mixture symmetric and decreasing in \(|t - \mu|\), so the conflict p-value is the weighted sum of the component tail probabilities.