ANOVA.table
## Analysis of Variance Table
##
## Response: iq
## Df Sum Sq Mean Sq F value Pr(>F)
## group 2 1529.4 764.69 20.016 7.843e-07 ***
## Residuals 42 1604.5 38.20
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
F.stat
## [1] 20.01637
p.value
## [1] 7.843384e-07
I can conclude, based on the data, that there is a significant difference between the IQs of at least two of the average IQs of these groups.
If in reality the average IQ of all of the different groups were the same, the probability of recording this data (or more extreme) is less than 7.843384e-07.
## Loading required package: tcltk
library(asbio)
bonfCI(IQ$iq,IQ$group,conf.level = 0.99)
##
## 99% Bonferroni confidence intervals
##
## Diff Lower Upper Decision Adj. p-value
## muA-muB -0.06667 -7.09123 6.9579 FTR H0 1
## muA-muC -12.4 -19.42457 -5.37543 Reject H0 6e-06
## muB-muC -12.33333 -19.3579 -5.30877 Reject H0 7e-06
The group means that are significantly different according to my confidence intervals are muA and muC, muB and muC.
The two means with the largest difference according to my confidence intervals are muB and muC.
The average IQ between the three majors are significantly different.
IQ <- read.csv("C:/Users/Lisa/Downloads/IQ.csv")
the.model = lm(iq ~ group, data = IQ)
ANOVA.table = anova(the.model)
ANOVA.table
## Analysis of Variance Table
##
## Response: iq
## Df Sum Sq Mean Sq F value Pr(>F)
## group 2 1529.4 764.69 20.016 7.843e-07 ***
## Residuals 42 1604.5 38.20
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
F.stat = ANOVA.table[1,4]
p.value = ANOVA.table[1,5]
F.stat
## [1] 20.01637
p.value
## [1] 7.843384e-07
I can conclude, based on the data, that there is a significant difference between the IQs of at least two of the average IQs of these groups.
If in reality the average IQ of all of the different groups were the same, the probability of recording this data (or more extreme) is less than 7.843384e-07.
library(asbio)
## Warning: package 'asbio' was built under R version 3.2.3
## Loading required package: tcltk
library(asbio)
bonfCI(IQ$iq,IQ$group,conf.level = 0.99)
##
## 99% Bonferroni confidence intervals
##
## Diff Lower Upper Decision Adj. p-value
## muA-muB -0.06667 -7.09123 6.9579 FTR H0 1
## muA-muC -12.4 -19.42457 -5.37543 Reject H0 6e-06
## muB-muC -12.33333 -19.3579 -5.30877 Reject H0 7e-06
The group means that are significantly different according to my confidence intervals are muA and muC, muB and muC.
The two means with the largest difference according to my confidence intervals are muB and muC.
The average IQ between the three majors are significantly different.