Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Six samples of each of four types of cereal grain grown in a certain region were

ID: 3046757 • Letter: S

Question

Six samples of each of four types of cereal grain grown in a certain region were analyzed to determine thiamin content, resulting in the following data /g copy it directly into R. Note: If you want to use R this data has been set up so you may Wheat c 5.1, 4.5, 6.1, 6.2, 6.6, 5.7) Bariey-c 6.5, 8.0, 6.1, 7.4, 5.8, 5.7) Maize=c( 5.9, 4.8, 6.3, 4.9, 6.1, 5.1) Oats=c( 8.3, 6.0, 7.8, 6.9, 5.5, 7.1) In this example and J = the individual group means, x wheat = x Barley X Maize xoats = What is the grand mean x? Calculate the mean squared treatment. (Round your answer to two decimal places.) Calculate the variance for each group. Note: These can be done in R using the var) command. s2 wheat Barley = Maize Calculate the mean squared error. (Round your answer to two decimal places.)

Explanation / Answer

wheat=c(5.1,4.5,6.1,6.2,6.6,5.7)
wheat
barley=c(6.5,8.0,6.1,7.4,5.8,5.7)
barley
maize=c(5.9,4.8,6.3,4.9,6.1,5.1)
maize
oats=c(8.3,6.0,7.8,6.9,5.5,7.1)
oats

i=4
j=6

wheatmean=mean(wheat)
wheatmean
barleymean=mean(barley)
barleymean
maizemean=mean(maize)
maizemean
oatsmean=mean(oats)
oatsmean
grandmean=mean(wheatmean,barleymean,maizemean,oatsmean)
grandmean

MSTr=(j/(i-1))*((wheatmean-grandmean)+(barleymean-grandmean)+(maizemean-grandmean)+(oatsmean-grandmean))
MSTr

wheatvar=var(wheat)
wheatvar
barleyvar=var(barley)
barleyvar
maizevar=var(maize)
maizevar
oatsvar=var(oats)
oatsvar

MSE=(wheatvar+barleyvar+maizevar+oatsvar)/i
MSE

F=MSTr/MSE
F

OUTPUT:

> wheat=c(5.1,4.5,6.1,6.2,6.6,5.7)
> wheat
[1] 5.1 4.5 6.1 6.2 6.6 5.7
> barley=c(6.5,8.0,6.1,7.4,5.8,5.7)
> barley
[1] 6.5 8.0 6.1 7.4 5.8 5.7
> maize=c(5.9,4.8,6.3,4.9,6.1,5.1)
> maize
[1] 5.9 4.8 6.3 4.9 6.1 5.1
> oats=c(8.3,6.0,7.8,6.9,5.5,7.1)
> oats
[1] 8.3 6.0 7.8 6.9 5.5 7.1
>
> i=4
> j=6
>
> wheatmean=mean(wheat)
> wheatmean
[1] 5.7
> barleymean=mean(barley)
> barleymean
[1] 6.583333
> maizemean=mean(maize)
> maizemean
[1] 5.516667
> oatsmean=mean(oats)
> oatsmean
[1] 6.933333
> grandmean=mean(wheatmean,barleymean,maizemean,oatsmean)
> grandmean
[1] 5.7
>
> MSTr=(j/(i-1))*((wheatmean-grandmean)+(barleymean-grandmean)+(maizemean-grandmean)+(oatsmean-grandmean))
> MSTr
[1] 3.866667
>
> wheatvar=var(wheat)
> wheatvar
[1] 0.604
> barleyvar=var(barley)
> barleyvar
[1] 0.8616667
> maizevar=var(maize)
> maizevar
[1] 0.4336667
> oatsvar=var(oats)
> oatsvar
[1] 1.114667
>
> MSE=(wheatvar+barleyvar+maizevar+oatsvar)/i
> MSE
[1] 0.7535
>
> F=MSTr/MSE
> F
[1] 5.131608
> F=MSTr/MSE

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote