SLIDE 1
Business Statistics CONTENTS Comparing the variance of two - - PowerPoint PPT Presentation
Business Statistics CONTENTS Comparing the variance of two - - PowerPoint PPT Presentation
TWO 2 S: COMPARISONS Business Statistics CONTENTS Comparing the variance of two populations The -distribution The -test Levenes test Old exam question Further study COMPARING THE VARIANCE OF TWO POPULATIONS So far, the
SLIDE 2
SLIDE 3
βͺ So far, the emphasis was on differences in centrality βͺ There are also questions on differences in dispersion βͺ Context:
βͺ you can choose between two drilling machines βͺ both make holes of the specified size βͺ but the precision of the two may be different βͺ so you do an experiment (intended hole size: 3 mm)
COMPARING THE VARIANCE OF TWO POPULATIONS
SLIDE 4
βͺ A second case βͺ Recall that we can compare two population means under the assumption of equal population variances
βͺ using the pooled variance
βͺ Thus, we may need to check if the populations variances are indeed equal COMPARING THE VARIANCE OF TWO POPULATIONS
SLIDE 5
Test statistic to consider βͺ A combination of Sπ
2 and Sπ 2
βͺ but the null distribution of ππ
2 β ππ 2 is problematic
βͺ Instead,
ππ
2
ππ
2 is possible
βͺ or
ππ
2
ππ
2 (sometimes easier)
βͺ What is the hypothesis?
βͺ πΌ0: ππ
2 = ππ 2
βͺ πΌ0: ππ
2 β₯ ππ 2
βͺ πΌ0: ππ
2 β€ ππ 2
βͺ but ππ
2 = ππ 2 + 3 etc. is not possible!
COMPARING THE VARIANCE OF TWO POPULATIONS
These hypotheses are equivalent to ππ
2
ππ
2 = 1
(or β₯ 1 or β€ 1)
SLIDE 6
βͺ For normally distributed populations, it is known that:
βͺ under πΌ0: ππ
2 = ππ 2:
ππ
2
ππ
2 ~πΊππβ1,ππβ1
βͺ where πΊ
df1,df2 is the F-distribution
βͺ with df1 and df2 degrees of freedom βͺ note: πΊ is a ratio of two variances, use df1 for the numerator and df2 for the denominator
THE πΊ-DISTRIBUTION
SLIDE 7
βͺ So, we compute the value of a test statistic πΊcalc = π‘π
2
π‘π
2
βͺ and expect it to be around 1 if πΌ0 is true βͺ and reject πΌ0 if πΊ
calc is βtooβ small or βtooβ large
βͺ we need to look up the critical values of the πΊ-distribution
THE πΊ-DISTRIBUTION
πΊcrit,lower πΊππ ππ’,π£ππππ 1 Of course (!) you expect πΊ = 1 when πΌ0 is true
SLIDE 8
βͺ πΊ-distribution
βͺ like π2 not symmetrical and strictly positive βͺ need to find πΊ
crit,lower and πΊ crit,upper
THE πΊ-DISTRIBUTION
SLIDE 9
Looking up critical values for πΊ THE πΊ-DISTRIBUTION
π½/2 df2 df1 Is this πΊcrit,lower or πΊcrit,upper?
SLIDE 10
βͺ Finding πΊcrit,lower when you know πΊcrit,upper πΊcrit,lower df1, df2 = 1 πΊcrit,upper df2, df1 βͺ so πΊcrit,lower =
1 3.85 = 0.26
THE πΊ-DISTRIBUTION
π1
2
π2
2 > π β π2 2
π1
2 < 1
π
SLIDE 11
Step 1: βͺ πΌ0: π1
2 = π2 2; πΌ1: π1 2 β π2 2; π½ = 0.05
Step 2: βͺ sample statistic: πΊ =
π1
2
π2
2; reject for βtoo smallβ and βtoo largeβ
values Step 3: βͺ null distribution: πΊ~πΊdf1,df2 βͺ both populations must be normally distributed (no CLT here!) Step 4: βͺ πΊcalc =
π‘1
2
π‘2
2; πΊcrit,lower = β―; πΊcrit,upper = β― (use π½/2)
Step 5: βͺ reject πΌ0 if πΊcalc < πΊcrit,lower or πΊcalc > πΊcrit,upper
THE πΊ-TEST
SLIDE 12
Example: βͺ machine 1 gives π‘1
2 = 0.012 with π1 = 6
βͺ machine 2 gives π‘2
2 = 0.016 with π2 = 7
Computations: βͺ πΊcalc =
0.012 0.016 = 0.75
βͺ swap the two machines
βͺ πΊ
calc = 0.016 0.012 = 1.33
βͺ null distribution: πΊ~πΊ6,5 βͺ πΊcrit;upper = πΊ6,5;0.025 = 6.98 βͺ πΊcalc < πΊcrit;upper, do not reject πΌ0 THE πΊ-TEST
upper critical values can be read in the πΊ- table, so easier to look up πΊcrit,upper
SLIDE 13
Trick to avoid the use of πΊcrit,lower in πΌ0: π1
2 = π2 2
βͺ put largest sample variance in numerator βͺ so calculated value of test statistic is πΊcalc =
π‘1
2
π‘2
2 or πΊcalc =
π‘2
2
π‘1
2
βͺ with this, πΊππππ > 1, so we need only consider πΊππ ππ’,π£ππππ
βͺ because πΊ
ππ ππ’,πππ₯ππ is always < 1
βͺ formally reject for βtoo largeβ and βtoo smallβ βͺ so keep using π½/2 and not π½ (it is still a two-sided test) THE πΊ-TEST
SLIDE 14
One-sided tests: what is different compared to two-sided? Step 1: βͺ πΌ0: π1
2 β₯ π2 2; πΌ1: π1 2 < π2 2; π½ = 0.05
βͺ reformulate as πΌ0: π2
2 β€ π1 2; πΌ1: π2 2 > π1 2; π½ = 0.05
Step 2: βͺ sample statistic: πΊ =
π2
2
π1
2; reject for βtoo largeβ values
Step 3: βͺ null distribution: πΊ~πΊ
df2,df1
βͺ both populations must be normally distributed Step 4: βͺ πΊ
calc = π‘2
2
π‘1
2; πΊ
crit,upper = β― (use π½)
Step 5: βͺ reject πΌ0 if πΊ
ππππ > πΊ crit,upper
THE πΊ-TEST
SLIDE 15
Given a sample 1 with π1 = 9 and π‘1 = 4 and a sample 2 with π2 =7 and π‘2 = 5. We want to test πΌ0: π1
2 = π2 2.
- a. What is step 2?
- b. What is step 3?
EXERCISE 1
SLIDE 16
Recall that SPSS also did a comparison of two variances when we asked for comparing two means βͺ Leveneβs test LEVENEβS TEST
SLIDE 17
The Levene test βͺ is based on a different principle βͺ requires no normal populations (!) βͺ also yields an πΊcalc
βͺ but with different values of df
βͺ reject for large values only βͺ yields a π-value for πΌ0: π1
2 = π2 2
LEVENEβS TEST
SLIDE 18
βͺ When comparing two πs with the π’-test, we needed to estimate π1
2 and π2 2
βͺ we could estimate π1
2 by π‘1 2 and π2 2 by π‘2 2
βͺ or assume π1
2 = π2 2 and use the pooled π‘P 2 to estimate both
βͺ The second is only allowed if the two sample variances π‘1
2
and π‘2
2 are not βtoo unequalβ
βͺ Leveneβs test tests this βͺ a low π-value means: unequal, so donβt do it βͺ do not necessarily use the same π½ βͺ Why Levene and not the βnormalβ πΊ-test?
LEVENEβS TEST
Usually, a low π- value means bingo, but not so here ... Rule of thumb: use π½ = 0.1 Levene is a non-parametric test ...
SLIDE 19
26 March 2015, Q1c OLD EXAM QUESTION
SLIDE 20