Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

22
Test of Test of Homogeneity Homogeneity Lecture 45 Lecture 45 Section 14.4 Section 14.4 Tue, Apr 12, 2005 Tue, Apr 12, 2005

description

Example Suppose a teacher teaches two sections of Statistics and uses two different teaching methods. Suppose a teacher teaches two sections of Statistics and uses two different teaching methods. At the end of the semester, he compares the grade distributions on the final exam. (Both classes had the same final exam.) At the end of the semester, he compares the grade distributions on the final exam. (Both classes had the same final exam.) He wants to know if the differences that he observes are significant. He wants to know if the differences that he observes are significant.

Transcript of Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Page 1: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Test of Test of HomogeneityHomogeneity

Lecture 45Lecture 45Section 14.4Section 14.4

Tue, Apr 12, 2005Tue, Apr 12, 2005

Page 2: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Homogeneous Homogeneous PopulationsPopulations

Two distributions are called Two distributions are called homogeneoushomogeneous if they exhibit the if they exhibit the same proportions within categories.same proportions within categories.

For example, if two colleges’ student For example, if two colleges’ student bodies are each 55% female and bodies are each 55% female and 45% male, then the distributions are 45% male, then the distributions are homogeneous.homogeneous.

Page 3: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

ExampleExample Suppose a teacher teaches two Suppose a teacher teaches two

sections of Statistics and uses two sections of Statistics and uses two different teaching methods.different teaching methods.

At the end of the semester, he At the end of the semester, he compares the grade distributions on compares the grade distributions on the final exam. (Both classes had the the final exam. (Both classes had the same final exam.)same final exam.)

He wants to know if the differences He wants to know if the differences that he observes are significant.that he observes are significant.

Page 4: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

ExampleExample Does there appear to be a Does there appear to be a

difference?difference? Or are the two sets (plausibly) Or are the two sets (plausibly)

homogeneous?homogeneous?A B C D FMethod I

2 3 12 5 2

Method II

2 5 6 3 0

Page 5: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

The Test of HomogeneityThe Test of Homogeneity The null hypothesis is that the populations The null hypothesis is that the populations

are homogeneous.are homogeneous. The alternative hypothesis is that the The alternative hypothesis is that the

populations are not homogeneous.populations are not homogeneous.HH00: The populations are homogeneous.: The populations are homogeneous.HH11: The populations are not homogeneous.: The populations are not homogeneous.

Notice that Notice that HH00 does not specify a does not specify a distribution; it just says that whatever the distribution; it just says that whatever the distribution is, it is the same in all rows.distribution is, it is the same in all rows.

Page 6: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

The Test StatisticThe Test Statistic The test statistic is the chi-square The test statistic is the chi-square

statistic, computed asstatistic, computed as

The question now is, how do we The question now is, how do we compute the expected counts?compute the expected counts?

EEO 2

