inferences about variances ( chapter 7)

16
Variance-Test-1 Inferences about Variances (Chapter 7) elop point estimates for the population variance struct confidence intervals for the population vari form one-sample tests for the population variance. form two-sample tests for the population variance. n this Lecture we will: Note: Need to assume normal population distributions for all sample sizes, small or large! If the population(s) are not normally distributed, results can be very wrong. Nonparametric alternatives are not straightforward.

Upload: prescott-adams

Post on 02-Jan-2016

39 views

Category:

Documents


0 download

DESCRIPTION

Inferences about Variances ( Chapter 7). In this Lecture we will:. Develop point estimates for the population variance Construct confidence intervals for the population variance. Perform one-sample tests for the population variance. Perform two-sample tests for the population variance. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Inferences about Variances ( Chapter  7)

Variance-Test-1

Inferences about Variances (Chapter 7)

• Develop point estimates for the population variance• Construct confidence intervals for the population variance.• Perform one-sample tests for the population variance.• Perform two-sample tests for the population variance.

In this Lecture we will:

Note:

Need to assume normal population distributions for all sample sizes, small or large! If the population(s) are not normally distributed, results can be very wrong. Nonparametric alternatives are not straightforward.

Page 2: Inferences about Variances ( Chapter  7)

Variance-Test-2

The point estimate for 2 is the sample variance:

n

1i

2i

2 yy1n

