0% found this document useful (0 votes)
117 views19 pages

One-Way ANOVA: Borbon, Klied Erica B. Largo, Vyankha Jhouana L

1. There was no significant difference found between the average grades given by the three teachers based on a one-way ANOVA test with a p-value of 0.92 which is greater than the 0.05 level of significance. 2. A two-way ANOVA test found no significant difference in difficulty between the four subjects or ability between the five students based on their final grades, with p-values above 0.05. 3. A two-way ANOVA with interaction on quiz scores by subject and student found no significant interaction between the factors, with a p-value of 0.687 above the 0.05 significance level.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views19 pages

One-Way ANOVA: Borbon, Klied Erica B. Largo, Vyankha Jhouana L

1. There was no significant difference found between the average grades given by the three teachers based on a one-way ANOVA test with a p-value of 0.92 which is greater than the 0.05 level of significance. 2. A two-way ANOVA test found no significant difference in difficulty between the four subjects or ability between the five students based on their final grades, with p-values above 0.05. 3. A two-way ANOVA with interaction on quiz scores by subject and student found no significant interaction between the factors, with a p-value of 0.687 above the 0.05 significance level.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Borbon, Klied Erica B.

Largo, Vyankha Jhouana L.

One-Way ANOVA
1. Three sections of the same elementary mathematics courses are
taught by three teachers. The final grades were recorded as
follows:

Teacher
A B C
73 88 68
89 78 79
82 48 56
43 91 91
80 51 71
73 85 71
66 74 87
60 77 41
45 31 59
93 78 68
36 62 53
77 76 79
96 15
80
56

Test for homogeneity of variances. Is there a significant


difference in the average grades given by the three teachers?
Use a 0.05 level of significance.
Interpretation:

Residual standard Bartlett's K-


Deg. of Freedom p-value
error squared

19.23782 0.9171
0.1732 2

Sum of Squares Deg. of Freedom

A 337.598 2
Residuals 13323.376 36

ANOVA: Two – way Classification

2. The following data represent the final grades obtained by


five students in Mathematics, English, French, and Biology.

Subject
Student Mathematics English French Biology
1 68 57 73 61
2 83 94 91 86
3 72 81 63 59
4 55 73 77 66
5 92 68 75 87
Use a 0.05 level of significance to test the hypothesis that

(a) the courses are of equal difficulty;


(b) the students have equal ability;
(c) Use the multiple – range test, with a 0.05 level of
significance, to analyze the mean grades obtained by the five
students.

Interpratation:

Sum of Squares Deg. of Freedom

Subject 42.150 3

Students 46.225 1

Subject: Students 106.275 3

Residuals 2578.300 12

Residual standard error: 14.65805


ANOVA: Two – way Classification with Interaction
3. The following data represent the results of four quizzes
obtained by five students in Mathematics, English, French, and
Biology:
Student Mathematics English French Biology
1 88 63 51 58 73 81 87 81
79 80 72 65 77 77 92 76
2 79 96 85 95 82 36 80 93
56 68 67 88 80 68 62 67
3 67 66 74 47 91 95 77 70
51 89 59 82 59 92 84 73
4 35 60 76 49 43 52 55 49
64 70 26 76 42 32 53 56
5 99 77 84 94 95 81 83 76
87 95 83 76 98 96 87 80

Use a 0.05 level of significance to test the hypothesis that


(a) The courses are of equal difficulty;
(b) The students have equal ability;
(c) The students and subjects do not interact.

Interpretation:

Degrees of Sum of Mean


F-Value Pr(>F)
freedom squares squares
Subject 3 158 52.65 0.167 0.918

Student 1 2 2.03 0.006 0.936


Subject:
3 467 155.68 0.495 0.687
Students
Residuals 72 22634 314.37
Appendix:

Part 1.
1. Homogeneity of Variances:
> t<-read.csv("D:/aaaaa.csv",header=T,sep="," )
> t
A X73
1 A 89
2 A 82
3 A 43
4 A 80
5 A 73
6 A 66
7 A 60
8 A 45
9 A 93
10 A 36
11 A 77
12 B 88
13 B 78
14 B 48
15 B 91
16 B 51
17 B 85
18 B 74
19 B 77
20 B 31
21 B 78
22 B 62
23 B 76
24 B 96
25 B 80
26 B 56
27 C 68
28 C 79
29 C 56
30 C 91
31 C 71
32 C 71
33 C 87
34 C 41
35 C 59
36 C 68
37 C 53
38 C 79
39 C 15
> bartlett.test(X73~A, data=t)

Bartlett test of homogeneity of variances

data: X73 by A
Bartlett's K-squared = 0.1732, df = 2, p-value = 0.9171

There is no significant difference in the average grades given


by the teachers since the p-value 0.92 is greater than the
alpha which is 0.05 level of significance.
> summary(t)
A X73
A:11 Min. :15.00
B:15 1st Qu.:56.00
C:13 Median :73.00
Mean :68.03
3rd Qu.:80.00
Max. :96.00
> a=aov(X73~A, data=t)
> a
Call:
aov(formula = X73 ~ A, data = t)

Terms:
A Residuals
Sum of Squares 337.598 13323.376
Deg. of Freedom 2 36

Residual standard error: 19.23782


Estimated effects may be unbalanced

2.
> a<-read.csv("D:/final1.csv",header=T,sep=",")
> a
Subject Students Grades
1 Mathematics 1 68
2 Mathematics 2 83
3 Mathematics 3 72
4 Mathematics 4 55
5 Mathematics 5 92
6 English 1 57
7 English 2 94
8 English 3 81
9 English 4 73
10 English 5 68
11 French 1 73
12 French 2 91
13 French 3 63
14 French 4 77
15 French 5 75
16 Biology 1 61
17 Biology 2 86
18 Biology 3 59
19 Biology 4 66
20 Biology 5 87
> b=aov(Grades~Subject*Students,data=a)
> b
Call:
aov(formula = Grades ~ Subject * Students, data = a)

Terms:
Subject Students Subject:Students Residuals
Sum of Squares 42.150 46.225 106.275 2578.300
Deg. of Freedom 3 1 3 12

Residual standard error: 14.65805


Estimated effects may be unbalanced
> summary(a)
Subject Students Grades
Biology :5 Min. :1 Min. :55.00
English :5 1st Qu.:2 1st Qu.:65.25
French :5 Median :3 Median :73.00
Mathematics:5 Mean :3 Mean :74.05
3rd Qu.:4 3rd Qu.:83.75
Max. :5 Max. :94.00
> summary(a)
Subject Students Grades
Biology :5 Min. :1 Min. :55.00
English :5 1st Qu.:2 1st Qu.:65.25
French :5 Median :3 Median :73.00
Mathematics:5 Mean :3 Mean :74.05
3rd Qu.:4 3rd Qu.:83.75
Max. :5 Max. :94.00
3.
> v<-read.csv("D:/bio1.csv",header=T,sep=",")
> v
Subject Students Grades
1 Mathematics 1 88
2 Mathematics 1 79
3 Mathematics 1 63
4 Mathematics 1 80
5 Mathematics 2 79
6 Mathematics 2 56
7 Mathematics 2 96
8 Mathematics 2 68
9 Mathematics 3 67
10 Mathematics 3 51
11 Mathematics 3 66
12 Mathematics 3 89
13 Mathematics 4 35
14 Mathematics 4 64
15 Mathematics 4 70
16 Mathematics 4 60
17 Mathematics 5 99
18 Mathematics 5 87
19 Mathematics 5 77
20 Mathematics 5 95
21 English 1 51
22 English 1 72
23 English 1 65
24 English 1 58
25 English 2 85
26 English 2 67
27 English 2 95
28 English 2 88
29 English 3 74
30 English 3 59
31 English 3 47
32 English 3 82
33 English 4 76
34 English 4 26
35 English 4 49
36 English 4 76
37 English 5 84
38 English 5 83
39 English 5 94
40 English 5 76
41 French 1 73
42 French 1 77
43 French 1 81
44 French 1 77
45 French 2 82
46 French 2 80
47 French 2 36
48 French 2 68
49 French 3 91
50 French 3 59
51 French 3 95
52 French 3 92
53 French 4 43
54 French 4 42
55 French 4 52
56 French 4 32
57 French 5 95
58 French 5 98
59 French 5 81
60 French 5 96
61 Biology 1 87
62 Biology 1 92
63 Biology 1 81
64 Biology 1 76
65 Biology 2 80
66 Biology 2 62
67 Biology 2 93
68 Biology 2 67
69 Biology 3 77
70 Biology 3 84
71 Biology 3 70
72 Biology 3 73
73 Biology 4 55
74 Biology 4 53
75 Biology 4 49
76 Biology 4 56
77 Biology 5 83
78 Biology 5 87
79 Biology 5 76
80 Biology 5 80
> w=aov(Grades~Subject*Students,data=v)
> w
Call:
aov(formula = Grades ~ Subject * Students, data = v)

