Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example...

24
Contingency table Test for Independence Example Homework Contingency Tables and Analysis of Variance Mgmt 230: Introductory Statistics Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Transcript of Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example...

Page 1: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Contingency Tables and Analysis of Variance

Mgmt 230: Introductory Statistics

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 2: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Goal of this section 2/ 7

Learn how to test for dependence/independence forcategorical data.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 3: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Contingency table 3/ 7

Contingency table (aka two-way frequency table) is atable which reports frequencies corresponding to two differentsets of categories (variables).

Example: mortality rates on the Titanic:

Data in the table are always frequencies that fall intoindividual categories.

Could use this table to test if two variables are independent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 4: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Contingency table 3/ 7

Contingency table (aka two-way frequency table) is atable which reports frequencies corresponding to two differentsets of categories (variables).

Example: mortality rates on the Titanic:

Data in the table are always frequencies that fall intoindividual categories.

Could use this table to test if two variables are independent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 5: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Contingency table 3/ 7

Contingency table (aka two-way frequency table) is atable which reports frequencies corresponding to two differentsets of categories (variables).

Example: mortality rates on the Titanic:

Data in the table are always frequencies that fall intoindividual categories.

Could use this table to test if two variables are independent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 6: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Contingency table 3/ 7

Contingency table (aka two-way frequency table) is atable which reports frequencies corresponding to two differentsets of categories (variables).

Example: mortality rates on the Titanic:

Data in the table are always frequencies that fall intoindividual categories.

Could use this table to test if two variables are independent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 7: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 8: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 9: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 10: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 11: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 12: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 13: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 14: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test of independence 4/ 7

Null hypothesis: there is no association between the rowvariable and the column variable.

that is, the two variables are independent.

Alternative hypothesis: The two variables are dependent.

To test such a hypothesis, we’ll need to use a new distribution

Chi-squared distribution: a distribution skewed to the rightwhose support is always positive.

Only use one tailed test.Values of χ2 close to zero imply independence.Large values of χ2 occur when variables are dependent.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 15: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test statistic 5/ 7

Test statistic:

χ2 =∑ (O − E )2

E

O: observed frequency in a cell from the contingency table.

E : expected frequency assuming the row and column variableare independent.

E =(row total)(column total)

grand total

Degrees of freedom = (r − 1)(c − 1)

r = number of rows.c = number of columns.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 16: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test statistic 5/ 7

Test statistic:

χ2 =∑ (O − E )2

E

O: observed frequency in a cell from the contingency table.

E : expected frequency assuming the row and column variableare independent.

E =(row total)(column total)

grand total

Degrees of freedom = (r − 1)(c − 1)

r = number of rows.c = number of columns.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 17: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test statistic 5/ 7

Test statistic:

χ2 =∑ (O − E )2

E

O: observed frequency in a cell from the contingency table.

E : expected frequency assuming the row and column variableare independent.

E =(row total)(column total)

grand total

Degrees of freedom = (r − 1)(c − 1)

r = number of rows.c = number of columns.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 18: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test statistic 5/ 7

Test statistic:

χ2 =∑ (O − E )2

E

O: observed frequency in a cell from the contingency table.

E : expected frequency assuming the row and column variableare independent.

E =(row total)(column total)

grand total

Degrees of freedom = (r − 1)(c − 1)

r = number of rows.c = number of columns.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 19: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test statistic 5/ 7

Test statistic:

χ2 =∑ (O − E )2

E

O: observed frequency in a cell from the contingency table.

E : expected frequency assuming the row and column variableare independent.

E =(row total)(column total)

grand total

Degrees of freedom = (r − 1)(c − 1)

r = number of rows.c = number of columns.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 20: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Chi-squared distributionTest statistic

Test statistic 5/ 7

Test statistic:

χ2 =∑ (O − E )2

E

O: observed frequency in a cell from the contingency table.

E : expected frequency assuming the row and column variableare independent.

E =(row total)(column total)

grand total

Degrees of freedom = (r − 1)(c − 1)

r = number of rows.c = number of columns.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 21: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Example 6/ 7

Do helmet laws make a difference in the number of fatalities?

No helmet law Helmet Law

fatal accident 50 40survived accident 180 200

Compute Chi-squared statistic to test the hypothesis thatmotorcycle fatalities and helmet laws are independent.

If they are independent, then helmet laws to not effectmotorcycle fatalities. If they are dependent, then helmet lawsdo effect motorcycle fatalities.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 22: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Example 6/ 7

Do helmet laws make a difference in the number of fatalities?

No helmet law Helmet Law

fatal accident 50 40survived accident 180 200

Compute Chi-squared statistic to test the hypothesis thatmotorcycle fatalities and helmet laws are independent.

If they are independent, then helmet laws to not effectmotorcycle fatalities. If they are dependent, then helmet lawsdo effect motorcycle fatalities.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 23: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Example 6/ 7

Do helmet laws make a difference in the number of fatalities?

No helmet law Helmet Law

fatal accident 50 40survived accident 180 200

Compute Chi-squared statistic to test the hypothesis thatmotorcycle fatalities and helmet laws are independent.

If they are independent, then helmet laws to not effectmotorcycle fatalities. If they are dependent, then helmet lawsdo effect motorcycle fatalities.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance

Page 24: Contingency Tables and Analysis of Variance · Contingency table Test for Independence Example Homework Goal of this section 2/ 7 Learn how to test for dependence/independence for

Contingency tableTest for Independence

ExampleHomework

Homework 7/ 7

Section 12.3, pages 481-482. Problems 12.20, 12.21, 12.24.

Mgmt 230: Introductory Statistics Contingency Tables and Analysis of Variance