Solution (source code)

= Solution

A <generalized linear model> assumes that the independent responses $Y_i$ have distributions in an <exponential family>, with means $\mu_i$, and that
$$
g(\mu_i)=\eta_i=x_i^T\beta.
$$
The invertible function $g$ is the <link function>; it connects the mean to the <linear predictor>.

For <binomial regression>, write $Y_i\sim\operatorname{Bin}(m_i,p_i)$ independently, so $\mu_i=m_ip_i$. The <logistic regression> link is
$$
\log\frac{p_i}{1-p_i}=x_i^T\beta,
\qquad
p_i=\frac{e^{x_i^T\beta}}{1+e^{x_i^T\beta}},
$$
while <probit regression> uses
$$
\Phi^{-1}(p_i)=x_i^T\beta,
\qquad
p_i=\Phi(x_i^T\beta),
$$
where $\Phi$ is the standard-normal distribution function. The logit is the <canonical link function> for the binomial family.