Terms:
Subject Students Subject:Students Residuals
Sum of Squares 157.937 2.025 467.025 22634.400
Deg. of Freedom 3 1 3 72

Residual standard error: 17.73039


Estimated effects may be unbalanced
> summary(w)
Df Sum Sq Mean Sq F value Pr(>F)
Subject 3 158 52.65 0.167 0.918
Students 1 2 2.03 0.006 0.936
Subject:Students 3 467 155.68 0.495 0.687
Residuals 72 22634 314.37
Part 2
1.
> shapiro.test(t$X73)

Shapiro-Wilk normality test

data: t$X73
W = 0.94508, p-value = 0.05616
> bartlett.test(X73~A, data=t)

Bartlett test of homogeneity of variances

data: X73 by A
Bartlett's K-squared = 0.1732, df = 2, p-value = 0.9171
> LSD.test(model,"A",p.adj="bon",console=TRUE)

Study: model ~ "A"

LSD t Test for X73


P value adjustment method: bonferroni

Mean Square Error: 370.0938

A, means and individual ( 95 %) CI

X73 std r LCL UCL Min Max


A 67.63636 19.38181 11 55.87256 79.40016 36 93
B 71.40000 18.10998 15 61.32608 81.47392 31 96
C 64.46154 20.36179 13 53.64042 75.28266 15 91

alpha: 0.05 ; Df Error: 36


Critical Value of t: 2.51104

Minimum difference changes for each comparison


Means with the same letter are not significantly different.

Groups, Treatments and means


a B 71.4
a A 67.64
a C 64.46
> comparison<-duncan.test(model,"A",main="X73 with different A")
> duncan.test(model,"A",alpha=0.01,console=TRUE)

Study: model ~ "A"

Duncan's new multiple range test


for X73

Mean Square Error: 370.0938

A, means

X73 std r Min Max


A 67.63636 19.38181 11 36 93
B 71.40000 18.10998 15 31 96
C 64.46154 20.36179 13 15 91

alpha: 0.01 ; Df Error: 36

Critical Range
2 3
20.68556 21.57125

Harmonic Mean of Cell Sizes 12.79324

Different value for each comparison


Means with the same letter are not significantly different.
Groups, Treatments and means
a B 71.4
a A 67.64
a C 64.46

2.
> shapiro.test(a$Grades)

Shapiro-Wilk normality test

data: a$Grades
W = 0.95858, p-value = 0.5159
> bartlett.test(Students~Subject, data=a)

Bartlett test of homogeneity of variances

data: Students by Subject


Bartlett's K-squared = 0, df = 3, p-value = 1
> bartlett.test(Grades~Students, data=a)

Bartlett test of homogeneity of variances

data: Grades by Students


