Why Start With Treatment Combinations?
In a factorial dataset, each observation belongs to a combination of factor levels. When cell sizes differ, the number of observations contributing to each combination is unequal. A useful first description is therefore the mean response within each combination, before summarizing across levels of either factor. These within-combination summaries are called cell means.
A cell mean is a descriptive quantity tied to a particular combination of factor levels. It is not automatically the same as an average for one factor level, and it is not automatically the fitted value from every factorial model. Keeping those distinctions clear prevents a compact table of means from being mistaken for a model's conclusions.
The same idea extends to three or more factors: the cell is specified by one level from each factor, and its observed cell mean averages the responses in that exact combination. For instance, a three-factor cell might be one treatment level, one dose level, and one clinic. The cell mean describes that combination; it does not by itself average over clinics or doses.
Model Context: A Cell-Means Model
It is helpful to distinguish a data summary from a model-based value. For a two-factor factorial dataset, a saturated cell-means model can be written
Here \(X_{ijk}\) is the response for observation \(k\) in cell \((i,j)\), \(\mu_{ij}\) is the population mean response for that cell, and \(\varepsilon_{ijk}\) is the observation's deviation from that cell mean. “Saturated” means that every factor-level combination has its own mean parameter; the model does not require different cells to share a mean or impose an additive pattern across factors.
For the usual classical ANOVA inference under this model, the errors are assumed independent, normally distributed with mean zero, and to have a common variance across cells. These assumptions support standard inference about the cell means; they are not required merely to calculate an observed cell mean. In a descriptive calculation, the mean is still the arithmetic average of the observed responses, even if the error assumptions are doubtful.
A fitted value is the value predicted for an observation by a particular fitted model. It depends on which model was fitted. Under the saturated cell-means model, each observation in cell \((i,j)\) has fitted value \(\hat{\mu}_{ij}=\bar{x}_{ij}\). Under a more restricted model, such as one that allows factor effects but no interaction, the fitted value may differ from the observed cell mean.
Worked Example: Calculating Cell Means From Responses
Suppose a hypothetical experiment records a response in units for two treatment factors, \(A\) and \(B\). The observed responses are \(4,6\) in cell \((A_1,B_1)\); \(7,9,11\) in \((A_1,B_2)\); \(8,10\) in \((A_2,B_1)\); and \(12\) in \((A_2,B_2)\). Find the observed cell means and explain what the saturated model would fit.
For \((A_1,B_1)\), \(n_{11}=2\), so
For \((A_1,B_2)\), \(n_{12}=3\), giving
The remaining calculations are
Thus the four observed cell means are \(5,9,9,\) and \(12\) units, respectively. In the saturated cell-means model, the fitted value for either observation in \((A_1,B_1)\) is \(5\); the fitted value for each observation in \((A_1,B_2)\) is \(9\); and similarly the fitted values are \(9\) and \(12\) in the other two cells. The fitted value is constant within each cell in this model, and it equals that cell's observed mean.
Cell Means Are Not Factor-Level Averages
A factor-level average combines observations from more than one cell. For example, a pooled average for level \(A_1\) combines responses from both \((A_1,B_1)\) and \((A_1,B_2)\). It is a summary for \(A_1\) across the observed levels of \(B\), not a cell mean. In unbalanced data, cells with more observations contribute more to this pooled average because more responses are included.
Using the hypothetical data above, the pooled average for \(A_1\) is
The pooled average for \(A_2\) is
Neither \(7.4\) nor \(10\) is one of the cell means. The first combines two \(A_1\) cells, and the second combines two \(A_2\) cells. Other summaries across factor levels can use a different averaging rule. The point here is not to choose among those summaries, but to identify what is being averaged: a cell mean refers to one exact combination, while a factor-level average combines across combinations.
Why Fitted Values Depend on the Model
The saturated model assigns a separate mean to every cell, so it can reproduce all observed cell means. A model with fewer parameters must compromise when the observed cell means do not follow the pattern it allows. In particular, a two-factor additive model includes effects for \(A\) and \(B\) but no interaction. Its fitted cell means must have no difference-of-differences across the four cells. The raw cell means need not satisfy that restriction.
Worked Example: Fitted Values From an Additive Model
Use the four observed cell means and cell sizes from the first example: \((5,9,9,12)\) and \((2,3,2,1)\). Consider fitting an additive model with no \(A\)-by-\(B\) interaction. Find its fitted cell means and compare them with the observed cell means.
With two levels of each factor, additivity requires the fitted cell means \(m_{ij}\) to satisfy
The observed cell means have contrast \(5-9-9+12=-1\), so they do not satisfy the additive restriction. Least squares chooses fitted means close to the observed means while satisfying the restriction. Because every observation in a cell receives that cell's fitted mean, the residual sum of squares associated with choosing \(m_{ij}\) is, apart from within-cell variation that cannot be changed by the model, \(n_{ij}(m_{ij}-\bar{x}_{ij})^2\). Thus we minimize the weighted squared deviations subject to the additivity constraint.
For completeness, let \(a=(1,-1,-1,1)\), in the order \(11,12,21,22\), and let \(y=(5,9,9,12)\). The constraint is \(a^\mathsf{T}m=0\). The least-squares adjustment has the form \(m=y-\lambda W^{-1}a\), where \(W\) is the diagonal matrix of cell counts. This follows by setting the derivative of the weighted squared deviations, with a multiplier for the linear constraint, equal to zero. Enforcing the constraint gives
Therefore the fitted cell means are
Their alternating sum is zero, as required by additivity. They differ from the observed cell means \(5,9,9,12\). Each observation in a given cell receives the corresponding additive fitted mean, not the raw mean for that cell. The unequal cell counts also affect how far the fitted values move: the model's least-squares criterion weights each cell's discrepancy by its count.
This example illustrates a general point: a table of observed cell means describes the data, while fitted values describe the result of imposing a model on the data. The two match in the saturated model, but not necessarily in a restricted model.
Empty Cells and the Limits of a Cell-Mean Table
An observed cell mean requires at least one response in that combination. If \(n_{ij}=0\), there are no observed responses to average, so \(\bar{x}_{ij}\) is undefined. It is important not to fill such a blank with zero: zero would be a response value, not a mean calculated from absent observations.
Worked Example: Identifying an Empty Cell
In a hypothetical study, a response is measured in millimetres for two treatments, \(T_1,T_2\), at two settings, \(S_1,S_2\). The observed data are \(10,14\) for \((T_1,S_1)\), \(13\) for \((T_1,S_2)\), and \(12,16\) for \((T_2,S_1)\). No observations were recorded for \((T_2,S_2)\).
The observed cell means are
For \((T_2,S_2)\), \(n_{T_2S_2}=0\), so there is no observed cell mean. A saturated cell-means model has no data-based cell mean for this unobserved combination either. A more restricted model might produce a prediction there by using its assumptions and the observed cells, but that prediction would be a model-based fitted value, not an observed cell mean.
A Short Derivation: Why a Saturated Fit Equals Each Cell Mean
The saturated cell-means model estimates a separate value \(m_{ij}\) for each nonempty cell. For a fixed cell, the part of the residual sum of squares involving \(m_{ij}\) is
To find its least-squares estimate, differentiate with respect to \(m_{ij}\), set the derivative to zero, and solve:
The second derivative is \(2n_{ij}>0\) for a nonempty cell, so this stationary point minimizes the cell's sum of squared residuals. Since the saturated model estimates each cell separately, minimizing in one cell does not constrain the estimate in another. Therefore its fitted value in every observed cell is that cell's observed mean.
Common Mistake and Practical Use
A common mistake is to look at a factorial table and call every number in it a “mean effect,” without specifying what observations or combinations were averaged. For example, someone might say, “The mean for \(A_1\) is 9 because one of its cells has mean 9.” That reasoning ignores the other \(A_1\) cell. In the first example, the pooled response average for \(A_1\) is \(7.4\) units, while its two cell means are \(5\) and \(9\) units.
The correction is to name the target precisely. Say “the observed mean in cell \((A_1,B_2)\) is 9 units,” “the pooled average across the observed \(A_1\) responses is 7.4 units,” or “the additive model's fitted value in \((A_1,B_2)\) is …” Each phrase identifies a different quantity. Before interpreting any table, check which factor levels define each cell, whether the cell is populated, and whether the reported numbers are raw cell summaries or fitted values from a specified model.
Cell means matter because they preserve the treatment-combination detail in factorial data. They are the basic descriptive building blocks: they show the observed response level for each combination and provide a direct way to compare raw data summaries with the predictions of a model. Their interpretation remains specific to the observed cells; averages across factors and model-based predictions require additional choices or assumptions.
Check Your Understanding
Try these questions using the definitions and distinctions above.
- A cell contains responses \(6,8,10\). What is its observed cell mean, and what does that mean describe?
- In a factorial table, a factor level appears in three cells. Explain why none of those three cell means, by itself, is the pooled average for that factor level.
- Under what model does each fitted value in an observed cell equal that cell's observed mean?
- Why might fitted values from an additive model differ from the observed cell means?
- A treatment combination has no observations. Is its observed cell mean zero, undefined, or equal to a fitted value from any model? Explain.