Why the Trial Count Appears in the Canonical Form
A binomial response records the number of successes among a specified number of trials. Its probability depends on both the observed success count and the number of opportunities for success. In exponential-family form, these features enter in different places: the observed count multiplies the natural parameter, while the fixed trial count scales the log-partition function. The binomial coefficient is a parameter-free part of the mass function and belongs in the base measure.
Keeping these roles separate is useful when writing likelihoods for binomial data, especially when different observations have different numbers of trials. The key is not to treat the trial count as another observed response: it is fixed for the particular binomial distribution.
Binomial Mass Function in Canonical Form
Solving the natural-parameter equation for \(p\) gives
Substituting these expressions into the binomial mass function isolates the part depending on the observed count \(y\), the part depending on \(n\) and \(\eta\), and the parameter-free coefficient.
The natural-parameter space is all of \(\mathbb{R}\): every finite real \(\eta\) gives a probability \(p\) strictly between zero and one, and the resulting mass function is normalized. The degenerate cases \(p=0\) and \(p=1\) are not represented by finite \(\eta\); they correspond to limiting values \(\eta\to-\infty\) and \(\eta\to+\infty\), respectively.
Worked Example: One Success Among Three Trials
Let \(Y\sim\operatorname{Binomial}(3,2/5)\). Write its canonical parameter and calculate \(P(Y=1)\) in both the original and canonical forms.
The natural parameter is $$ \eta=\log\left(\frac{2/5}{3/5}\right)=\log(2/3). $$ The trial-count log-partition function at this parameter is $$ A_3(\eta)=3\log(1+e^\eta) =3\log(1+2/3)=3\log(5/3). $$ In the original form, $$ P(Y=1)=\binom{3}{1}\frac{2}{5}\left(\frac{3}{5}\right)^2 =3\cdot\frac{2}{5}\cdot\frac{9}{25} =\frac{54}{125}=0.432. $$ In canonical form, the same probability is $$ \binom{3}{1}\exp\{\eta-A_3(\eta)\} =3\left(\frac{2}{3}\right)\left(\frac{3}{5}\right)^3 =\frac{54}{125}=0.432. $$ Both calculations agree. The coefficient \(3\) is the base-measure term, and the exponent includes one copy of \(\eta\) because the observed count is one.
Why This Is a Valid Probability Model
The log-partition function is the term that makes the mass function sum to one over the support. For this binomial representation, that fact follows directly from the binomial theorem.
Proof. Since \(\eta\) is real, \(1+e^\eta>0\), so the logarithm is finite and the common factor \(\exp\{-n\log(1+e^\eta)\}\) can be taken outside the sum. Therefore
The second equality is the binomial theorem applied to \(1+e^\eta\). This verifies normalization for every finite \(\eta\), not just for a particular probability value. \(\square\)
Worked Likelihoods
Worked Example: A Likelihood Contribution at Zero Natural Parameter
Suppose one observation is a binomial count \(y=5\) from \(n=10\) trials, and evaluate its likelihood contribution at \(\eta=0\). First, \(\eta=0\) implies $$ p=\frac{e^0}{1+e^0}=\frac{1}{2}, \qquad A_{10}(0)=10\log 2. $$
The likelihood contribution, considered as a function of \(\eta\) for this observed \(y\), is $$ L(\eta)=\binom{10}{5}\exp\{5\eta-10\log(1+e^\eta)\}. $$ Since \(\binom{10}{5}=252\), substitution gives $$ L(0)=252\exp\{-10\log 2\} =\frac{252}{2^{10}} =\frac{252}{1024} =\frac{63}{256} \approx 0.2461. $$
At \(\eta=0\), this likelihood contribution equals the probability of observing exactly five successes under \(p=1/2\). The coefficient \(252\) must remain in the likelihood: it is parameter-free, but it is part of the binomial mass.
Worked Example: A Count from Four Trials
Let \(Y\sim\operatorname{Binomial}(4,1/4)\). Find the probability of two successes using the canonical representation, then check it directly.
The natural parameter and log-partition value are $$ \eta=\log\left(\frac{1/4}{3/4}\right)=\log(1/3)=-\log 3, \qquad A_4(\eta)=4\log(1+1/3)=4\log(4/3). $$ For \(y=2\), the canonical calculation is $$ \begin{aligned} P(Y=2) &=\binom{4}{2}\exp\{2(-\log 3)-4\log(4/3)\}\\ &=6\left(\frac{1}{9}\right)\left(\frac{3}{4}\right)^4\\ &=\frac{6}{9}\cdot\frac{81}{256} =\frac{54}{256} =\frac{27}{128} \approx 0.2109. \end{aligned} $$ The direct calculation confirms the result: $$ \binom{4}{2}\left(\frac{1}{4}\right)^2 \left(\frac{3}{4}\right)^2 =6\cdot\frac{1}{16}\cdot\frac{9}{16} =\frac{54}{256} =\frac{27}{128}. $$
Different Trial Counts in a Likelihood
When several independent binomial observations share a success probability but have different known trial counts, each observation has its own binomial coefficient and its own trial-count multiplier in the log-partition term. For observations \(y_i\) from trial counts \(n_i\), the product likelihood is
Equivalently, the log-likelihood is
This form makes the roles visible: the observed counts contribute to the coefficient of \(\eta\), and the total number of trials scales the log-partition term. The binomial coefficients contribute to the likelihood, but they do not depend on \(\eta\).
Worked Example: Two Independent Counts with Unequal Trial Counts
Suppose \(Y_1\sim\operatorname{Binomial}(2,1/2)\) and \(Y_2\sim\operatorname{Binomial}(3,1/2)\) are independent. Calculate the joint probability of \(Y_1=1\) and \(Y_2=2\), and express the joint likelihood contribution canonically.
Here \(p=1/2\), so \(\eta=0\). The two binomial coefficients are \(\binom{2}{1}=2\) and \(\binom{3}{2}=3\). Their canonical contributions multiply to $$ \begin{aligned} P(Y_1=1,Y_2=2) &=2\exp\{0-2\log 2\}\cdot 3\exp\{0-3\log 2\}\\ &=6\exp\{-5\log 2\} =\frac{6}{32} =\frac{3}{16}. \end{aligned} $$ The direct calculation gives the same answer: $$ \left[\binom{2}{1}\left(\frac12\right)^1 \left(\frac12\right)^1\right] \left[\binom{3}{2}\left(\frac12\right)^2 \left(\frac12\right)^1\right] =\frac{2}{4}\cdot\frac{3}{8} =\frac{3}{16}. $$
For a general common \(\eta\), the joint likelihood contribution for these observed counts would be $$ 6\exp\{(1+2)\eta-(2+3)\log(1+e^\eta)\}. $$ The total observed count is \(3\), while the total number of trials is \(5\); these are distinct quantities and appear in different places.
Common Mistake and Practical Importance
A frequent error is to put the trial count into the response statistic or to use \(\log(1+e^\eta)\) without multiplying it by \(n\). The response statistic is the observed number of successes \(y\), not the number of trials. The factor \(n\) appears because each of the \(n\) trial-level normalizing factors contributes a factor \(1+e^\eta\).
The coefficient \(\binom{n}{y}\) also has a distinct role. It counts how many trial-level success/failure patterns produce the same total count \(y\). It is independent of \(p\) and \(\eta\), so it belongs in the base measure; nevertheless, it is part of the probability mass and should not be dropped when calculating a probability or a full likelihood.
Check Your Understanding
Use the canonical representation to answer these questions.
- For \(Y\sim\operatorname{Binomial}(n,p)\), express \(\eta\) in terms of \(p\) and \(p\) in terms of \(\eta\).
- Identify the base measure and log-partition function for a binomial count with fixed trial count \(n\).
- Why does the log-partition function contain a factor of \(n\)?
- For \(n=4\), \(p=1/3\), and \(y=1\), calculate the natural parameter and write the canonical mass at the observed count.
- For independent binomial observations with trial counts \(n_1,\ldots,n_m\) and a common natural parameter, what quantity multiplies \(\log(1+e^\eta)\) in the log-likelihood?