Why the Denominator Is Part of the Model
A grouped binary outcome is recorded as a number of successes out of a number of trials. The denominator is not a formatting choice: it states how many opportunities could have produced the success being modelled. If it is too large, too small, or based on a different definition of eligibility than the numerator, the resulting proportion and likelihood describe the wrong response process.
The key question is therefore not simply “How many people or objects were in the study?” It is: For this outcome, how many trials were genuinely eligible to succeed? Eligibility should be defined from the outcome process, using information available under the study’s stated rules, rather than chosen to produce a convenient denominator.
In a GLMM, the success probability may depend on covariates and random effects. For example, for trials grouped within cluster \(j\), write \(Y_j \mid b_j \sim \operatorname{Binomial}(m_j,p_j(b_j))\), where \(b_j\) denotes a cluster random effect. The denominator \(m_j\) counts the eligible trials in that group; it does not count every person contacted or every record collected. Different groups may have different denominators.
Constructing the Denominator
Define the trial and the success event first. Then count the trials meeting the eligibility rule for that event. The numerator must count successes among precisely those trials. For instance, if the response is “accepted an offer among people eligible to receive it,” people who could not receive the offer are not failures: they were not trials for that response.
Eligibility and outcome coding must be consistent across observations. A failed eligible trial belongs in \(m_i\) but not \(Y_i\); an ineligible opportunity belongs in neither. A missing outcome is different: unless the analysis has a justified way to handle it, one cannot automatically classify a missing eligible trial as either a success or a failure, or simply remove it without considering the consequences.
A binomial model also assumes that, conditional on the model’s covariates and random effects, the trials within an observation have a common success probability and are independent. A random effect can represent dependence induced by a shared cluster propensity, but it does not make an incorrect eligibility rule correct. If trial probabilities differ within a group after conditioning, the simple grouped binomial likelihood may not be appropriate.
Worked Example: Eligible Patients, Not Everyone Contacted
In a hypothetical clinic, 50 people are contacted about an optional service. Eight are ineligible under the service rules, and 6 of the 42 eligible people accept. The outcome is acceptance among eligible people. Find the denominator, the observed acceptance proportion, and the probability of exactly 6 acceptances if each eligible person has acceptance probability \(p=0.15\), independently under the stated model.
Denominator and observed proportion. The 8 ineligible people did not have an eligible opportunity to accept, so \(m=50-8=42\). The six acceptances are successes among those 42 trials, giving \(\hat p=6/42=0.1429\), or about 14.3%.
The probability of exactly six successes under the stated binomial model is
Thus the probability is about 0.172. Using 50 as the denominator would describe a different outcome process: it would treat people who were ineligible as if they had an opportunity to accept and had declined. The choice of 42 follows from the specified estimand and eligibility rule, not from which denominator gives a preferred result.
Likelihoods With Observation-Specific Denominators
If \(Y_i\mid b\) follows a binomial distribution with known denominator \(m_i\) and conditional success probability \(p_i(b)\), its probability mass function is
For conditionally independent grouped observations, the conditional likelihood is the product of these probabilities over observations. Each denominator enters its own binomial coefficient and determines the number of failures, \(m_i-y_i\), as well as the power on the success probability. In a GLMM, this conditional likelihood is combined with the random-effects distribution and integrated over the random effects for the marginal likelihood.
The basic binomial form follows by considering the \(m_i\) eligible trials. Any particular set of \(y_i\) trials that succeed and \(m_i-y_i\) that fail has probability \(p_i(b)^{y_i}\{1-p_i(b)\}^{m_i-y_i}\), under conditional independence and a common conditional probability. There are \(\binom{m_i}{y_i}\) possible sets of \(y_i\) successes. Adding their equal probabilities gives the displayed mass function. This argument also shows why the denominator must count the trials to which the success/failure model applies.
Worked Example: Different Denominators Across Clinics
Suppose three hypothetical clinics record successful completion among patients eligible for a service. Their counts are 8 of 20, 15 of 30, and 4 of 10. Assume a random-intercept logistic model, so the conditional probability for clinic \(j\) is \(p_j(b_j)=\operatorname{logit}^{-1}(\beta_0+b_j)\), and the trials are conditionally independent within clinics.
The denominators are \(m_1=20\), \(m_2=30\), and \(m_3=10\), because these are the eligible patients. The observed proportions are \(8/20=0.400\), \(15/30=0.500\), and \(4/10=0.400\). The conditional likelihood is
The success total is \(8+15+4=27\), and the eligible-trial total is \(20+30+10=60\). If, as a simplifying special case, all three clinics had one common success probability \(p\), the likelihood would be proportional to \(p^{27}(1-p)^{33}\), and its maximum-likelihood estimate would be \(27/60=0.450\). In the stated random-intercept model, however, clinic probabilities can differ conditional on their random effects; \(27/60\) is not by itself the random-intercept GLMM estimate.
This example illustrates the main point: each clinic contributes its own \(m_j-y_j\) failures. Replacing all denominators by a common value would alter those failure counts and therefore alter the likelihood.
Worked Example: Counting Eligible Opportunities in Each Tray
In a hypothetical seed experiment, the outcome is emergence among seeds judged viable immediately before sowing. Tray A contains 30 seeds, of which 26 are viable at that point; 15 viable seeds emerge. Tray B contains 40 seeds, of which 35 are viable; 17 viable seeds emerge. Assume a binomial model for each tray, with conditional probabilities \(p_A\) and \(p_B\), respectively.
For tray A, \(m_A=26\) and \(Y_A=15\), so the observed proportion is \(15/26=0.5769\). For tray B, \(m_B=35\) and \(Y_B=17\), giving \(17/35=0.4857\). The likelihood for these observations is
The 4 nonviable seeds in tray A and 5 in tray B are not failures to emerge under this outcome definition: they were excluded before the eligible trials were counted. If the target outcome were instead emergence among all seeds placed in each tray, the trial definition and denominator would have to be reconsidered and stated accordingly. The denominator depends on the response being modelled.
Checks, Alternatives, and Common Errors
Before fitting a grouped binomial GLMM, verify that \(m_i\) is known, integer-valued, and defined for the same outcome as \(Y_i\), and that every count satisfies \(0\leq Y_i\leq m_i\). Investigate a value of \(Y_i>m_i\) as a data-definition or coding error. A zero denominator means there were no eligible trials: it cannot yield an observed proportion, and it contributes no binomial trial information. It should not be turned into a fabricated success or failure.
Compare the grouped representation with the main alternative: retaining one binary record for each eligible trial. When the denominator and outcome coding agree, the grouped count records how many of the eligible trials succeeded, while the individual-record form retains each trial’s binary outcome. The two forms can represent the same binomial contribution when the trials share the required conditional probability. Grouping may be convenient, but it does not justify discarding differences in eligibility or trial-level predictors.
| Issue | Incorrect approach | Appropriate check |
|---|---|---|
| Ineligible opportunities | Count every contacted person as a trial, even if some could not experience the event | Apply the stated eligibility rule before counting \(m_i\) |
| Different group sizes | Replace observation-specific denominators with one typical denominator | Use the actual \(m_i\) for each grouped observation |
| Missing outcomes | Automatically code a missing result as failure or remove it without review | Distinguish missing eligible trials from ineligible trials and specify the analysis rule |
| Unequal trial probabilities | Assume a binomial count solely because outcomes are binary | Check the common conditional probability and independence assumptions |
A particularly common mistake is to divide successes by the number recruited, enrolled, or observed merely because that number is readily available. The mistaken reasoning is that every recorded person must be a trial. The correction is to define what counts as an eligible opportunity for the particular success event and use that count as \(m_i\). Another error is to treat a larger denominator as a harmless rescaling: it changes both the observed proportion and the binomial likelihood, including its implied number of failures.
The denominator rule does not resolve every modelling question. A correct \(m_i\) cannot compensate for substantial within-group differences in success probabilities, dependence not represented by the random-effects structure, or a selection process that makes the observed eligible trials unrepresentative of the target. Those issues require scrutiny of the design and model assumptions, not an adjustment to the denominator alone.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A hypothetical program contacts 80 people; 10 are ineligible for the service, and 21 of the eligible people accept. For acceptance among eligible people, what are \(m\), \(Y\), and the observed proportion?
- Two groups have 3 successes out of 12 eligible trials and 8 successes out of 20 eligible trials. What are their individual proportions, and what pooled proportion results under a common-probability model?
- For a grouped observation with \(m_i=0\), can an observed success proportion be calculated? Does the row contain any binomial trial information?
- Give two assumptions needed for the grouped binomial likelihood, beyond having binary outcomes.
Solutions. (1) The denominator is \(m=80-10=70\), the success count is \(Y=21\), and the proportion is \(21/70=0.300\). The ineligible people are not failures for this outcome. (2) The proportions are \(3/12=0.250\) and \(8/20=0.400\). Under a common-probability model, the pooled estimate is \((3+8)/(12+20)=11/32=0.3438\). This pooling calculation is not automatically the estimate from a GLMM with group-specific random effects. (3) No proportion is defined because it would require \(0/0\); with no eligible trials, the row contributes no binomial trial information. (4) Conditional on the model covariates and random effects, trials within the observation must be independent and must share a common success probability. The denominator must also count exactly the trials eligible for the specified outcome.