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

A psychology student was interested in testing how food consumption by rats woul

ID: 3159426 • Letter: A

Question

A psychology student was interested in testing how food consumption by rats would be affected by a particular drug. She used two levels of one attribute, namely drug and placebo, and four levels of a second attribute, namely male (M), castrated (C), female (F), and ovariectomized (O). For each cell she observed five rats. The amount of food consumed in grams per 24 hours is listed in the table.

M C F O

Drug 22.56 16.54 18.58 18.20

25.02 24.64 15.44 14.56

23.66 24.62 16.12 15.54

17.22 19.06 16.88 16.82

22.58 20.12 17.58 14.56

Placebo

25.64 22.50 17.82 19.74

28.84 24.48 15.76 17.48

26.00 25.52 12.96 16.46

26.02 24.76 15.00 16.44

23.24 20.62 19.54 15.70

Explanation / Answer

This is two-way anova table with replication per cell. We will conduct the anova in R.

Code:

in_wt<-c(120,141,130,162,150,148,135,140,129,120,140,130)
aft_wt<-c(123,143,140,162,145,150,140,143,130,118,141,132)

t.test(in_wt,aft_wt,paired=TRUE,conf.level=0.95)

at1<-c(rep("drugs",20),rep("placebo",20))
at2<-c(rep("M",5),rep("C",5),rep("F",5),rep("O",5),
rep("M",5),rep("C",5),rep("F",5),rep("O",5))
food<-c(22.56,25.02,23.66,17.22,22.58,16.54,24.64,24.62,19.6,20.12,18.58,15.44,
16.12,16.88,17.58,18.20,14.56,15.54,16.82,14.56,25.64,28.84,26.00,26.02,
23.24,22.50,24.48,25.52,24.76,20.62,17.82,15.76,12.96,15.00,19.54,19.74,
17.48,16.46,16.44,15.70)

data<-data.frame(at1,at2,food)
data
data$at1<-as.factor(data$at1)
data$at2<-as.factor(data$at2)
anova(lm(food ~ at1 * at2,data))

Output:


> at1<-c(rep("drugs",20),rep("placebo",20))
> at2<-c(rep("M",5),rep("C",5),rep("F",5),rep("O",5),
+ rep("M",5),rep("C",5),rep("F",5),rep("O",5))
> food<-c(22.56,25.02,23.66,17.22,22.58,16.54,24.64,24.62,19.6,20.12,18.58,15.44,
+ 16.12,16.88,17.58,18.20,14.56,15.54,16.82,14.56,25.64,28.84,26.00,26.02,
+ 23.24,22.50,24.48,25.52,24.76,20.62,17.82,15.76,12.96,15.00,19.54,19.74,
+ 17.48,16.46,16.44,15.70)
>
> data<-data.frame(at1,at2,food)
> data
at1 at2 food
1 drugs M 22.56
2 drugs M 25.02
3 drugs M 23.66
4 drugs M 17.22
5 drugs M 22.58
6 drugs C 16.54
7 drugs C 24.64
8 drugs C 24.62
9 drugs C 19.60
10 drugs C 20.12
11 drugs F 18.58
12 drugs F 15.44
13 drugs F 16.12
14 drugs F 16.88
15 drugs F 17.58
16 drugs O 18.20
17 drugs O 14.56
18 drugs O 15.54
19 drugs O 16.82
20 drugs O 14.56
21 placebo M 25.64
22 placebo M 28.84
23 placebo M 26.00
24 placebo M 26.02
25 placebo M 23.24
26 placebo C 22.50
27 placebo C 24.48
28 placebo C 25.52
29 placebo C 24.76
30 placebo C 20.62
31 placebo F 17.82
32 placebo F 15.76
33 placebo F 12.96
34 placebo F 15.00
35 placebo F 19.54
36 placebo O 19.74
37 placebo O 17.48
38 placebo O 16.46
39 placebo O 16.44
40 placebo O 15.70
> data$at1<-as.factor(data$at1)
> data$at2<-as.factor(data$at2)
> anova(lm(food ~ at1 * at2,data))
Analysis of Variance Table

Response: food
Df Sum Sq Mean Sq F value Pr(>F)
at1 1 28.36 28.359 5.4190 0.0264 *
at2 3 457.33 152.443 29.1304 2.833e-09 ***
at1:at2 3 26.90 8.965 1.7132 0.1840
Residuals 32 167.46 5.233
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>

We have the anova table above. and we see that p-value for intercztion effect is greater than 0.05, so there is no significant interaction between the two attributes. But the p-value of second attribute is much much less than 0.05, so there is a significant evidence that food consumption by rats is significantly afftected by the four level of 2nd attribute.and the same conclusion for 1st attribute also holds as p-value is less than 0.05.

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