anova knowledge assessment 1. in what situation should you use anova (the f stat) instead of doing a...

24
ANOVA Knowledge Assessment ANOVA Knowledge Assessment 1. 1. In what situation should you use ANOVA In what situation should you use ANOVA (the F stat) instead of doing a t test? (the F stat) instead of doing a t test? 2. 2. What information does the F statistic What information does the F statistic give you? give you? 3. 3. For the ANOVA, the dependent variable For the ANOVA, the dependent variable should be what level of measurement? should be what level of measurement? What about the IV? What about the IV? 4. 4. Why is the F test called “exploratory”? Why is the F test called “exploratory”?

Upload: leslie-lang

Post on 19-Jan-2018

222 views

Category:

Documents


0 download

DESCRIPTION

Contingency Tables (cross tabs)  Generally used when variables are nominal and/or ordinal Even here, should have a limited number of variable attributes (categories) Even here, should have a limited number of variable attributes (categories)  Some find these very intuitive…others struggle It is very easy to misinterpret these critters It is very easy to misinterpret these critters

TRANSCRIPT

Page 1: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

ANOVA Knowledge AssessmentANOVA Knowledge Assessment1.1. In what situation should you use ANOVA (the F stat) In what situation should you use ANOVA (the F stat)

instead of doing a t test?instead of doing a t test?

2.2. What information does the F statistic give you?What information does the F statistic give you?

3.3. For the ANOVA, the dependent variable should be For the ANOVA, the dependent variable should be what level of measurement?what level of measurement?

• What about the IV?What about the IV?

4.4. Why is the F test called “exploratory”?Why is the F test called “exploratory”?

Page 2: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

ANOVA Knowledge AssessmentANOVA Knowledge Assessment1.1. In what situation should you use ANOVA (the F stat) In what situation should you use ANOVA (the F stat)

instead of doing a t test?instead of doing a t test?• When your independent variable has 3 or more When your independent variable has 3 or more

categories/attritbutes.categories/attritbutes.

2.2. What information does the F statistic give you?What information does the F statistic give you?• The F statistic tells you the ratio of between-group variance to The F statistic tells you the ratio of between-group variance to

within-group variance.within-group variance.

3.3. For the ANOVA, the dependent variable should be For the ANOVA, the dependent variable should be what level of measurement? What about the IV?what level of measurement? What about the IV?

• The dependent variable should be interval-ratio. The The dependent variable should be interval-ratio. The independent variable can be either nominal or ordinal.independent variable can be either nominal or ordinal.

4.4. Why is the F test called “exploratory”?Why is the F test called “exploratory”?• Because a significant F statistic doesn’t allow you to identify Because a significant F statistic doesn’t allow you to identify

which difference(s) in means are statistically significant.which difference(s) in means are statistically significant.

Page 3: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Contingency Tables (cross tabs)Contingency Tables (cross tabs) Generally used when variables are Generally used when variables are nominalnominal

and/or and/or ordinalordinal Even here, should have a limited number of variable Even here, should have a limited number of variable

attributes (categories) attributes (categories) Some find these very intuitive…others struggleSome find these very intuitive…others struggle

It is very easy to misinterpret these crittersIt is very easy to misinterpret these critters

Page 4: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Interpreting a Contingency TableInterpreting a Contingency Table

WHAT IS IN THE INDIVIDUAL CELLS?WHAT IS IN THE INDIVIDUAL CELLS? The number of cases that fit in that particular The number of cases that fit in that particular

cellcell• In other words, In other words, frequenciesfrequencies (number of cases that (number of cases that

fit criteria)fit criteria) For small tables, and/or small sample sizes, it For small tables, and/or small sample sizes, it

may be possible to detect relationships by may be possible to detect relationships by “eyeballing” frequencies. For most..“eyeballing” frequencies. For most..• Convert to Percentages: a way to Convert to Percentages: a way to standardize cellsstandardize cells

and make relationships more apparentand make relationships more apparent

Page 5: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Example 1Example 1 Is there is an even distribution of membership across 4 Is there is an even distribution of membership across 4

political parties?political parties? (N=40 UMD students)(N=40 UMD students)

CategoriesCategories FF %%

RepublicanRepublican 1212 30%30%

DemocratDemocrat 1414 35%35%

IndependentIndependent 99 23%23%

GreenGreen 55 10%10%

Page 6: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Example 2Example 2

A survey of 10,000 U.S. residentsA survey of 10,000 U.S. residents Is one’s political view related to attitudes Is one’s political view related to attitudes

towards police?towards police? What are the DV and IV?What are the DV and IV?

Convention for bivariate tablesConvention for bivariate tables The IV is on the top of the table (dictates columns)The IV is on the top of the table (dictates columns) The DV is on the side (dictates rows). The DV is on the side (dictates rows).

Page 7: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Example 2 ContinuedExample 2 Continued

Attitude TowardsPolice

Political Party Total

Repub Democrat Libertarian Socialist

Favorable 2900 2100 180 30 5210