1s )(

What about the sampling distribution of s2? (I.e. what would we see as a distribution for s2 from repeated samples).

If the observations, yi, are from a normal (,) distribution, then the quantity

2

2s1n

)(

has a Chi-square distribution with df = n-1.

Point Estimate for 2

Page 3: Inferences about Variances ( Chapter  7)

Variance-Test-3

y

x2

0 5 10 15 20 25 30

0.0

0.1

0.2

0.3

0.4

0.5

22df

25df

210df

215df

Non-symmetric.Shape indexed by one parameter called the degrees of freedom (df).

Chi Square (2) Distribution

Page 4: Inferences about Variances ( Chapter  7)

Variance-Test-4

Chi Square Table

Table 8 in Ott and Longnecker

Page 5: Inferences about Variances ( Chapter  7)

Variance-Test-5

2

2s1n

)(

Ifhas a Chi Square Distribution, then a 100(1-)% CI can be computed by finding the upper and lower /2 critical values from this distribution.

1

s1n 2

2df2

22

21df)

)(Pr(

,,

.831212.83

.95

y

x5

0 5 10 15 20 25 30

0.0

0.0

50

.10

0.1

5

2

21df

,

df=5

3.24720.48

.95

y

x10

0 5 10 15 20 25 30

0.0

0.0

20

.04

0.0

60

.08

0.1

0

2

2df ,

df=10

Confidence Interval for 2

Page 6: Inferences about Variances ( Chapter  7)

Variance-Test-6

1

s1n 2

2df2

22

21df)

)(Pr(

,,

2

21df

22

2

2df

2 s1ns1n

,,

)()(

Background Data:

13.1

48.2

7

s

y

n

A 95% CI for background population variance

297506

22

202506

2 13161316

.,.,

.)(.)(

193.653.0 2

Consider the data from the contaminated site vs. background.

s2 = 1.277

Page 7: Inferences about Variances ( Chapter  7)

Variance-Test-7

What if we were interested in testing:

20

2

20

2

20

2

20

20

20

3

2

1

:

)specifiedis(:

aH

H

Test Statistic:

20

22 s1n

)(

Rejection Region:1. Reject H0 if 2 > 2

df,

2. Reject H0 if 2 < 2df,1-

3. Reject H0 if either 2 < 2df,1-/2 or 2 > 2

df,/2

Example:

13.1

48.2

7

s

y

n 6671

1316 22 .

.)( In testing Ha: 2 > 1:

Reject H0 if 2 > 26,0.05 =12.59

Conclude: Do not reject H0.

Hypothesis Testing for 2

Page 8: Inferences about Variances ( Chapter  7)

Variance-Test-8

Objective: Test for the equality of variances (homogeneity assumption).

22

21

22

21

ss

has a probability distribution in repeated sampling which follows the F distribution.

y

x25

0 2 4 6 8 10

0.0

0.2

0.4

0.6

0.8

1.0

F(2,5)

F(5,5)

The F distribution shape is defined by two parameters denoted the numerator degrees of freedom (ndf or df1 ) and the denominator degrees of freedom (ddf or df2 ).

Tests for Comparing Two Population Variances

Page 9: Inferences about Variances ( Chapter  7)

Variance-Test-9

• Can assume only positive values (like 2, unlike normal and t).• Is nonsymmetrical (like 2, unlike normal and t).• Many shapes -- shapes defined by numerator and denominator

degrees of freedom.

• Tail values for specific values of df1 and df2 given in Table 9.

df1 relates to degrees of freedom associated with s21

df2 relates to degrees of freedom associated with s22

F distribution:

Page 10: Inferences about Variances ( Chapter  7)

Variance-Test-10

Note this table has three things to specify in order to get the critical value.

Numerator df = df1.

Denominator df = df2.

Probability Level

4.285.82

F Table

Table 9

Page 11: Inferences about Variances ( Chapter  7)

Variance-Test-11

22

210H :

22

21

22

21a

2

1H

.

.:versus

Test Statistic:22

21

s

sF For one-tailed tests, define

population 1 to be the one with larger hypothesized variance.

Rejection Region:

1. Reject H0 if F > Fdf1,df2,.

2. Reject H0 if F > Fdf1,df2,/2 or if F < Fdf1,df2,1-/2.

In both cases, df1=n1-1 and df2=n2 -1.

Hypothesis Test for two population variances

,,1,, 12211

:10any For

dfdfdfdf FF

Page 12: Inferences about Variances ( Chapter  7)

Variance-Test-12

131s

482y

7n

1

1

1

.

.

Background Samples

890s

824y

7n

2

2

2

.

.

Study Site Samples

612179210

27691

890

131

s

sF

2

2

22

21 .

.

.

.

.

= 0.05, F6,6,0.05 = 4.28 One-sided Alternative Hypothesis

T.S.

R.R.

Reject H0 if F > Fdf1,df2, where df1=n1-1 and df2=n2-1

Example

Reject H0 if F > Fdf1,df2,/2or if F < F df1,df2,1-/2 = 0.05, F6,6,0.025 = 5.82, F6,6,0.975 = 0.17 Two-sided Alternative

Conclusion: Do not reject H0 in either case.

Page 13: Inferences about Variances ( Chapter  7)

Variance-Test-13

2dfdf22

21

22

21

2dfdf

22

21

12

21

Fs

s

F

1

s

s,,

,,

Note: degrees of freedom have been swapped.

Example (95% CI):

025.0,6,62

2

22

21

025.0,6,62

2

89.0

13.11

89.0

13.1F

F

2829277022

21 ..

82.5025.0,6,6 F

Note: not a argument!

(1-)100% Confidence Interval for Ratio of Variances

Page 14: Inferences about Variances ( Chapter  7)

Variance-Test-14

Conclusion

While the two sample test for variances looks simple (and is simple), it forms the foundation for hypothesis testing in Experimental Designs.

Nonparametric alternatives are:• Levene’s Test (Minitab);• Fligner-Killeen Test (R).

Page 15: Inferences about Variances ( Chapter  7)

Variance-Test-15

Software Commands for Chapters 5, 6 and 7

MINITABStat -> Basic Statistics -> 1-Sample z, 1-Sample t, 2-Sample t, Paired t,

Variances, Normality Test. -> Power and Sample Size -> 1-Sample z, 1-Sample t, 2-Sample t. -> Nonparametrics -> Mann-Whitney (Wilcoxon Rank Sum Test) -> 1-sample Wilcoxon (Wilcox. Signed Rank Test)

Rt.test( ): 1-Sample t, 2-Sample t, Paired t.power.t.test( ): 1-Sample t, 2-Sample t, Paired t.var.test( ): Tests for homogeneity of variances in normal populations.wilcox.test( ): Nonparametric Wilcoxon Signed Rank & Rank Sum tests.shapiro.test( ), ks.test( ): tests of normality.

Page 16: Inferences about Variances ( Chapter  7)

Variance-Test-16

Example It’s claimed that moderate exposure to ozone increases lung capacity. 24 similar rats were randomly divided into 2 groups of 12, and the 2nd group was exposed to ozone for 30 days. The lung capacity of all rats were measured after this time.

No-Ozone Group: 8.7,7.9,8.3,8.4,9.2,9.1,8.2,8.1,8.9,8.2,8.9,7.5 Ozone Group: 9.4,9.8,9.9,10.3,8.9,8.8,9.8,8.2,9.4,9.9,12.2,9.3

• Basic Question: How to randomly select the rats?

• In class I will demonstrate the use of MTB and R to analyze these data. (See “Comparing two populations via two sample t-tests” in my R resources webpage.)