Skip to main content
Statistics LibreTexts

16.2: The Mathematics

  • Page ID
    57787
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    This section formally specifies the three necessary components for modeling a binomial dependent variable within the Generalized Linear Model (GLM) framework. It begins by identifying the linear predictor as the familiar linear combination of predictors. It then establishes the binomial distribution as the appropriate conditional distribution for a count of successes out of a known number of trials, noting that this distribution is a member of the exponential family and that its canonical link is the logit function. The section emphasizes that while the logit is the canonical link, alternative link functions exist and can be used; crucially, if the conclusions of a model depend heavily on the arbitrary choice of link function, the model itself is likely weak and in need of improvement. It concludes by reminding the reader that the assumptions implicitly made when specifying these three components are precisely the requirements that must be checked to validate the model.

     

    Learning Objectives

    By the end of this section, you will be able to:

    1. Specify the three required components for a binomial GLM: the linear predictor (\(\eta = \mathbf{XB}\)), the conditional distribution of the dependent variable (\(Y \sim \mathrm{Binomial}(n, \pi)\)), and the link function (most commonly the logit link).
    2. Recognize that the binomial distribution is a member of the exponential family and that its canonical link function is the logit, which maps the bounded probability of success (\(\pi\)) to an unbounded linear predictor.
    3. Explain that while the logit is the canonical link, alternative link functions (such as probit or complementary log-log) can be used, and that a robust model should yield substantively similar conclusions regardless of the choice among appropriate links.
    4. Identify that the assumptions required for a binomial GLM are implicit in the specification of its three components, and that these are the assumptions which must be tested to validate the model.

     

    ✦•················• ✦ •··················•✦

     

    Remember from the chapter on GLMs that performing generalized linear modeling requires that we specify three things about our model:

    • the linear predictor;
    • the conditional distribution of the dependent variable; and
    • the function that links the two.

    Let us go through these with the Binomial distribution.

     

    Linear Predictor

    As usual, the linear predictor is the function that relates the independent variable(s) with the dependent variable. For \(k\) predictor (independent) variables, the linear predictor is

    \[ \eta = \beta_0 + \beta_1 x_1 + \cdots + \beta_{k} x_{k} \]

    Frequently, this is what the researcher cares most about. This is the start of where we can test if certain variables can help in better understanding the data-generating process.

     

    The second need is the conditional distribution of the dependent variable, the distribution of \(Y\), given the values of the x-variables. For the Binomial distribution, the probability mass function (pmf) is

    \[ f(y,\ \pi) = \binom{n}{y} \pi^y (1-\pi)^{n-y} \qquad y \in \{0, 1, 2, \ldots, n\} \]

    I leave it as an exercise for you to show that the Binomial distribution is a member of the Exponential Class of distributions. In other words, you will need to show that the above probability mass function can be written as

    \[ f(y,\ \pi) = \exp \left[ \frac{y \mathrm{logit } (\pi) + n \log(1-\pi)}{1} + \log \binom{n}{y} \right] \label{eq:bin-link} \]

    With this, we can calculate \(\mathrm{E}[Y]\) and \(\mathrm{V}[Y]\). Note that equation \ref{eq:bin-link} above shows us that the canonical link is the logit function,

    \begin{equation}
    g(\pi) = \mathrm{logit}(\pi)
    \end{equation}

    As always, the canonical link offers some mathematical cleanness but little else. If the situation calls for a different link function, you should use it.

     

    From above, we know that the canonical link function is the logit function. However, as discussed in the section on GLM mathematics, many alternative link functions are available. If the model is sound, then predictions based on those alternatives will tend to be similar. Let me emphasize that here:

    It is extremely rare that the link function can be determined from the scientific theory — extremely rare. Thus, if the model significantly depends on the choice of link, then the model is weak. You should improve the model. 

    Reread the section on selecting the best link function for more information.

    This also suggests another model test. Fit the model using several link functions. That the results are substantively the same across the link functions supports the goodness of your model.

     

    Assumptions/Requirements

    As you have read through this chapter, what assumptions were made? Those are the requirements you need to check. Allow me to repeat this extremely important point:

    Caution

    As you have read through this chapter, what assumptions were made? Those are the requirements you need to check.

     

     

     


    This page titled 16.2: The Mathematics is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Ole Forsberg.

    • Was this article helpful?