Chi-Square test

28
Chi-Square test

description

Chi-Square test. PRESENTED BY: Dr.Zhian Salah Ramzi Head of community and Family medicine/ sulaimani university. Chi-Square Test. Evaluates whether observed frequencies for a qualitative variable (or variables) are adequately described by hypothesized or expected frequencies. - PowerPoint PPT Presentation

Transcript of Chi-Square test

Page 1: Chi-Square test

Chi-Square test

Page 2: Chi-Square test

PRESENTED BYPRESENTED BY::

Dr.Zhian Salah RamziDr.Zhian Salah Ramzi

Head of community andHead of community andFamily medicine/ sulaimani universityFamily medicine/ sulaimani university

Page 3: Chi-Square test

Chi-Square TestChi-Square Test

Evaluates whether observed Evaluates whether observed frequencies for a qualitative frequencies for a qualitative variable (or variables) are variable (or variables) are adequately described by adequately described by hypothesized or expected hypothesized or expected frequencies.frequencies.

Qualitative (or categorical) data is Qualitative (or categorical) data is a set of observations where any a set of observations where any single observation is a word or code single observation is a word or code that represents a class or category.that represents a class or category.

Page 4: Chi-Square test

Nonparametric StatisticsNonparametric Statistics

Chi-Square (Chi-Square (22 )Test )Test Used to analyze data in situations where one wishes Used to analyze data in situations where one wishes

to test whether the observed number of responses in to test whether the observed number of responses in a category differs from the expected number that a category differs from the expected number that fall in that category.fall in that category.

Dependent Variable is nominal.Dependent Variable is nominal. HHoo represents the expected proportion of responses represents the expected proportion of responses

falling in a given category.falling in a given category.

Page 5: Chi-Square test

• Where k = # of categories, Oi = observed number of cases in each category, Ei = expected number of cases in each category.

• When Ho is true, Oi Ei and 2 will be small. If Ho is false,

then Oi Ei and 2 will be large.

Simple and complex – one variable or multiple variables

k

Ei

EiOi 22 )(

Page 6: Chi-Square test

Recent studies have found that most teens are knowledgeable about AIDS, yet many continue to practice high-risk sexual behaviors. King and Anderson (1993) asked young people the following question: “If you could have sexual relations with any and all partners of your choosing, as often as you wished, for the next 2 (or 10) years, but at the end of that time period you would die of AIDS, would you make this choice?” A five-point Likert scale was used to assess the subjects’ responses. For the following

Page 7: Chi-Square test

data, the responses “probably no,” “unsure,” “probably yes”, and “definitely yes” were pooled into the category “other.” Using the .05 level of significance, test for independence.

Definitely No Definitely No OtherOther

MalesMales 451451 165165

FemalesFemales 509509 118118

Page 8: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

State the research hypothesis.State the research hypothesis. Is willingness to participate in Is willingness to participate in

unprotected sex independent of unprotected sex independent of gender?gender?

State the statistical hypothesis.State the statistical hypothesis.

HH0:0: Response to the question and gender are not relatedResponse to the question and gender are not relatedResponse to the question and gender are relatedResponse to the question and gender are relatedHHA:A:

Page 9: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

To find expected values:To find expected values: Find column, row, and overall totals.Find column, row, and overall totals.

Definitely NoDefinitely No OtherOtherTotalTotal

MalesMales 451451 165165 616616

FemalesFemales 509509 118118 627627

TotalTotal 960960 283283 12431243

Page 10: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

To find expected values:

Definitely NoDefinitely No OtherOtherTotalTotal

MalesMales 451 (475.75) 165 616

FemalesFemales 509509 118118 627627

TotalTotal 960960 283283 12431243

EiEi

EiEi

EiEi

Page 11: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

To find expected values:

Definitely No OtherTotal

Males 451 (475.75) 165 616

Females 509 (484.25) 118 627

Total 960 283 1243

EiEi

EiEi

Page 12: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

To find expected values:

Definitely No OtherTotal

Males 451 (475.75) 165 (140.25)616

Females 509 (484.25) 118 627

Total 960 283 1243

EiEi

EiEi

Page 13: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

To find expected values:

Definitely No OtherTotal

Males 451 (475.75) 165 (140.25)616

Females 509 (484.25) 118 (142.75)627

Total 960 283 1243

EiEi

EiEi

Page 14: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

Set the decision rule. Degrees of Freedom

(number of columns - 1) (number of rows -1) (c-1)(r-1)

1)1)(1()12)(12( dfDefinitely No

Other

Males 451 165

Females 509 118

Page 15: Chi-Square test

Chi-Square Chi-Square

Set the decision rule.

84.3

1

05.

2

crit

df

Page 16: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

Calculate the test statistic.Definitely No Other

Total

Males 451 (475.75) 165 (140.25)616

Females 509 (484.25) 118 (142.75)627

Total 960 283 124375.142

)75.142118(

25.140

)25.140165(

25.484

)25.484509(

75.475

)75.475451( 22222

75.142

56.612

25.140

56.612

25.484

56.612

75.475

56.612

21.11

29.437.426.129.1

k

Ei

EiOi 22 )(

Page 17: Chi-Square test

The Chi-Square testThe Chi-Square test

Page 18: Chi-Square test

Chi-Square Test for Chi-Square Test for IndependenceIndependence

Decide if your result is significant. Reject H0, 11.21>3.84

Interpret your results. Willingness to engage in unprotected sex

and gender are not independent.Definitely No Other

Total

Males 451 (475.75) 165 (140.25)616

Females 509 (484.25) 118 (142.75)627

Total 960 283 1243

Page 19: Chi-Square test
Page 20: Chi-Square test
Page 21: Chi-Square test
Page 22: Chi-Square test
Page 23: Chi-Square test
Page 24: Chi-Square test
Page 25: Chi-Square test
Page 26: Chi-Square test
Page 27: Chi-Square test
Page 28: Chi-Square test