Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

22
Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah : I0134/Metode Statistika Tahun : 2007
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    224
  • download

    3

Transcript of Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Page 1: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20

Matakuliah : I0134/Metode StatistikaTahun : 2007

Page 2: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Basic Business Statistics(9th Edition)

Chapter 10Two Sample Tests with Numerical

Data

Page 3: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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 4: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Chapter Topics• Wilcoxon Rank Sum Test

– Difference in two medians

• Wilcoxon Signed Ranks Test– Median difference

(continued)

Page 5: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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 6: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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 7: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Independent Sample (Two Sample) Z Test in Excel

• Independent Sample Z Test with Variances Known– Tools | Data Analysis | Z test: Two Sample for Means

Page 8: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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 9: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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 10: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Developing the Pooled-Variance t Test

• Calculate the Pooled Sample Variance 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 11: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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 12: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Pooled-Variance t Test: Example

© 1984-1994 T/Maker Co.

You’re a financial analyst for Charles Schwab. Is there a difference in average 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)?

Page 13: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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.502

21 1 25 1

p

p

X Xt

Sn n

n S n SS

n n

Page 14: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

SolutionH0: 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.502

21 25

t

Page 15: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

p -Value Solution

p-Value 2

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

02.03

Z

Reject

2.0154

is between .01 and .025

Test Statistic 2.03 is in the Reject Region

Reject

-2.0154

=.025

Page 16: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Pooled-Variance t Test in PHStat and Excel

• If the Raw Data are 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 17: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Solution in Excel• Excel Workbook that Performs the Pooled-

Variance t Test

Microsoft Excel Worksheet

Page 18: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Example

© 1984-1994 T/Maker Co.

You’re a financial analyst for Charles Schwab. You collect the following data:

NYSE NASDAQNumber 21 25Sample Mean 3.27 2.53Sample Std Dev 1.30 1.16

You want to construct a 95% confidence interval for the difference in population average yields of the stocks listed on NYSE and NASDAQ.

Page 19: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Example: Solution

1 2

21 2 / 2, 2

1 2

1 1n n pX X t S

n n

1 13.27 2.53 2.0154 1.502

21 25

1 20.0088 1.4712

2 21 1 2 22

1 2

2 2

1 1

1 1

21 1 1.30 25 1 1.16 1.502

21 1 25 1

p

n S n SS

n n

Page 20: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

Solution in Excel• An Excel Spreadsheet with the Solution:

Microsoft Excel Worksheet

Page 21: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

F Test for Difference in Two Population Variances

• Test for the Difference in 2 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 22: Pengujian Hipotesis Beda Nilai Tengah Pertemuan 20 Matakuliah: I0134/Metode Statistika Tahun: 2007.

Bina Nusantara

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