Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture...

42
Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences Eighth Edition by Frederick J. Gravetter and Larry B. Wallnau

Transcript of Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture...

Page 1: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Chapter 15The Chi-Square Statistic: Tests for Goodness of Fit and Independence

PowerPoint Lecture Slides

Essentials of Statistics for the Behavioral Sciences Eighth Edition

by Frederick J. Gravetter and Larry B. Wallnau

Page 2: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Chapter 15 Learning Outcomes

•Explain when chi-square test is appropriate

1

•Test hypothesis about shape of distribution using chi-square goodness of fit

2

•Test hypothesis about relationship of variables using chi-square test of independence

3

•Evaluate effect size using phi coefficient or Cramer’s V

4

Page 3: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Tools You Will Need

• Proportions (math review, Appendix A)

• Frequency distributions (Chapter 2)

Page 4: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

15.1 Parametric and Nonparametric Statistical Tests

• Hypothesis tests used thus far tested hypotheses about population parameters

• Parametric tests share several assumptions– Normal distribution in the population– Homogeneity of variance in the population– Numerical score for each individual

• Nonparametric tests are needed if research situation does not meet all these assumptions

Page 5: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Chi-Square and Other Nonparametric Tests

• Do not state the hypotheses in terms of a specific population parameter

• Make few assumptions about the population distribution (“distribution-free” tests)

• Participants usually classified into categories– Nominal or ordinal scales are used– Nonparametric test data may be frequencies

Page 6: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Circumstances Leading to Use of Nonparametric Tests

• Sometimes it is not easy or possible to obtain interval or ratio scale measurements

• Scores that violate parametric test assumptions• High variance in the original scores• Undetermined or infinite scores cannot be

measured—but can be categorized

Page 7: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

15.2 Chi-Square Test for “Goodness of Fit”

• Uses sample data to test hypotheses about the shape or proportions of a population distribution

• Tests the fit of the proportions in the obtained sample with the hypothesized proportions of the population

Page 8: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Figure 15.1 Grade Distribution for a Sample of n = 40 Students

Page 9: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Goodness of Fit Null Hypothesis

• Specifies the proportion (or percentage) of the population in each category

• Rationale for null hypotheses:– No preference (equal proportions) among

categories, OR– No difference in specified population from the

proportions in another known population

Page 10: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Goodness of Fit Alternate Hypothesis

• Could be as terse as “Not H0”• Often equivalent to “…population proportions

are not equal to the values specified in the null hypothesis…”

Page 11: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Goodness of Fit Test Data

• Individuals are classified (counted) in each category, e.g., grades; exercise frequency; etc.

• Observed Frequency is tabulated for each measurement category (classification)

• Each individual is counted in one and only one category (classification)

Page 12: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Expected Frequencies in the Goodness of Fit Test

• Goodness of Fit test compares the Observed Frequencies from the data with the Expected Frequencies predicted by null hypothesis

• Construct Expected Frequencies that are in perfect agreement with the null hypothesis

• Expected Frequency is the frequency value that is predicted from H0 and the sample size; it represents an idealized sample distribution

Page 13: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

e

eo

f

