# ANOVA 1-way - How to calculate SSF

I'm studying and I can't find an answer to make the ANOVA table for this. I have 4 groups, with mean and variance group. My N=60, n=15 for each group.

To find Sum Square Errors I did Sum( ni * variance i) but I don't know how to calculate SST or SSF having just this information.

I could have made SST = total variance * N

And then SSF=SST-SSE, but I don't know how to get to total variance from this information.

Thank you

• Apparently OP is interested only in Excel implementation of the key formulas. For me personally, that is off-topic. – BruceET Jun 11 at 13:57
• Hey Bruce thanks for your time once again! I was able to solve it after more research. As for the Excel it was because I only had my exercises solved in Excel – Jah-Lahfui Jun 12 at 14:23

For your balanced design (15 replicates in each of four groups), a quick answer can be illustrated using fictitious data sampled in R:

set.seed(2021)
x1 = round(rnorm(15, 50, 7),2)
x2 = round(rnorm(15, 51, 7),2)
x3 = round(rnorm(15, 51, 7),2)
x4 = round(rnorm(15, 52, 7),2)
x = c(x1,x2,x3,x4)
g = as.factor(rep(1:4, each=15))


In R, there are several ways to get relevant parts of the ANOVA table. One is as follows, giving Total Sum of Squares = $$3485.53.$$

aov(x~g)
Call:
aov(formula = x ~ g)

Terms:
g Residuals
Sum of Squares   113.405  3372.125
Deg. of Freedom        3        56

Residual standard error: 7.75993
Estimated effects may be unbalanced


The total sum of squares is $$113.405 + 3372.125 = 3485.53.$$

Another method gives the same answer:

anova(lm(x ~ g))

Analysis of Variance Table

Response: x
Df Sum Sq Mean Sq F value Pr(>F)
g          3  113.4  37.802  0.6278 0.6001
Residuals 56 3372.1  60.217


Also, 'mean squared' entries are 'sum of squared entries' divided by 'degrees of freedom' and 'mean squared entries' can be found from group means and variances. Thus, $$\mathrm{MSE = MS(Resid)} = 60.217$$ and $$\mathrm{MSF = MS(Group)} = 37.80$$ agree with the outputs above.

MSE = mean(c(var(x1),var(x2),var(x3),var(x4)));  MSE
 60.21651
MSF = 15*var(c(mean(x1),mean(x2),mean(x3),mean(x4)));  MSF
 37.80172

• Thank you for spending your time answering with so much detail. However I need to know the formulas to calculate SSE, SST and SSF in excel. I only have averages and variance for each group. mean<-(24.5, 25.8, 28.1, 29.5) variance<-(4.38, 3.49, 3.58, 3.58) and n<-(15, 15, 15, 15) N=60. I have from my notes the if I sumprod(variance*n) <- 4.38*15+3.49*15+3.58*15+3.58*15) I get SSE. However I have seen different answers for this and I don't know how to calculate either SST or SSF – Jah-Lahfui Jun 11 at 8:39
• Formulas in mathematical notation are widely available in intermediate-level applied statistics texts and online. Also, for the balanced one-way ANOVA, they are implemented in my R code. I don't use Excel. Maybe someone else is interested in illustrating that. – BruceET Jun 16 at 14:41