Let us have some data (shown below), predictand Y and two factors X1 and X2. X1 has 2 groups, and X2 has 3 groups. (In this particular example, the design is incomplete though, because combination X1=2 & X2=3 is absent.)
Let us run GLM command (shown). The settings are default: full factorial model, SS III type of squares, intercept present. The command requests to print out observed means for all groups of factors as well as for their combinations and also to print out the corresponding estimated means. It also saves predicted values for Y (shown below as "pre").
UNIANOVA y BY x1 x2
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/SAVE=PRED
/EMMEANS=TABLES(OVERALL)
/EMMEANS=TABLES(x1)
/EMMEANS=TABLES(x2)
/EMMEANS=TABLES(x1*x2)
/PRINT=DESCRIPTIVE
/CRITERIA=ALPHA(.05)
/DESIGN=x1 x2 x1*x2.
y x1 x2 pre
.725581 1 1 .725581
-.147728 1 2 .046662
.496867 1 2 .046662
-.985803 1 2 .046662
-.139656 1 2 .046662
-.381405 1 2 .046662
1.437696 1 2 .046662
.039809 1 3 -.748909
-1.537626 1 3 -.748909
-.402714 2 1 .159152
1.900394 2 1 .159152
.883087 2 1 .159152
-1.744157 2 1 .159152
1.009084 2 2 .288968
1.169746 2 2 .288968
.579917 2 2 .288968
-1.022533 2 2 .288968
-.587685 2 2 .288968
.814123 2 2 .288968
.003084 2 2 .288968
-1.068938 2 2 .288968
-.175502 2 2 .288968
1.290405 2 2 .288968
1.166946 2 2 .288968
-.645831 2 3 -.645831
1.061533 3 1 1.061533
1.143789 3 2 .676997
.210205 3 2 .676997
-.643339 3 3 -.360148
-.076957 3 3 -.360148
Let us compare observed and estimated means printed out (I don't show these tables here). First, we can notice that on the lowest (the cell) level of the design, i.e. on the level of combinations of groups X1 * X2 estimated means equal observed means. This is because we had used saturated, full factorial model including all possible interactions between the factors. Second, we can see that when it comes to means on the higher, marginal, level, estimated means do not (generally) equal observed means. For example, the observed marginal mean for X1=1 is -0.05470 and the corresponding estimated mean is 0.00778.
Can we show where this difference stems from? Yes. The observed marginal mean corresponds to the simple mean of the predicted values. For X1=1, this is mean(.725581,.046662,.046662,.046662,.046662,.046662,.046662,-.748909,-.748909) = -0.05470
which is the same as the simple mean of the observed values mean(.725581,-.147728,.496867,-.985803,-.139656,-.381405,1.437696,.039809,-1.537626) = -0.05470
. On the other hand, the estimated marginal mean is given by averaging the predicted values with the collapsed groups weighted equally. That is, X2=1, X2=2, X2=3 are given equal weight despite their unequal frequencies, and so 0.00778 = mean(.725581,.046662,-.748909)
. You may conclude yourself that if the design had been balanced - cells contained equal frequencies - estimated and observed means would have been equal to each other.
That was a simple explanation for the simple case (by "simple case" I mean defaults such as Type III SS, intercept, no covariates). You may consult "SPSS Algorithms" help document to read about how estimated, expected means are actually computed in the general case.