Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 15

Analysis of Variance

One-way approach

12/08/21 (c) Kim H. Pries, 2008 1


What does 1-way ANOVA do?
• Think of 1-way ANOVA as way to do a t-
test on more than 2 samples
• Could be used to compare rational
subgroups from an X  R Chart to
establish if the means are different
• Note that we are looking at means even if
the name is “analysis of variance”

12/08/21 (c) Kim H. Pries, 2008 2


The model

We are looking at some x with a collection of means, a common


error, and common (pooled) variance.

xij  i   ij
( n  1) s 2
 ( n  1) s 2
   ( n  1) s 2
s 2p  1 1 2 2 i i
(n1  1)  (n2  1)    (ni  1)
s p  s 2p

12/08/21 (c) Kim H. Pries, 2008 3


Excel
Anova: Single Factor

SUMMARY
Groups Count Sum Average Variance
Novice 448 31597.07181 70.52917814 396.2027655
Journeyman 91 6725.265215 73.90401335 328.5145933
Master 51 4079.110584 79.98256047 241.6530696

ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 4538.391685 2 2269.195842 6.089180334 0.002413022 3.011073029
Within Groups 218751.6031 587 372.6603119

Total 223289.9947 589

12/08/21 (c) Kim H. Pries, 2008 4


Excel data setup
Novice Journeyman Master
63.285 39.836 100.000
47.826 46.939 77.890
74.846 68.890 71.760
89.084 49.941 99.785
59.967 52.759 72.587
93.893 86.443 67.874
66.625 48.422 73.441
101.787 64.750 65.625
98.839 85.496 60.026
61.036 52.910 75.822
48.650 43.187 100.613
83.660 76.114 66.418
99.132 82.558 63.142
69.484 84.499 86.138
100.469 73.743 56.909
106.852 68.217 100.000
12/08/21 (c) Kim H. Pries, 2008 5
SigmaXL
One-Way ANOVA & Means Matrix: Standardized Exam Scores

H0: Mean 1 = Mean 2 = … = Mean k


Ha: At least one pair Mean i ≠ Mean j

Level journeyman master novice


Count 91 51 448
Mean 73.904 79.983 70.529
Standard Deviation 18.125 15.545 19.905
UC (2-sided, 95%, pooled) 77.878 85.292 72.320
LC (2-sided, 95%, pooled) 69.930 74.674 68.738

ANOVA:
Pooled Standard Deviation = 19.304 R-Sq = 2.03%
DF = 587 R-Sq adj. = 1.70%
F= 6.089
P-value = 0.0024

Pairwise Mean Difference (row - column) journeyman master novice


journeyman 0 -6.079 3.375
master 0 9.453
novice 0

Pairwise Probabilities journeyman master novice


journeyman 0.0724 0.1289
master 0.0010
novice

12/08/21 (c) Kim H. Pries, 2008 6


SigmaXL Boxplot
92.91
Mean/CI - Standardized Exam

87.91

82.91
Scores

77.91

72.91

67.91
journeyman master novice
Level

12/08/21 (c) Kim H. Pries, 2008 7


Minitab
One-way ANOVA: Standardized Exam Scores versus Level

Source DF SS MS F P
Level 2 4538 2269 6.09 0.002
Error 587 218752 373
Total 589 223290

S = 19.30 R-Sq = 2.03% R-Sq(adj) = 1.70%

Individual 95% CIs For Mean Based on


Pooled StDev
Level N Mean StDev ---+---------+---------+---------+------
journeyman 91 73.90 18.12 (-------*-------)
master 51 79.98 15.55 (----------*----------)
novice 448 70.53 19.90 (---*---)
---+---------+---------+---------+------
70.0 75.0 80.0 85.0

Pooled StDev = 19.30

12/08/21 (c) Kim H. Pries, 2008 8


Minitab boxplot
Boxplot of Standardized Exam Scores
140

120
Standardized Exam Scores

100

80

60

40

20

0
journeyman master novice
Level

12/08/21 (c) Kim H. Pries, 2008 9


Minitab Individual Value Dotplot
Individual Value Plot of Standardized Exam Scores vs Level
140

120
Standardized Exam Scores

100

80

60

40

20

0
journeyman master novice
Level

12/08/21 (c) Kim H. Pries, 2008 10


Getting data into R
> setwd("C:\\Documents and Settings\\KPries\\My
Documents\\Division\\PIR\\Six Sigma Champion\\New
Slide Set") # directory
> getwd()
[1] "C:/Documents and Settings/KPries/My
Documents/Division/PIR/Six Sigma Champion/New
Slide Set“ # proof of directory
> perf<-read.table("1-way ANOVA data
setb.csv",header=TRUE,sep=",") # comma-delimited
file
> # use of sep=“,” is critical to success
> attach(perf) #allows us to access header variables
# by name

12/08/21 (c) Kim H. Pries, 2008 11


Sample of CSV file
Level,Exam
novice,63.285
novice,47.826
novice,74.846
novice,89.084
novice,59.967
novice,93.893
novice,66.625
novice,101.787
novice,98.839
novice,61.036
novice,48.65
novice,83.66
novice,99.132
novice,69.484
novice,100.469
novice,106.852

12/08/21 (c) Kim H. Pries, 2008 12


R
> oneway.test(Exam ~ Level,data=perf,var.equal=FALSE)

One-way analysis of means (not assuming equal


variances)

data: Exam and Level


F = 8.3084, num df = 2.000, denom df = 116.133, p-value =
0.0004242

> oneway.test(Exam ~ Level,data=perf,var.equal=TRUE)

One-way analysis of means

data: Exam and Level


F = 6.0892, num df = 2, denom df = 587, p-value = 0.002413

12/08/21 (c) Kim H. Pries, 2008 13


R Boxplot

140
120
100
80
60
40
20

journeyman master novice

> boxplot(Exam ~ Level,data=perf)

12/08/21 (c) Kim H. Pries, 2008 14


Bottom line finally
• What can we say about this?
• We have a least one mean that is
sufficiently different, we cannot say they
are equal
• That is all you get with 1-way ANOVA
• If that is all we need, we are done

12/08/21 (c) Kim H. Pries, 2008 15

You might also like