Unfav. 1900 1800 160 28 3888

Total 4800 3900 340 58 9098

Page 8: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

The Percentages of InterestThe Percentages of Interest

Attitude TowardsPolice

Political Party Total

Repub Democrat Libertarian Socialist

Favorable 2900 (60%)

2100(54%)

180(53%)

30(52%)

5210

Unfav 1900 1800 160 28 3888Total 4800 3900 340 58 9098

Page 9: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

The Test Statistic for Contingency The Test Statistic for Contingency TablesTables

Chi Square, or Chi Square, or χχ22 CalculationCalculation

• Observed frequencies (your sample data)Observed frequencies (your sample data)• Expected frequencies (Expected frequencies (UNDER NULL)UNDER NULL)

Intuitive: how different are the observed cell Intuitive: how different are the observed cell frequencies from the expected cell frequenciesfrequencies from the expected cell frequencies

Degrees of Freedom:Degrees of Freedom:• 1-way = K-11-way = K-1• 2-way = (# of Rows -1) (# of Columns -1)2-way = (# of Rows -1) (# of Columns -1)

Page 10: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

CHI SQUARECHI SQUARE The most simple form of the Chi square The most simple form of the Chi square

is the one-way Chi square testis the one-way Chi square test• Used to determine whether frequencies observed Used to determine whether frequencies observed

differ significantly from an even (differ significantly from an even (expected under expected under nullnull) distribution) distribution

Page 11: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Chi Square: StepsChi Square: Steps1.1. Find the expected (Find the expected (under null hypothesisunder null hypothesis) cell ) cell

frequenciesfrequencies

2.2. Compare expected & observed frequencies cell by Compare expected & observed frequencies cell by cellcell

3.3. If null hypothesis is true, expected and observed If null hypothesis is true, expected and observed frequencies should be close in valuefrequencies should be close in value

4.4. Greater the difference between the observed and Greater the difference between the observed and expected frequencies, the greater the possibility of expected frequencies, the greater the possibility of rejecting the null rejecting the null

Page 12: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

1-WAY CHI SQUARE1-WAY CHI SQUARE 1-way Chi Square Example: There is an even distribution 1-way Chi Square Example: There is an even distribution

of membership across 4 political parties (N=40 UMD of membership across 4 political parties (N=40 UMD students)students)

Find the expected cell frequenciesFind the expected cell frequencies ( (FFe e = N / K)= N / K)

CategoriesCategories FFoo FFee

RepublicanRepublican 1212 1010

DemocratDemocrat 1414 1010

Independ.Independ. 99 1010

GreenGreen 55 1010

Page 13: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

1-WAY CHI SQUARE1-WAY CHI SQUARE 1-way Chi Square Example: There is an even distribution of 1-way Chi Square Example: There is an even distribution of

membership across 4 political parties (N=40 UMD students)membership across 4 political parties (N=40 UMD students) Compare observed & expected frequencies cell-by-cellCompare observed & expected frequencies cell-by-cell

CategoriesCategories FFoo FFee ffoo - f - fee

RepublicanRepublican 1212 1010 22

DemocratDemocrat 1414 1010 44

Independ.Independ. 99 1010 -1-1

GreenGreen 55 1010 -5-5

Page 14: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

1-WAY CHI SQUARE1-WAY CHI SQUARE 1-way Chi Square Example: There is an even distribution of 1-way Chi Square Example: There is an even distribution of

membership across 4 political parties (N=40 UMD students)membership across 4 political parties (N=40 UMD students) Square the difference between observed & expected frequenciesSquare the difference between observed & expected frequencies

CategoriesCategories FFoo FFee ffoo - f - fee (f(foo - f - fee))22

RepublicanRepublican 1212 1010 22 44

DemocratDemocrat 1414 1010 44 1616

Independ.Independ. 99 1010 -1-1 11

GreenGreen 55 1010 -5-5 2525

Page 15: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

1-WAY CHI SQUARE1-WAY CHI SQUARE 1-way Chi Square Example: There is an even distribution of 1-way Chi Square Example: There is an even distribution of

membership across 4 political parties (N=40 UMD students)membership across 4 political parties (N=40 UMD students) Divide that difference by expected frequencyDivide that difference by expected frequency

CategoriesCategories FFoo FFee ffoo - f - fee (f(foo - f - fee))22 (f(foo - f - fee))2 2 /f/fee

RepublicanRepublican 1212 1010 22 44 0.40.4

DemocratDemocrat 1414 1010 44 1616 1.61.6

Independ.Independ. 99 1010 -1-1 11 0.10.1

GreenGreen 55 1010 -5-5 2525 2.52.5

∑∑== 4.64.6

Page 16: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Interpreting Chi-SquareInterpreting Chi-Square Chi-square has no intuitive meaning, it can Chi-square has no intuitive meaning, it can

range from zero to very largerange from zero to very large As with other test statistics, the real interest is As with other test statistics, the real interest is

the “p value” associated with the calculated chi-the “p value” associated with the calculated chi-square valuesquare value• Conventional testing = find Conventional testing = find χχ2 (critical) 2 (critical) for stated for stated

“alpha” (.05, .01, etc.) “alpha” (.05, .01, etc.) Reject if Reject if χχ2 (observed) is 2 (observed) is greater than greater than χχ2 2 (critical) (critical)

• SPSS: find the exact probability of obtaining the SPSS: find the exact probability of obtaining the χ2χ2 under the null (reject if less than alpha)under the null (reject if less than alpha)

Page 17: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

The Chi-Square Sampling Distribution The Chi-Square Sampling Distribution (Assuming Null is True)(Assuming Null is True)

Page 18: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Interpreting χInterpreting χ2 2

The old fashioned way The old fashioned way Chi square = 4.6Chi square = 4.6

df (1-way Chi square) = K-1 = 3df (1-way Chi square) = K-1 = 3

XX22 (critical) (critical) (p<.05) = 7.815 (from Appendix C)(p<.05) = 7.815 (from Appendix C)

Obtained (4.6) < critical (7.815)Obtained (4.6) < critical (7.815)

DecisionDecision Fail to reject the null hypothesis. There is not a significant Fail to reject the null hypothesis. There is not a significant

difference in political party membership at UMDdifference in political party membership at UMD

Page 19: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

2-WAY CHI SQUARE2-WAY CHI SQUARE For use with BIVARIATE Contingency TablesFor use with BIVARIATE Contingency Tables

Display the scores of cases on two different variables at the same Display the scores of cases on two different variables at the same time (rows are always time (rows are always DVDV & columns are always & columns are always IVIV))

Intersection of rows & columns is called “cells” Intersection of rows & columns is called “cells” Column & row Column & row marginal totalsmarginal totals (a.k.a. “subtotals”) should always (a.k.a. “subtotals”) should always

add up to Nadd up to N

N=40N=40 Packers FanPackers Fan Vikings FanVikings Fan TOTALSTOTALS

Like Brett FavreLike Brett Favre 1414 77 2121

Don’t Like FavreDon’t Like Favre 66 1313 1919

TOTALS:TOTALS: 2020 2020 4040

Page 20: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Null Hypothesis for 2-Way Null Hypothesis for 2-Way χ2χ2

The two variables are independentThe two variables are independent Independence:Independence:

• Classification of a case into a category on one Classification of a case into a category on one variable has no effect on the probability that the variable has no effect on the probability that the case will be classified into any category of the case will be classified into any category of the second variablesecond variable

Page 21: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

N=40N=40 Packers FanPackers Fan Vikings FanVikings Fan TOTALSTOTALS

Like Brett FavreLike Brett Favre 14 (10.5)14 (10.5) 7 (10.5)7 (10.5) 2121

Don’t Like FavreDon’t Like Favre 6 (9.5)6 (9.5) 13 (9.5)13 (9.5) 1919

TOTALS:TOTALS: 2020 2020 4040

2-WAY CHI SQUARE2-WAY CHI SQUARE Find the expected frequenciesFind the expected frequencies

FFee= = Row Marginal X Column MarginalRow Marginal X Column Marginal

NN•“Like Favre” Row = (21 x 20)/40 =420/40=10.5•“Don’t Like” Row = (19 x 20)/40 = 380/40= 9.5

Page 22: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

2-WAY CHI SQUARE2-WAY CHI SQUARE• Compare expected & observed frequencies cell by cellCompare expected & observed frequencies cell by cell

• XX22(obtained)(obtained) = 4.920 = 4.920

• df= (r-1)(c-1) = 1 X 1 = 1df= (r-1)(c-1) = 1 X 1 = 1

• XX22(critical)(critical) = 3.841 (Healey Appendix C) = 3.841 (Healey Appendix C)

• Obtained > CriticalObtained > Critical

• CONCLUSION:CONCLUSION: Reject the null: There is a relationship between the team that Reject the null: There is a relationship between the team that

students root for and their opinion of Brett Favre (p<.05).students root for and their opinion of Brett Favre (p<.05).

Page 23: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Chi Square – Example #2Chi Square – Example #2 Is quality of a school system significantly Is quality of a school system significantly

related to a community’s per capita income?related to a community’s per capita income?

Per Capita Per Capita IncomeIncome

QualityQuality LowLow HighHigh TotalsTotalsLowLow 1818 66 2424HighHigh 1212 1414 2626

TotalsTotals 3030 2020 5050

Page 24: ANOVA Knowledge Assessment 1. In what situation should you use ANOVA (the F stat) instead of doing a t test? 2. What information does the F statistic give

Chi Square – Example #2Chi Square – Example #2• First, calculate expected frequencies…

Per Capita IncomePer Capita Income

QualityQuality LowLow HighHigh TotalsTotals

LowLow 18 (14.4)18 (14.4) 6 (9.6)6 (9.6) 2424

HighHigh 12 (15.6)12 (15.6) 14 (10.4)14 (10.4) 2626

TotalsTotals 3030 2020 5050