• No results found

Stat Slides 5

N/A
N/A
Protected

Academic year: 2021

Share "Stat Slides 5"

Copied!
30
0
0

Loading.... (view fulltext now)

Full text

(1)

Pooled Variance

Pooled Variance

t Test

t Test

• Tests means of Tests means of 2 independent populations having2 independent populations having

equal

equal variancesvariances

• Parametric test procedureParametric test procedure

• AssumptionsAssumptions

 – 

 –  Both populations are normally distributedBoth populations are normally distributed

 – 

 –  If not normal, can be approximated by normal distributionIf not normal, can be approximated by normal distribution

(

(nn11  30 &30 & nn22  30 )30 )

 – 

(2)

Two Independent Populations

Two Independent Populations

Examples

Examples

An economist wishes to determine whether

An economist wishes to determine whether

there is a difference in mean family income

there is a difference in mean family income

for households in 2 socioeconomic groups.

for households in 2 socioeconomic groups.

An admissions officer of a small liberal arts

An admissions officer of a small liberal arts

college wants to compare the mean SAT

college wants to compare the mean SAT

scores of applicants educated in rural high

scores of applicants educated in rural high

schools & in urban high schools.

(3)

Two Independent Populations

Two Independent Populations

Examples

Examples

An economist wishes to determine whether

An economist wishes to determine whether

there is a difference in mean family income

there is a difference in mean family income

for households in 2 socioeconomic groups.

for households in 2 socioeconomic groups.

An admissions officer of a small liberal arts

An admissions officer of a small liberal arts

college wants to compare the mean SAT

college wants to compare the mean SAT

scores of applicants educated in rural high

scores of applicants educated in rural high

schools & in urban high schools.

(4)

Pooled Variance t Test Example

Pooled Variance t Test Example

You’re a

You’re a financial financial analyst for analyst for Charles Schwab. Charles Schwab. You wantYou want

to see if there a difference in dividend yield b

to see if there a difference in dividend yield between stocksetween stocks

listed on the NYSE

listed on the NYSE & NASDAQ.& NASDAQ.

NYSE NASDAQ NYSE NASDAQ Number 21 25 Number 21 25 Mean Mean 3.27 3.27 2.532.53 Std Std Dev Dev 1.30 1.30 1.161.16 Assuming

Assuming equalequal variances, isvariances, is

there a difference in

there a difference in averageaverage

