= Solution
For <independent random variables> $Y_i\sim\operatorname{Bernoulli}(p_i)$, the full <logistic regression> has <linear predictor>
$$
\log\frac{p_i}{1-p_i}=\beta_0+\beta_1x_i+\beta_B\mathbf1_{\{L_i=B\}}+\beta_C\mathbf1_{\{L_i=C\}}.
$$
Layout A is the <reference level in a regression factor>. The smaller model sets $\beta_B=\beta_C=0$, leaving the same <logit link> and the price predictor. In either case
$$
\ell(p)=\sum_i[y_i\log p_i+(1-y_i)\log(1-p_i)].
$$
The <saturated statistical model> allows a separate probability per observation; its maximizing probabilities are $p_i=y_i$, with <log-likelihood> zero under $0\log0=0$. Hence the <binomial deviance> for either fitted model is
$$
\boxed{D=2(\ell_{\rm sat}-\ell_{\rm fit})=-2\sum_i[y_i\log\widehat p_i+(1-y_i)\log(1-\widehat p_i)].}
$$
Equivalently, write the summands as $2[y_i\log(y_i/\widehat p_i)+(1-y_i)\log((1-y_i)/(1-\widehat p_i))]$. The fitted probabilities differ between the two models, but the definition of <binomial deviance> is the same. A residual deviance for individual binary data need not itself have an accurate <chi-squared distribution> approximation; the nested-model difference used next has a different asymptotic justification.
Back to article page