© 2002 prentice-hall, inc.chap 8-1 statistics for managers using microsoft excel 3 rd edition kafla...

33
© 2002 Prentice-Hall, Inc. Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

Post on 21-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-1

Statistics for Managersusing Microsoft Excel

3rd Edition

Kafla 8Próf fyrir tvö úrtök

(Ekki þýtt)

Page 2: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-2

Chapter Topics

Comparing two independent samples Independent samples Z test for the

difference in two means Pooled variance t test for the difference in

two means

F test for the difference in two variances Comparing two related samples

Paired sample z test for the mean difference Paired sample t test for the mean difference

Page 3: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-3

Chapter Topics

Wilcoxon rank-sum test Difference in two medians

(continued)

Page 4: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-4

Comparing Two Independent Samples

Different data sources Unrelated Independent

Sample selected from one population has no effect or bearing on the sample selected from the other population

Use the difference between 2 sample means

Use Z test or pooled variance t test

Page 5: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-5

Independent Sample Z Test (Variances Known)

Assumptions Samples are randomly and independently

drawn from normal distributions Population variances are known

Test statistic

1 2 1

2 2

1 2

( ) ( )X XZ

n n

Page 6: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-6

Independent Sample Z Test (Large Samples)

Assumptions Samples are randomly and independently

drawn Population variances either known or

unknown Both sample sizes are at least 30

Test statistic1 2 1 1 2 1

2 2 2 2

1 2 1 2

( ) ( ) ( ) ( ) or

X X X XZ Z

S Sn n n n

Page 7: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-7

Independent Sample (Two Sample) Z Test in EXCEL

Independent sample Z test with variances known Tools | data analysis | z-test: two sample for

means

Independent sample Z test with large sample Tools | data analysis | z-test: two sample for

means If the population variances are unknown, use

sample variances

Page 8: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-8

H

H

zx x

sn

sn

z z z

Ef z z z

0 1 2

1 1 2

1 2

12

1

22

2

2 2

2 2

0

:

:

Ef , þá er ekki hægt að hafna H

eða z , þá ber að hafna H

0

0

Samanburður, stór úrtök, mismunandi breytileiki

Page 9: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-9

Pooled Variance t Test (Variances Unknown)

Assumptions Both populations are normally distributed Samples are randomly and independently

drawn Population variances are unknown but

assumed equal If both populations are not normal, need

large sample sizes

Page 10: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-10

Developing the Pooled Variance

t Test

Setting up the hypotheses

H0: 1 2

H1: 1 > 2

H0: 1 -2 = 0

H1: 1 - 2

0

H0: 1 = 2

H1: 1 2

H0: 1

2

H0: 1 - 2 0

H1: 1 - 2 > 0

H0: 1 - 2

H1: 1 -

2 < 0

OR

OR

OR Left Tail

Right Tail

Two Tail

H1: 1 < 2

Page 11: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-11

Developing the Pooled Variance t Test

Calculate the pooled sample variances as an estimate of the common population variance

(continued)

2 22 1 1 2 2

1 2

21

21 2

22

( 1) ( 1)

( 1) ( 1)

: Pooled sample variance : Size of sample 1

: Variance of sample 1 : Size of sample 2

: Variance of sample 2

p

p

n S n SS

n n

S n

S n

S

Page 12: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-12

Developing the Pooled Variance t Test

Compute the sample statistic

(continued)

1 2 1 2

2

1 2

2 21 1 2 22

1 2

1 1

1 1

1 1

p

p

X Xt

Sn n

n S n SS

n n

Hypothesized

difference1 2 2df n n

Page 13: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-13

Pooled Variance t Test: Example

You’re a financial analyst for Charles Schwab. Is there a difference in dividend yield between stocks listed on the NYSE & NASDAQ? You collect the following data:

NYSE NASDAQNumber 21 25Sample mean 3.27 2.53Sample std dev 1.30 1.16

Assuming equal variances, isthere a difference in average yield (= 0.05)?

© 1984-1994 T/Maker Co.

Page 14: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-14

Calculating the Test Statistic

1 2 1 2

2

1 2

2 21 1 2 22

1 2

2 2

3.27 2.53 02.03

1 11 1 1.51021 25

1 1

1 1

21 1 1.30 25 1 1.16 1.510

21 1 25 1

p

p

X Xt

Sn n

n S n SS

n n

Page 15: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-15

Solution

H0: 1 - 2 = 0 i.e. (1 = 2)

H1: 1 - 2 0 i.e. (12)

= 0.05

df = 21 + 25 - 2 = 44

Critical Value(s):

Test Statistic:

Decision:

Conclusion:

Reject at = 0.05

There is evidence of a difference in means.

t0 2.0154-2.0154

.025

Reject H0 Reject H0

.025

2.03

3.27 2.532.03

1 11.510

21 25

t

Page 16: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-16

p -Value Solution

p Value 2

(p Value is between .02 and .05) ( = 0.05). Reject.

0 2.03 Z

Reject

2.0154

is between .01 and .025

Test Statistic 2.03 is in the Reject Region

Reject

-2.0154

=.025

Page 17: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-17

0

0

Hhafna að berþá , teða t

Hhafna að hægt ekki erþá , Ef

2;22;2

2;22;2

2121

222

211

21