ff 22 )(

Chi-Square Statistic

• Notation– χ2 is the lower-case Greek letter Chi– fo is the Observed Frequency

– fe is the Expected Frequency

• Chi-Square Statistic

Page 14: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Chi-Square Distribution• Null hypothesis should

– Not be rejected when the discrepancy between the Observed and Expected values is small

– Rejected when the discrepancy between the Observed and Expected values is large

• Chi-Square distribution includes values for all possible random samples when H0 is true– All chi-square values ≥ 0.

– When H0 is true, sample χ2 values should be small

Page 15: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Chi-SquareDegrees of Freedom

• Chi-square distribution is positively skewed• Chi-square is a family of distributions

– Distributions determined by degrees of freedom– Slightly different shape for each value of df

• Degrees of freedom for Goodness of Fit Test– df = C – 1– C is the number of categories

Page 16: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Figure 15.2 The Chi-Square Distribution Critical Region

Page 17: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Figure 15.3 Chi-square Distributions with Different df

Page 18: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Locating the Chi-Square Distribution Critical Region

• Determine significance level (alpha)• Locate critical value of chi-square in a

table of critical values according to– Value for degrees of freedom (df)– Significance level chosen

Page 19: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Figure 15.4Critical Region for Example 15.1

Page 20: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

In the Literature

• Report should describe whether there were significant differences between category preferences

• Report should include– χ2 df, sample size (n) and test statistic value– Significance level

• E.g., χ2 (3, n = 50) = 8.08, p < .05

Page 21: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

“Goodness of Fit” Test and the One Sample t Test

• Nonparametric versus parametric test• Both tests use data from one sample to test a

hypothesis about a single population• Level of measurement determines test:

– Numerical scores (interval / ratio scale) make it appropriate to compute a mean and use a t test

– Classification in non-numerical categories (ordinal or nominal scale) make it appropriate to compute proportions or percentages to do a chi-square test

Page 22: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check

• The expected frequencies in a chi-square test _____________________________________

•are always whole numbers

A

•can contain fractions or decimal values

B

•can contain both positive and negative values

C

•can contain fractions and negative numbers

D

Page 23: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check - Answer

• The expected frequencies in a chi-square test _____________________________________

•are always whole numbers

A

•can contain fractions or decimal values

B

•can contain both positive and negative values

C

•can contain fractions and negative numbers

D

Page 24: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check

• Decide if each of the following statements is True or False

•In a Chi-Square Test, the Observed Frequencies are always whole numbers

T/F

•A large value for Chi-square will tend to retain the null hypothesis

T/F

Page 25: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check - Answers

•Observed frequencies are just frequency counts, so there can be no fractional values

True

•Large values of chi-square indicate observed frequencies differ a lot from null hypothesis predictions

False

Page 26: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

15.3 Chi-Square Test for Independence

• Chi-Square Statistic can test for evidence of a relationship between two variables– Each individual jointly classified on each variable– Counts are presented in the cells of a matrix– Design may be experimental or non-experimental

• Frequency data from a sample is used to test the evidence of a relationship between the two variables in the population using a two-dimensional frequency distribution matrix

Page 27: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Null Hypothesis for Test of Independence

• Null hypothesis: the two variables are independent (no relationship exists)

• Two versions– Single population: No relationship between two

variables in this population.– Two separate populations: No difference between

distribution of variable in the two populations• Variables are independent if there is no

consistent predictable relationship

Page 28: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Observed and Expected Frequencies

• Frequencies in the sample are the Observed frequencies for the test

• Expected frequencies are based on the null hypothesis prediction of the same proportions in each category (population)

• Expected frequency of any cell is jointly determined by its column proportion and its row proportion

Page 29: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Computing Expected Frequencies

• Frequencies computed by same method for each cell in the frequency distribution table

– fc is frequency total for the column

– fr is frequency total for the row

n

fff rce

Page 30: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Computing Chi-Square Statistic for Test of Independence

• Same equation as the Chi-Square Test of Goodness of Fit

• Chi-Square Statistic• Degrees of freedom (df) = (R-1)(C-1)

– R is the number of rows– C is the number of columns

e

eo

f

ff 22 )(

Page 31: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Chi-Square Compared to Other Statistical Procedures

• Hypotheses may be stated in terms of relationships between variables (version 1) or differences between groups (version 2)

• Chi-square test for independence and Pearson correlation both evaluate the relationships between two variables

• Depending on the level of measurement, Chi-square, t test or ANOVA could be used to evaluate differences between various groups

Page 32: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Chi-Square Compared to Other Statistical Procedures (cont.)

• Choice of statistical procedure determined primarily by the level of measurement

• Could choose to test the significance of the relationship– Chi-square– t test– ANOVA

• Could choose to evaluate the strength of the relationship with r2

Page 33: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

15.4 Measuring Effect Sizefor Chi-Square

• A significant Chi-square hypothesis test shows that the difference did not occur by chance– Does not indicate the size of the effect

• For a 2x2 matrix, the phi coefficient (Φ) measures the strength of the relationship

• So Φ2 would provide proportion of variance accounted for just like r2 n

2

φ

Page 34: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Effect size in a larger matrix

• For a larger matrix, a modification of the phi-coefficient is used: Cramer’s V

• df* is the smaller of (R-1) or (C-1)

*)(

2

dfnV

Page 35: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Interpreting Cramer’s V

Small Effect

Medium Effect

Large Effect

For df* = 1 0.10 0.30 0.50For df* = 2 0.07 0.21 0.35For df* = 3 0.06 0.17 0.29

Page 36: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

15.5 Chi-Square Test Assumptions and Restrictions

• Independence of observations

– Each observed frequency is generated by adifferent individual

• Size of expected frequencies– Chi-square test should not be performed when the

expected frequency of any cell is less than 5

Page 37: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check

• A basic assumption for a chi-square hypothesis test is ______________________

•the population distribution(s) must be normal

A

•the scores must come from an interval or

ratio scale

B

•the observations must be independent

C

•None of the other choices are assumptions

for chi-square

D

Page 38: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check - Answer

• A basic assumption for a chi-square hypothesis test is ______________________

•the population distribution(s) must be normal

A

•the scores must come from an interval or

ratio scale

B

•the observations must be independent

C

•None of the other choices are assumptions

for chi-square

D

Page 39: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check

• Decide if each of the following statements is True or False

•The value of df for a chi-square test does not depend on the sample size (n)

T/F

•A positive value for the chi-square statistic indicates a positive correlation between the two variables

T/F

Page 40: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Learning Check - Answers

•The value of df for a chi-square test depends only on the number of rows and columns in the observation matrix

True

•Chi-square cannot be a negative number, so it cannot accurately show the type of correlation between the two variables

False

Page 41: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

Figure 15.5: Example 15.2 SPSS Output—Chi-square Test for Independence

Page 42: Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral Sciences.

AnyQuestions

?

Concepts?

Equations?