Lecture Powerpoints

advertisement
Statistics
Bennie Waller
wallerbd@longwood.edu
434-395-2046
Longwood University
201 High Street
Farmville, VA 23901
Bennie D Waller, Longwood University
Analysis of variance
ANOVA
Bennie Waller
wallerbd@longwood.edu
434-395-2046
Longwood University
201 High Street
Farmville, VA 23901
Bennie D Waller, Longwood University
ANOVA
The F Distribution
• It is
– used to test whether two samples have equal
variances
– used to compare the means of more than two
populations simultaneously. The simultaneous
comparison of several population means is called
analysis of variance(ANOVA).
Bennie D Waller, Longwood University
ANOVA
The F Distribution
H0: σ12 = σ22
H1: σ12 ≠ σ22
H0: µ1 = µ2 =…= µk
H1: The means are not all equal
Bennie D Waller, Longwood University
ANOVA
Test for Equal Variances - Example
Step 1: The hypotheses are:
H0: σ12 = σ22
H1: σ12 ≠ σ22
Step 2: The significance level is .10.
Step 3: The test statistic is the F distribution.
Bennie D Waller, Longwood University
12-5
ANOVA
Test for Equal Variances - Example
Step 4: State the decision rule.
Reject H0 if
F > F/2,v1,v2
F > F.10/2,7-1,8-1
F > F.05,6,7
Bennie D Waller, Longwood University
12-6
ANOVA
Consider the following example of travel times on different routes
F-Test Two-Sample
for Variances
Route-25
I-75
Mean
58.2857
59
Variance
80.9046
19.1426
Observations
7
8
df
6
7
F
4.22638
P(F<=f) one-tail
0.04037
F Critical one-tail
3.86599
See example in spreadsheet “VARanova” tab
Bennie D Waller, Longwood University
Variance
B
A
Bennie D Waller, Longwood University
ANOVA
Comparing Means of Two or More Populations
• The Null Hypothesis is that the population means are all the same. The
Alternative Hypothesis is that at least one of the means is different.
• The Test Statistic is the F distribution.
• The Decision rule is to reject the null hypothesis if F (computed) is
greater than F (table) with numerator and denominator degrees of freedom.
• Hypothesis Setup and Decision Rule:
H0: µ1 = µ2 =…= µk
H1: The means are not all equal
Reject H0 if F > F,k-1,n-k
Bennie D Waller, Longwood University
12-9
ANOVA
Analysis of Variance – F statistic
• If there are k populations being sampled, the numerator degrees
of freedom is k – 1.
• If there are a total of n observations the denominator degrees of
freedom is n – k.
• The test statistic is computed by:
F 
SST
SSE
k  1
n  k 
Bennie D Waller, Longwood University
12-10
ANOVA
Number of orders processed
Andy
55
54
59
56
µ=56
Betty
66
76
67
71
µ=70
Cathy
47
51
46
48
µ=48
H0: µA = µB = µC
H1: The means are not all equal
Reject H0 if F > F,k−1,n−k
F 
SST
SSE
Bennie D Waller, Longwood University
k  1
n  k 
Consider the following example comparing the difference in means of three groups
Anova: Single Factor
SUMMARY
Groups
Count
Andy
4
Betty
4
Cathy
4
NOTICE THE
DIFFERENCE IN
VARIATION
ACROSS
GROUPS
RELATIVE TO
WITHIN
GROUPS
Sum
Average Variance
224
56 4.666667
280
70 20.66667
192
48 4.666667
ANOVA
Source of Variation
Between Groups
Within Groups
Total
F 
SS
992
90
1082
992 3  1 
90 12  3 
df
2
9
MS
496
10
F
49.6
P-value
1.38E-05
F crit
4.256495
11
 496 / 10  49 . 6
See example in spreadsheet “ANOVAMeans” tab
Bennie D Waller, Longwood University
ANOVA
Problem: A company compared the variance of salaries for employees who have been
employed for 5 years or less with employees who have been employed for 10 years or
more. They randomly selected 21 employees with 5 years or less experience and 15
employees with 10 years or more experience. The standard deviation for the group with
5 years or less experience was $2,225; the standard deviation for the group with 10 years
or more experience is $1,875. Using the 0.05 significance level, what is the decision
regarding the null hypothesis?
Bennie D Waller, Longwood University
ANOVA
Given the following Analysis of Variance table for three treatments each with six
observations. What is the decision regarding the null hypothesis?
Bennie D Waller, Longwood University
End
Bennie D Waller, Longwood University
Download