yield (

(5)

Pooled Variance t Test

Solution

H0: m1 - m2 = 0 (m1 = m2) H1: m1 - m2  0 (m1  m2) a = .05 df = 21 + 25 - 2 = 44 Critical Value(s):

Test Statistic:

Decision:

Conclusion:

t

0 2.0154 -2.0154

.025

Reject H0 Reject H0

.025

t

0 2.0154 -2.0154

.025

Reject H0 Reject H0

.025

2.03 25 1 21 1 1.510 2.53 3.27 t

=

 

 

 

 

=

Reject at

= .05

There is evidence of a

difference in means

(6)

Test Statistic

Solution

t  X X  S  n n  S  n S n S   n n  P  P 

I

K

J

I

K

2 2 1 2 1 0 1 25 2 03 1510

c

a

. . t  S 

F

H

G

1 2 1 2 1 1

a

X X  S  n n  P 

F

H

2 3 27 2 53 1510 1 21

a

. . . 1 1 2 2 2 2 2 2 1 1 1 1 21 1 1 30 25 1 116 21 1 25 1

a f

a f

a f a f

a f a f a f a f

a f a f

. . n S n S   n n 

F

H

G

I

K

J

I

K

2 2 03.

F

H

1 2 1 2 2 1 2 1 1 2 2 2 2 1 2 2 2 1 1 3 27 2 53 0 1510 1 21 1 25 1 1 1 1 21 1 1 30 25 1 116 21 1 25 1 1510

c

a

a

a

a f a f

a f a f

a f a f a f a f

a f a f

. . . . . .

(7)

You’re a research analyst for General Motors. Assuming equal variances, is there a difference in the average miles per gallon (mpg) of two car models (a = .05)?

You collect the following:

Sedan Van

Number 15 11

Mean 22.00 20.27 Std Dev 4.77 3.64

Pooled Variance t Test

Thinking Challenge

(8)

Test Statistic

Solution*

t  X X  S  n n  S  n S n S   n n  P  P 

I

K

J

I

K

2 2 1 2 1 0 1 11 00 18 793 t  S 

F

H

G

1 2 1 2 1 1

F

H

2 22 00 20 27 18 793 1 15 1 1 2 2 2 2 2 2 1 1 1 1 1 15 1 4 77 11 1 3 64 15 1 11 1

c

a

a

a

a f a f

a f a f

a f a f a f a f

a f a f

. . . . . . . X X  S  n n  n S n S   n n  P 

F

H

G

I

K

J

I

K

2 00

F

H

1 2 1 2 2 1 2 1 1 2 2 2 2 1 2 2 2 1 1 22 00 20 27 0 18 793 1 15 1 11 1 1 1 1 1 15 1 4 77 11 1 3 64 15 1 11 1 18 793

c

a

a

a

a f

a f

a f a f

a f a f a f a f

a f a f

. . . . . . .

(9)
(10)

2 & c-Sample Tests with

Numerical Data

2 & C -Sample Tests # Samples Median Variance Mean C F Test C (2 Samples) Kruskal-Wallis Rank Test Wilcoxon Rank Sum Test # Samples Pooled Variance t Test One-Way ANOVA 2 2 2 & C -Sample Tests # Samples Median Variance Mean C F Test C (2 Samples) Kruskal-Wallis Rank Test Wilcoxon Rank Sum Test # Samples Pooled Variance t Test One-Way ANOVA 2 2

(11)

Experiment

Investigator controls one or more independent

variables

 –  Called treatment variables or factors

 –  Contain two or more levels (subcategories)

Observes effect on dependent variable

 –  Response to levels of independent variable

Experimental design: Plan used to test

(12)

Completely Randomized Design

Experimental units (subjects) are assigned

randomly to treatments

 –  Subjects are assumed homogeneous

One factor or independent variable

 –  2 or more treatment levels or classifications

Analyzed by:

 –  One-Way ANOVA

(13)

Factor (Training Method

)

Factor levels

(Treatments)

Level 1 Level 2 Level 3 Experimental

units

Dependent 21 hrs. 17 hrs. 31 hrs. variable 27 hrs. 25 hrs. 28 hrs. (Response) 29 hrs. 20 hrs. 22 hrs.

Factor (Training Method

)

Factor levels

(Treatments)

Level 1 Level 2 Level 3 Experimental

units

Dependent 21 hrs. 17 hrs. 31 hrs. variable 27 hrs. 25 hrs. 28 hrs. (Response) 29 hrs. 20 hrs. 22 hrs.

Randomized Design Example

(14)

One-Way ANOVA

F-Test

Tests the equality of 2 or more (

c

) population

means

Variables

 –  One nominal scaled independent variable

• 2 or more (c) treatment levels or classifications

 –  One interval or ratio scaled dependent variable

Used to analyze completely randomized

(15)

One-Way ANOVA

F-Test Assumptions

Randomness & independence of errors

 –  Independent random samples are drawn

Normality

 –  Populations are normally distributed

Homogeneity of variance

(16)

One-Way ANOVA

F-Test Hypotheses

• H0: m1 = m2 = m3 = ... = mc

 –  All population means are

equal

 –  No treatment effect

• H1: Not all m j are equal

 –  At least 1 population mean is

different  –  Treatment effect m1  m2  ...  mc is wrong X f(X) 1 = 2 = 3 X f(X) 1 = 2 3

(17)

Compares 2 types of variation to test equality

of means

Ratio of variances is comparison basis

If treatment variation is significantly greater

than random variation then means are not

equal

Variation measures are obtained by

‘partitioning’ total variation

One-Way ANOVA

Basic Idea

(18)

ANOVA Partitions Total

Variation

Variation due to treatment Variation due to random sampling

Total variation

 Sum of squares within  Sum of squares error

 Within groups variation  Sum of squares among

 Sum of squares between  Sum of squares model  Among groups variation

(19)

Total Variation

Group 1 Group 2 Group 3

Response, X

Group 1 Group 2 Group 3

Response, X SST X X X X Xn c  X   c  11 2 2 2 SS 21

e j e j e j

T X X X X X n c  X   c  11 2 2 2 21

e j e j e j

X

(20)

Among-Groups Variation

Group 1 Group 2 Group 3

Response, X

Group 1 Group 2 Group 3

Response, X SSA n X X n X X n X c X   1 1 2 2 2 SSA 2 2

e j e j

e j

n X X n X X n X c X   1 1 2 2 2 2 2

e j e j

e j

X

X

3

X

1

X

2

(21)

Within-Groups Variation

Group 1 Group 2 Group 3

Response, X

Group 1 Group 2 Group 3

Response, X SSW X X X X Xn c X   c  11 2 2 2 SS 1 21 1

c h c h c

W X X X X Xn c X   c  11 2 2 1 21 1 2

c

c

c

X

2

X

1

X

3

(22)

One-Way ANOVA

Test Statistic

Test statistic

 – 

=

 MSA

 MSW 

•  MSA is Mean Square Among •  MSW is Mean Square Within

Degrees of freedom

 – 

df 

1

=

c

-1

 – 

df 

2

=

n

-

c

• c = # Columns (populations, groups, or levels) • n = Total sample size

(23)

One-Way ANOVA

Summary Table

Source of Variation Degrees of Freedom Sum of Squares Mean Square (Variance) F Among (Factor) c - 1 SSA MSA = SSA/(c - 1) MSA MSW Within (Error) n - c SSW MSW = SSW/(n - c) Total n - 1 SST = SSA+SSW Source of Variation Degrees of Freedom Sum of Squares Mean Square (Variance) F Among (Factor) c - 1 SSA MSA = SSA/(c - 1) MSA MSW Within (Error) n - c SSW MSW = SSW/(n - c) Total n - 1 SST = SSA+SSW

(24)

One-Way ANOVA

Critical Value

0 Reject H0 Do Not Reject H0 F 0 Reject H0 Do Not Reject H0 F F U c n c   ( ; , ) F U

If means are equal,

= MSA / MSW  1.

Only reject large F !

Always One-Tail!

 © 1984-1994 T/Maker Co.

1

c n c  

(25)

One-Way ANOVA

F-Test Example

As production manager, you want to see if 3 filling

machines have different mean filling times. You assign 15 similarly trained &

experienced workers, 5 per machine, to the

machines. At the .05 level, is there a difference in mean

filling times?

Mach1Mach2Mach3

25.40 23.40 20.00

26.31 21.80 22.20

24.10 23.50 19.75

23.74 22.75 20.60

25.10 21.60 20.40

(26)

One-Way ANOVA

F-Test Solution

H0: m1 = m2 = m3

H1: Not all equal

a = .05 df 1 = 2 df 2 = 12 Critical Value(s):

Test Statistic:

Decision:

Conclusion:

Reject at

= .05

There is evidence pop.

means are different

F

0 3.89

F

0 3.89 = .05 F  MSA MSW 

25 6

.

F  MSA

23 5820

25 6

.

9211

.

.

MSW 

23 5820

9211

.

.

(27)

Summary Table

Solution

Source of Variation Degrees of Freedom Sum of Squares Mean Square (Variance) F Among (Machines) 3 - 1 = 2 47.1640 23.5820 25.60 Within (Error) 15 - 3 = 12 11.0532 .9211 Total 15 - 1 = 14 58.2172 Source of Variation Degrees of Freedom Sum of Squares Mean Square (Variance) F Among (Machines) 3 - 1 = 2 47.1640 23.5820 25.60 Within (Error) 15 - 3 = 12 11.0532 .9211 Total 15 - 1 = 14 58.2172

(28)

Summary Table

Excel Output

(29)

One-Way ANOVA Thinking

Challenge

You’re a trainer for Microsoft Corp. Is there a difference

in mean learning times of  12 people using 4 different training methods (a =.05)? M1 M2 M3 M4 10 11 13 18 9 16 8 23 5 9 9 25  © 1984-1994 T/Maker Co.

(30)

One-Way ANOVA Solution*

H0: m1 = m2 = m3 = m4

H1: Not all equal

a = .05 df 1 = 3 df 2 = 8 Critical Value(s):

Test Statistic:

Decision:

Conclusion:

Reject at

= .05

There is evidence pop.

means are different

F

0 4.07

F

0 4.07 = .05 F  MSA MSW 

11 6

.

F  MSA

116

11 6

.

10

MSW 

116

10

References

Related documents

In the example above, when price drops to point B, the end of the trend, it could stall or even reverse there.. In this example, price just

Now she’s product leader of nose/forward fuselage and cockpit windows.. for

The Court of Appeals for the Eighth Circuit, the court to which an appeal of this case most likely lies, has held specifically that "In determining the value of unlisted

In the case of the DBpedia KB dbo:Species class, we did not find any quality issues on the last release(201604) which lead to FP results. On the other hand, we have evaluated

Second, the conduct prohibited by this constraint is ill-suited to contribute to a practice of public accountability that sanctions norm violations and that strengthens our

Results comparing the combined model cell voltage estimation with the cell’s true voltage for one cycle of the UDDS test is shown in Fig.. Similar

Aukštą jėgainių efektyvumą padėjo pasiekti ne tik sparčiai tobulinami jėgainės pagrindiniai agregatai, tai pakuros, katilai, garo turbinos, elektros generatoriai

Cylinder is of books for two year olds can save them through their vocabulary all be a hit with a great gifts for finding toddler using the musical.. Moving book that toddler books