Bartlett's K-squared = 1.8657, df = 4, p-value = 0.7604
> library(agricolae)
> model<-aov(Students~Subject, data=a)
> comparison<-duncan.test(model,"Subject", main="Students with
different Subject")
> duncan.test(model,"Subject",alpha=0.01,console=TRUE)

Study: model ~ "Subject"

Duncan's new multiple range test


for Students
Mean Square Error: 2.5

Subject, means

Students std r Min Max


Biology 3 1.581139 5 1 5
English 3 1.581139 5 1 5
French 3 1.581139 5 1 5
Mathematics 3 1.581139 5 1 5

alpha: 0.01 ; Df Error: 16

Critical Range
2 3 4
2.920782 3.046418 3.128607

Means with the same letter are not significantly different.

Groups, Treatments and means


a Biology 3
a English 3
a French 3
a Mathematics 3

> library(agricolae)
> model<-aov(Students~Subject, data=a)
> out<-LSD.test(model,"virus", p.adj="bonferroni")
> attach(a)
> df<-df.residual(model)
> MSerror<-deviance(model)/df
> out<-LSD.test(model,"Subject", p.adj="bonferroni")
> out
$statistics
Mean CV MSerror LSD
3 52.70463 2.5 3.008334

$parameters
Df ntr bonferroni
16 4 3.008334

$means
Students std r LCL UCL Min Max
Biology 3 1.581139 5 1.501001 4.498999 1 5
English 3 1.581139 5 1.501001 4.498999 1 5
French 3 1.581139 5 1.501001 4.498999 1 5
Mathematics 3 1.581139 5 1.501001 4.498999 1 5

$comparison
NULL

$groups
trt means M
1 Biology 3 a
2 English 3 a
3 French 3 a
4 Mathematics 3 a
3.> shapiro.test(v$Grades)

Shapiro-Wilk normality test

data: v$Grades
W = 0.95499, p-value = 0.006728
> bartlett.test(Students~Subject, data=v)

Bartlett test of homogeneity of variances

data: Students by Subject


Bartlett's K-squared = 0, df = 3, p-value = 1

> bartlett.test(Grades~Students, data=v)

Bartlett test of homogeneity of variances

data: Grades by Students


Bartlett's K-squared = 7.9037, df = 4, p-value = 0.09517
> library(agricolae)
> model<-aov(Students~Subject, data=v)
> comparison<-duncan.test(model,"Subject", main="Students with
different Subject")
> duncan.test(model,"Subject",alpha=0.01,console=TRUE)

Study: model ~ "Subject"

Duncan's new multiple range test


for Students

Mean Square Error: 2.105263


Subject, means

Students std r Min Max


Biology 3 1.450953 20 1 5
English 3 1.450953 20 1 5
French 3 1.450953 20 1 5
Mathematics 3 1.450953 20 1 5

alpha: 0.01 ; Df Error: 76

Critical Range
2 3 4
1.212269 1.263747 1.298570

Means with the same letter are not significantly different.

Groups, Treatments and means


a Biology 3
a English 3
a French 3
a Mathematics 3
>
> library(agricolae)
> model<-aov(Students~Subject, data=v)
> out<-LSD.test(model,"Subject", p.adj="bonferroni")
> attach(v)
The following objects are masked from a (pos = 3):

Grades, Students, Subject

The following objects are masked from a (pos = 4):

Grades, Students, Subject


> df<-df.residual(model)
> MSerror<-deviance(model)/df
> out<-LSD.test(model,"Subject", p.adj="bonferroni")
> out
$statistics
Mean CV MSerror LSD
3 48.36508 2.105263 1.243007

$parameters
Df ntr bonferroni
76 4 2.70907

$means
Students std r LCL UCL Min Max
Biology 3 1.450953 20 2.353816 3.646184 1 5
English 3 1.450953 20 2.353816 3.646184 1 5
French 3 1.450953 20 2.353816 3.646184 1 5
Mathematics 3 1.450953 20 2.353816 3.646184 1 5

$comparison
NULL

$groups
trt means M
1 Biology 3 a
2 English 3 a
3 French 3 a
4 Mathematics 3 a

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy