Why a Proportion Is Not the Whole Observation
A grouped data set often records, for each group, the number of successes and the number of trials. It is tempting to replace those two numbers with their ratio and analyze the resulting proportions as if each were one equally informative observation. But \(2/4\) and \(50/100\) are both \(0.5\) for a reason: the observed proportions match, while the evidence behind them differs. A grouped proportion must be interpreted together with its denominator.
Suppose group \(i\) has \(n_i\) trials and \(Y_i\) successes. Under the grouped-binomial model, the trials within the group are independent, each has the same success probability \(p_i\), and \(Y_i\) counts the successes. The observed proportion is \(r_i=Y_i/n_i\). It is a useful way to report the data, but its sampling variability depends on \(n_i\).
For a regression model, the group probability may depend on its covariates and model parameters; write this generally as \(p_i=p_i(\beta)\). The likelihood for those parameters is obtained from the counts \(Y_i\), with the trial totals \(n_i\) retained. This tutorial focuses on expressing that likelihood through the observed proportions without discarding the information in their denominators.
The Likelihood Written With Proportions
Assume there are \(m\) independent groups. For each group, \(n_i\) is a known positive integer and \(Y_i\sim\operatorname{Binomial}(n_i,p_i(\beta))\). Independence across groups gives the joint likelihood by multiplying their binomial probability mass functions.
The binomial coefficient is part of the probability of the observed count, so it belongs in the full likelihood. It can be dropped when maximizing over model parameters because it does not depend on them. The factor \(n_i\), however, multiplies the parameter-dependent contribution. It is not a disposable constant: it records how many trials produced the proportion. When a logarithm has a zero multiplier, use the usual convention \(0\log 0=0\), which is the continuous limiting value.
The likelihood expression follows directly from the binomial mass function. The algebra also makes clear that writing the data as \(r_i\) does not turn each group into a single equally weighted response.
The probability of \(Y_i=y_i\) is \({n_i\choose y_i}p_i^{y_i}(1-p_i)^{n_i-y_i}\).
Set \(y_i=n_i r_i\), so the success and failure exponents become \(n_i r_i\) and \(n_i(1-r_i)\).
The product across independent groups becomes a sum, and each parameter-dependent group contribution is multiplied by \(n_i\).
Worked Example: Evaluating a Proportion-Based Likelihood
Two independent groups have \((Y_1,n_1)=(2,10)\) and \((Y_2,n_2)=(20,40)\), giving \(r_1=0.2\) and \(r_2=0.5\). Consider candidate probabilities \(p_1=0.25\) and \(p_2=0.45\). Calculate the log-likelihood contribution that depends on these probabilities.
For the first group, $$ 10\{0.2\log(0.25)+0.8\log(0.75)\} =10\{0.2(-1.3863)+0.8(-0.2877)\} \approx -5.074. $$
For the second group, $$ 40\{0.5\log(0.45)+0.5\log(0.55)\} =20\log(0.2475) \approx -27.927. $$
The total parameter-dependent log-likelihood is approximately \(-5.074-27.927=-33.001\). The full log-likelihood also includes \(\log{10\choose2}+\log{40\choose20}\); those terms matter for the probability of the observed counts but not for comparing candidate probabilities. If the factors 10 and 40 were omitted, both groups would instead contribute as if each were just one observation of a proportion. That is a different objective function.
Why Denominators Determine Precision
The role of \(n_i\) is not merely a feature of the likelihood’s algebra. It also follows from the sampling variance. Under the binomial model, \(E[Y_i]=n_i p_i\) and \(\operatorname{Var}(Y_i)=n_i p_i(1-p_i)\). Scaling the count by \(n_i\) scales its variance by \(1/n_i^2\).
To verify the result, note that \(r_i=Y_i/n_i\). Linearity of expectation and the variance rule for multiplying a random variable by a constant give $$ E[r_i]=\frac{E[Y_i]}{n_i}=p_i,\qquad \operatorname{Var}(r_i)=\frac{\operatorname{Var}(Y_i)}{n_i^2} =\frac{n_i p_i(1-p_i)}{n_i^2} =\frac{p_i(1-p_i)}{n_i}. $$ Taking the square root gives the standard error. This establishes the result under the binomial sampling assumptions. \(\square\)
Thus, even when two observed proportions are equal, the one based on more trials will generally be more precise. The same denominators also determine the likelihood contributions. In a model that constrains probabilities across groups, changing the denominators can therefore change the fitted parameter estimates as well as their uncertainty.
Worked Example: Equal Proportions, Unequal Precision
Group A has \(2\) successes in \(4\) trials, and group B has \(50\) successes in \(100\) trials. Both observed proportions equal \(0.5\). Compare their standard errors using the plug-in estimate \(r_i\).
For group A, $$ \widehat{\operatorname{SE}}(r_A) =\sqrt{\frac{0.5(1-0.5)}{4}} =\sqrt{0.0625}=0.25. $$ For group B, $$ \widehat{\operatorname{SE}}(r_B) =\sqrt{\frac{0.5(1-0.5)}{100}} =\sqrt{0.0025}=0.05. $$
The proportions match, but the estimated standard error for group A is five times the one for group B. Treating the two proportions as equally precise would erase a substantial difference in the amount of binomial information each group supplies.
When Dropping the Denominators Changes the Estimate
Consider the simplest constrained model: all groups have one common probability \(p\). The binomial likelihood then combines all successes and all trials. Its estimate is the pooled proportion, not the unweighted average of the group proportions. The derivation is short and shows exactly where the trial totals enter.
Ignoring terms that do not depend on \(p\), the log-likelihood is $$ \ell(p)=\left(\sum_iY_i\right)\log p+ \left(\sum_i(n_i-Y_i)\right)\log(1-p). $$ Write \(S=\sum_iY_i\) and \(N=\sum_i n_i\). Its derivative for \(0<p<1\) is $$ \ell'(p)=\frac{S}{p}-\frac{N-S}{1-p} =\frac{S-Np}{p(1-p)}. $$ The derivative is zero at \(p=S/N\). The second derivative is \(-S/p^2-(N-S)/(1-p)^2<0\), so this stationary point is the unique maximum. Substituting \(Y_i=n_i r_i\) gives the stated pooled-proportion expression. \(\square\)
Worked Example: Pooled and Unweighted Estimates
Suppose group A has \(2\) successes in \(10\) trials and group B has \(60\) successes in \(100\) trials. Their proportions are \(0.2\) and \(0.6\). Under the common-probability model, compare the maximum-likelihood estimate with the unweighted average of the two proportions.
The pooled estimate is $$ \hat p=\frac{2+60}{10+100}=\frac{62}{110}\approx0.5636. $$ The unweighted average is $$ \frac{0.2+0.6}{2}=0.4. $$ They differ because the common-probability likelihood counts the 100 trials in group B and the 10 trials in group A; an unweighted average gives each group equal influence. The pooled estimate’s plug-in standard error is $$ \sqrt{\frac{0.5636(1-0.5636)}{110}} \approx \sqrt{0.002236} \approx 0.0473. $$ For comparison, the unweighted mean of the two observed proportions has variance \(p(1-p)(1/10+1/100)/4\) under this model, because the two group counts are independent. Plugging in \(0.5636\) gives an estimated standard error of $$ \sqrt{\frac{0.5636(1-0.5636)}{4}\left(\frac{1}{10}+\frac{1}{100}\right)} \approx 0.0822. $$ This unweighted mean is unbiased for \(p\) under the common-probability model, but it is not the binomial maximum-likelihood estimate and is less precise here. The denominator is needed to know both how to combine the observations and how much sampling variation to expect.
A Common Mistake and Its Correction
A common mistake is to calculate \(r_i=Y_i/n_i\), then fit the model as though each \(r_i\) were one equally precise response. The mistaken reasoning is: “Each group contributes one number, so each group should count once.” But the number of groups does not describe how many trials produced those numbers. The proportion from a group of 5 trials and the proportion from a group of 500 trials have different binomial variances, and a likelihood for the counts weights the parameter-dependent contribution by \(n_i\).
The correction is to retain each pair \((r_i,n_i)\), or equivalently each pair \((Y_i,n_i)\), when fitting a grouped-binomial model. Do not interpret the factor \(n_i\) as an arbitrary adjustment: it follows from the binomial sampling model. Conversely, do not claim that unweighted proportions always give a biased estimate. In the common-probability example, their average remains unbiased, but it differs from the likelihood estimate and is less efficient. With a covariate-dependent model, omitting denominators changes the fitting criterion and can change the resulting estimates.
Check Your Understanding
Answer each question using the grouped-binomial assumptions stated above.
- Write the parameter-dependent log-likelihood contribution for a group with total \(n_i\), observed proportion \(r_i\), and modeled probability \(p_i\).
- Two groups each have observed proportion \(0.4\), but their trial totals are 20 and 200. Which proportion has the smaller binomial standard error, and why?
- For groups with a common success probability, explain why the maximum-likelihood estimate is a pooled proportion rather than an unweighted average of group proportions.
- What part of the full grouped-binomial likelihood can be dropped when maximizing over model parameters, and what part must be retained?
- Is an unweighted average of group proportions necessarily biased under a common-probability model? Distinguish bias from efficiency and from being the maximum-likelihood estimate.