14.3 Use ANOVA

The Null hypothesis is: H0:it is true that μP=μA=μJ While the alternative is:

H0:it is NOT true that μP=μA=μJ

The Sample Variance of Y: Var(Y)=1NGk=1Nki=1(YikˉY)2 ### Example 2

N<- 5 # number of people
G<- 2 # groups
data2 <- tibble(name=c("Ann","Ben","Cat","Dan","Egg"),
       person_p=seq_along(1:5),
       group=c("cool","cool","cool","uncool","uncool"),
       group_k=c(1,1,1,2,2),
       index_i=c(1,2,3,1,2),
       grumpiness_Yp=c(20,55,21,91,22)
       )
data2
## # A tibble: 5 × 6
##   name  person_p group  group_k index_i grumpiness_Yp
##   <chr>    <int> <chr>    <dbl>   <dbl>         <dbl>
## 1 Ann          1 cool         1       1            20
## 2 Ben          2 cool         1       2            55
## 3 Cat          3 cool         1       3            21
## 4 Dan          4 uncool       2       1            91
## 5 Egg          5 uncool       2       2            22

Var(Y)=1NNp=1(YpˉY)2