2 )(

Page 7: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Expected CountsExpected Counts Under the assumption of homogeneity Under the assumption of homogeneity

((HH00), the rows should exhibit the same ), the rows should exhibit the same proportionsproportions..

We can get the best estimate of those We can get the best estimate of those proportions by proportions by poolingpooling the rows. the rows.

That is, add the rows (i.e., find the That is, add the rows (i.e., find the column totals), and then compute the column totals), and then compute the column proportions from them.column proportions from them.

Page 8: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Row and Column Row and Column ProportionsProportions

A B C D FMethod I

2 3 12 5 2

Method II

2 5 6 3 0

Col Total

4 8 18 8 2

10% 20% 45% 20% 5%

Page 9: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Expected CountsExpected Counts Similarly, the columns should exhibit Similarly, the columns should exhibit

the same proportions, so we can get the same proportions, so we can get the best estimate by pooling the the best estimate by pooling the columns.columns.

That is, add the columns (i.e., find That is, add the columns (i.e., find the row totals), and then compute the row totals), and then compute the row proportions from them.the row proportions from them.

Page 10: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Row and Column Row and Column ProportionsProportions

A B C D F Row Total

Method I

2 3 12 5 2 24 60%

Method II

2 5 6 3 0 16 40%

Col Total

4 8 18 8 2

10% 20% 45% 20% 5%

Page 11: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Row and Column Row and Column ProportionsProportions

A B C D F Row Total

Method I

2 3 12 5 2 24 60%

Method II

2 5 6 3 0 16 40%

Col Total

4 8 18 8 2 40

10% 20% 45% 20% 5%GrandTotal

Page 12: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Expected CountsExpected Counts Now apply the appropriate row and Now apply the appropriate row and

column proportions to each cell to get column proportions to each cell to get the expected count.the expected count.

Let’s use the upper-left cell as an Let’s use the upper-left cell as an example. example.

According to the row and column According to the row and column proportions, it should contain 60% of proportions, it should contain 60% of 10% of the grand total 40.10% of the grand total 40.

That is, the expected count isThat is, the expected count is0.600.60 0.10 0.10 40 = 2.4 40 = 2.4

Page 13: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Expected CountsExpected Counts Notice that this can be obtained more Notice that this can be obtained more

quickly by the following formula.quickly by the following formula.

In the upper-left cell, this formula In the upper-left cell, this formula producesproduces

(4 (4 24)/40 = 2.4 24)/40 = 2.4

totalgrandtal)(column to total)(rowcount Expected

Page 14: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Expected CountsExpected Counts Apply that formula to each cell to Apply that formula to each cell to

find the expected counts and add find the expected counts and add them to the table.them to the table.

A B C D F

Method I2

(2.4)3

(4.8)12

(10.8)

5(4.8)

2(1.2)

Method II2

(1.6)5

(3.2)6

(7.2)3

(3.2)0

(0.8)

Page 15: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

The Test StatisticThe Test Statistic Now compute Now compute 22 in the usual in the usual

way.way.

5416667.38.0

)8.00(2.3

)2.33(2.7

)2.76(2.3

)2.35(6.1

)6.12(2.1

)2.12(8.4

)8.45(8.10

)8.1012(8.4

)8.43(4.2

)4.22(

22222

222222

Page 16: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Degrees of FreedomDegrees of Freedom The number of degrees of freedom isThe number of degrees of freedom isdfdf = (no. of rows – 1) = (no. of rows – 1) (no. of cols – 1). (no. of cols – 1).

In our example, In our example, dfdf = (2 – 1) = (2 – 1) (5 – 1) (5 – 1) = 4.= 4.

To find the To find the pp-value, calculate-value, calculate22cdf(3.5416667, E99, 4) = 0.47157.cdf(3.5416667, E99, 4) = 0.47157.

Clearly, the differences are not Clearly, the differences are not statistically significant.statistically significant.

Page 17: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

Let’s Do It!Let’s Do It! Let’s Do It! 14.4, p. 873 – Preventing Let’s Do It! 14.4, p. 873 – Preventing

Pregnancies.Pregnancies. Compute the first cell’s contribution to Compute the first cell’s contribution to

22.. Do (a), (b), and (c).Do (a), (b), and (c).

Page 18: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

TI-83 – Test of TI-83 – Test of HomogeneityHomogeneity

The tables in these examples are not The tables in these examples are not lists, so we can’t use the lists in the lists, so we can’t use the lists in the TI-83.TI-83.

Instead, the tables are matrices.Instead, the tables are matrices. Happily, the TI-83 can handle Happily, the TI-83 can handle

matrices.matrices.

Page 19: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

TI-83 – Test of TI-83 – Test of HomogeneityHomogeneity

Enter the observed counts into a Enter the observed counts into a matrixmatrix.. Press Press MATRIXMATRIX.. Select Select EDITEDIT.. Press Press ENTERENTER to edit matrix [A]. to edit matrix [A]. Enter the number of rows and columns. Enter the number of rows and columns.

(Press ENTER to advance.)(Press ENTER to advance.) Enter the observed counts in the cells.Enter the observed counts in the cells. Press Press 22ndnd Quit Quit to exit the matrix editor. to exit the matrix editor.

Page 20: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

TI-83 – Test of TI-83 – Test of HomogeneityHomogeneity

Perform the test of homogeneity.Perform the test of homogeneity. Select Select STATS > TESTS > STATS > TESTS > 22-Test…-Test… Press Press ENTERENTER.. Enter the matrix of observed counts.Enter the matrix of observed counts. Enter the name ([E]) of a matrix for the Enter the name ([E]) of a matrix for the

expected counts. These will be expected counts. These will be computed for you by the TI-83.computed for you by the TI-83.

Select Select CalculateCalculate.. Press Press ENTERENTER..

Page 21: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

TI-83 – Test of TI-83 – Test of HomogeneityHomogeneity

The window displaysThe window displays The title “The title “22-Test”.-Test”. The value of The value of 22.. The The pp-value.-value. The number of degrees of freedom.The number of degrees of freedom.

See the matrix of expected counts.See the matrix of expected counts. Press Press MATRIXMATRIX.. Select matrix [E].Select matrix [E]. Press Press ENTERENTER..

Page 22: Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.

ExampleExample Let’s do “Let’s Do It!” 14.4, p. 873, Let’s do “Let’s Do It!” 14.4, p. 873,

on the TI-83.on the TI-83. Enter the matrixEnter the matrix

Perform the test Perform the test 22-Test.-Test. Compare the results to the Minitab Compare the results to the Minitab

display on page 873.display on page 873.

5 12 1695 88 84