211

210

2121

2121

ˆˆ

ˆ

11)2(

)1()1(

:

:

nnnn

nnnn

ttEf

ttt

nnnnsnsn

xxt

H

H

Samanbúrður, lítil úrtök, sami breytileiki

Page 18: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-18

Pooled Variance t Test in PHStat and Excel

If the raw data is available Tools | data analysis | t-test: two sample

assuming equal variances If only summary statistics are available

PHStat | two-sample tests | t test for differences in two means...

Page 19: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-19

Solution in EXCEL

Excel workbook that performs the pooled variance t test

Microsoft Excel Worksheet

Page 20: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-20

F Test for Difference in Two Population Variances

Test for the difference in two independent populations

Parametric test procedure Assumptions

Both populations are normally distributed Test is not robust to this violation

Samples are randomly and independently drawn

Page 21: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-21

The F Test Statistic

= Variance of Sample 1

n1 - 1 = degrees of freedom

n2 - 1 = degrees of freedom

F 0

21S

22S = Variance of Sample 2

2122

SF

S

Page 22: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-22

Hypotheses H0:1

2 = 22

H1: 12 2

2 Test Statistic

F = S12 /S2

2

Two Sets of Degrees of Freedom df1 = n1 - 1; df2 = n2 - 1

Critical Values: FL( ) and FU( )

FL = 1/FU* (*degrees of freedom switched)

Developing the F Test

Reject H0

Reject H0

/2/2Do NotReject

F 0 FL FU

n1 -1, n2 -1 n1 -1 , n2 -1

Page 23: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-23

F Test: An Example

You are a financial analyst for Charles Schwab. You want to compare dividend yields between stocks listed on the NYSE & NASDAQ. You collect the following data:

NYSE NASDAQNumber 21 25Mean 3.27 2.53Std dev 1.30 1.16

Is there a difference in the variances between the NYSE & NASDAQ at the 0.05 level?

© 1984-1994 T/Maker Co.

Page 24: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-24

F Test: Example Solution

Finding the critical values for = .05

20,24 24,20

20,24

1/ 1/ 2.41 .415

2.33

L U

U

F F

F

1 1

2 2

1 21 1 20

1 25 1 24

df n

df n

Page 25: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-25

F Test: Example Solution

H0: 12 = 2

2

H1: 12 2

2

.05 Df1 20 df2 24

Critical value(s):

Test Statistic:

Decision:

Conclusion:

Do not reject at = 0.05

There is no evidence of a difference in variances.

0 F2.330.415

.025

Reject Reject

.025

2 212 22

1.301.25

1.16

SF

S

1.25

Page 26: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-26

F Test in PHStat

PHStat | two-sample tests | F test for differences in two variances

Example in excel spreadsheet

Microsoft Excel Worksheet

Page 27: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-27

F Test: One-Tail

H0: 12 2

2

H1: 12 2

2

H0: 12 2

2

H1: 12 > 2

2

Reject

.05

F0 F0

Reject

.05

= .05

or

Degrees of freedom switched

1 2

2 1

1, 11, 1

1L n n

U n n

FF

1 21, 1U n nF 1 21, 1L n nF

Page 28: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-28

Comparing Two Related Samples

Test the means of two related samples Paired or matched Repeated measures (before and after) Use difference between pairs

Eliminates variation between subjects 1 2i i iD X X

Page 29: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-29

Z Test for Mean Difference (Variance Known)

Assumptions Both populations are normally distributed Observations are paired or matched Variance known

Test statistic

D

D

DZ

n

1

n

ii

DD

n

Page 30: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-30

t Test for Mean Difference (Variance Unknown)

Assumptions Both populations are normally distributed Observations are matched or paired Variance unknown If population not normal, need large samples

Test statistic

D

D

Dt

S

n

2

1

( )

1

n

ii

D

D DS

n

1

n

ii

DD

n

Page 31: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-31

User Current Leader (1) New Software (2) Difference Di

C.B. 9.98 Seconds 9.88 Seconds .10T.F. 9.88 9.86 .02M.H. 9.84 9.75 .09R.K. 9.99 9.80 .19M.O. 9.94 9.87 .07D.S. 9.84 9.84 .00S.S. 9.86 9.87 - .01C.T. 10.12 9.86 .26K.T. 9.90 9.83 .07S.Z. 9.91 9.86 .05

Paired Sample t Test: Example

You work in the finance department. Is the new financial package faster (=0.05 level)? You collect the following data entry times:

2

.084

1 .0844

i

i

D

DD

n

D DS

n

Page 32: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-32

Paired Sample t Test: Example Solution

Is the new financial package faster (0.05 level)?

.084D =

.084 03.15

/ .08444 / 10D

D

DtS n

H0: D H1: D

Test Statistic

Critical Value=1.8331 df = n - 1 = 9

Reject

1.8331

Decision: Reject H0

t Stat. in the rejection zone.Conclusion: The new software package is faster.

3.15

t

Page 33: © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Kafla 8 Próf fyrir tvö úrtök (Ekki þýtt)

© 2002 Prentice-Hall, Inc. Chap 8-33

Paired Sample t Test in EXCEL

Tools | data analysis… | t-test: paired two sample for means

Example in excel spreadsheet

Microsoft Excel Worksheet