Fieller's theorem (source code)

= Fieller's theorem
{c}
{title2=$(\widehat C-r\widehat E)^2\leq q^2(v_C-2rv_{CE}+r^2v_E)$}
{wiki}

= Fieller confidence set
{c}
{synonym}

For jointly approximately <normal> estimates $(\widehat C,\widehat E)$ with estimated <variances> $v_C,v_E$ and <covariance> $v_{CE}$, a <confidence interval> for the ratio $C/E$, where $E\ne0$, can be obtained by inverting tests of $C-rE=0$. For each proposed ratio $r$, the contrast has estimate $\widehat C-r\widehat E$ and <variance> $v_C-2rv_{CE}+r^2v_E$. Retain $r$ when its absolute standardized contrast is at most the chosen critical value $q$. This gives the displayed quadratic inequality, with coefficients $A=\widehat E^2-q^2v_E$, $B=-2(\widehat C\widehat E-q^2v_{CE})$, $D=\widehat C^2-q^2v_C$. When $A>0$ and the discriminant is positive, retain the interval between the roots. When $A<0$, a confidence set can instead be two unbounded rays or the entire real line. Degenerate linear cases are interpreted directly from the inequality. A bounded interval must not be forced when the denominator is poorly separated from zero. Known <covariance matrix> and a joint <normal distribution> give exact normal critical values; estimated covariance usually gives approximate coverage, unless an appropriate exact common-scale pivot exists.