# 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
[1] 60.21651
MSF = 15*var(c(mean(x1),mean(x2),mean(x3),mean(x4)));  MSF
[1] 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
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 4, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://stats.stackexchange.com/questions/530214/anova-1-way-how-to-calculate-ssf/530226", "fetch_time": 1627367894000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2021-31/segments/1627046152236.64/warc/CC-MAIN-20210727041254-20210727071254-00261.warc.gz", "warc_record_offset": 551205328, "warc_record_length": 38284, "token_count": 953, "char_count": 2942, "score": 3.984375, "int_score": 4, "crawl": "CC-MAIN-2021-31", "snapshot_type": "latest", "language": "en", "language_score": 0.9128445386886597, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00061-of-00064.parquet"}