In: Statistics and Probability
A pet food company has a business objective of expanding its product line beyond its current kidney and shrimp-based cat foods. The company developed two new products, one based on chicken liver and the other based on salmon. The company conducted an experiment to compare the two new products with its existing ones , as well as a generic beef-based product sold at a supermarket chain.
For the experiment, a sample of 35 cats from the population at a local animal shelter was selected. Seven cats were randomly assigned to each of the five products being tested. Each of the cats was then presented with 3 ounces of the selected food in a dish at feeding time. The researches defined the variable to be measured as the number of ounces of food that the cat consumed within a 10 minute time interval that began when the filled dish was presented. The results of the experiment are summarized in the table below;
Kidney |
Shrimp |
Chicken Liver |
Salmon |
Beef |
2.37 |
2.26 |
2.29 |
1.79 |
2.09 |
2.62 |
2.69 |
2.23 |
2.33 |
1.87 |
2.31 |
2.25 |
2.41 |
1.96 |
1.67 |
2.47 |
2.45 |
2.68 |
2.05 |
1.64 |
2.59 |
2.34 |
2.25 |
2.26 |
2.16 |
2.62 |
2.37 |
2.17 |
2.24 |
1.75 |
2.34 |
2.22 |
2.37 |
1.96 |
1.18 |
a) State the appropriate null and alternative hypotheses for this experiment.
b) Use r coding to generate an ANOVAtable. Identify the Sum of Squares between (among) Groups, the Mean of Squares within Groups , the F statistic, and the p value.
c) Use your p value to determine if you are going to reject or fail to reject the null hypothesis at the .05 significance level.
d) Use the F statistic and the F critical value Fc , to determine if you fail to reject the null hypothesis. (Remember that the Fcvalue, and you reject the null hypothesis if Fstat> Fc. You fail to reject the null hypothesis if Fstat< Fc. )
Solution:
create a dataframe df and use aov fucntion to get ANOVA table.Use sumamry fucntion to get F and P value
1-kidney
2-shrimp
3-chicken liver
4-salmon
5-beef
Rcode:
df=read.table(header = TRUE, text ="
Product Food
1 2.37
1 2.62
1 2.31
1 2.47
1 2.59
1 2.62
1 2.34
2 2.26
2 2.69
2 2.25
2 2.45
2 2.34
2 2.37
2 2.22
3 2.29
3 2.23
3 2.41
3 2.68
3 2.25
3 2.17
3 2.37
4 1.79
4 2.33
4 1.96
4 2.05
4 2.26
4 2.24
4 1.96
5 2.09
5 1.87
5 1.67
5 1.64
5 2.16
5 1.75
5 1.18
"
)
df
df$Product <- ordered(df$Product ,
levels = c("1", "2", "3","4","5"))
res.aov <- aov(Food ~ Product, data = df)
summary(res.aov)
Output:
summary(res.aov)
Df Sum Sq Mean Sq F value Pr(>F)
Product 4 2.281 0.5701 12.98 2.99e-06 ***
Residuals 30 1.317 0.0439
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
olution-A:
Ho:
Ha:atleast one of the group means are different
b) Use r coding to generate an ANOVAtable. Identify the Sum of Squares between (among) Groups, the Mean of Squares within Groups , the F statistic, and the p value.
Sum of Squares between Groups =2.281
Sum of Squares (among) Groups =1.317
Mean Squares between Groups =0.5701
Mean Squares (among) Groups =0.0439
F=12.98
p=2.99e-06=0.0000
c) Use your p value to determine if you are going to reject or fail to reject the null hypothesis at the .05 significance level.
p=0.0000
alpha=0.05
p<alpha
Reject Ho.
d) Use the F statistic and the F critical value Fc , to determine if you fail to reject the null hypothesis. (Remember that the Fcvalue, and you reject the null hypothesis if Fstat> Fc. You fail to reject the null hypothesis if Fstat< Fc. )
F critical value is
=F.INV.RT(0.05,4,30)
=
2.689628 |
F stat>Fc ritical
reject the null hypothesis