Please answer the following using the R software and provide the R code. DONT AN
ID: 3365973 • Letter: P
Question
Please answer the following using the R software and provide the R code. DONT ANSWER UNLESS YOU USE THE R SOFTWARE. I will give good rating if done properly. Thank You.
5. Suppose we want to compare three professors' teaching efficiency based on students' exam scores in a common exam. The following table gives the summary information. Class | # of students | Class average | Class SD 25 20 83 81 78 6 a). Find the average score for all students in these three classes (Copy your R code and the result). b). Calculate SSBetwesn (or SSG), the sum of square between the groups. (Copy your R code and the result)Explanation / Answer
> ## Class wise sample size
> n=c(25,20,22)
> ## Class wise average
> x=c(83,81,78)
> ## Clase wise satandard deviation
> s=c(6,8,7)
>
> ## a) The average score for all students in these three class is
> x_=sum(n*x)/sum(n)
> x_
[1] 80.76119
>
> ## b)
> SS_Between=sum(n*(x-x_)^2)
> SS_Between
[1] 294.1791