0% found this document useful (0 votes)
31 views17 pages

Chi Square Test

Uploaded by

hvijay885
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views17 pages

Chi Square Test

Uploaded by

hvijay885
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

The Chi-Square Statistic

1
Chi as Nonparametric Tests
• The term "non-parametric" refers to the fact that
the chi‑square tests do not require assumptions
about population parameters nor do they test
hypotheses about population parameters.

2
Parametric and Nonparametric
Tests
• The most obvious difference between the
chi‑square tests and the other hypothesis
tests we have considered (t and ANOVA)
is the nature of the data.
• For chi‑square, the data are frequencies
rather than numerical scores.

3
The Chi-Square Test for
Goodness-of-Fit
• The chi-square test for goodness-of-fit uses
frequency data from a sample to test hypotheses
about the shape or proportions of a population.
• Each individual in the sample is classified into
one category on the scale of measurement.
• The data, called observed frequencies, simply
count how many individuals from the sample are
in each category.

4
The Chi-Square Test for
Goodness-of-Fit (cont.)
• The null hypothesis specifies the
proportion of the population that should be
in each category.
• The proportions from the null hypothesis
are used to compute expected
frequencies that describe how the sample
would appear if it were in perfect
agreement with the null hypothesis.

5
The Chi-Square Test for
Independence
• The second chi-square test, the
chi-square test for independence, can
be used and interpreted in two versions:
1. Testing hypotheses about the
relationship between two variables in a
population, or
2. Testing hypotheses about
differences between proportions for two
or more populations.
7
The Chi-Square Test for
Independence (cont.)
• Although the two versions of the test for
independence appear to be different, they
are equivalent and they are
interchangeable.
• The first version of the test emphasizes
the relationship between chi-square and a
correlation, because both procedures
examine the relationship between two
variables.
8
The Chi-Square Test for
Independence (cont.)
• The second version of the test
emphasizes the relationship between
chi-square and an independent-measures
t test (or ANOVA) because both tests use
data from two (or more) samples to test
hypotheses about the difference between
two (or more) populations.

9
The Chi-Square Test for
Independence (cont.)
• The first version of the chi-square test for
independence views the data as one
sample in which each individual is
classified on two different variables.
• The data are usually presented in a matrix
(contingency table) with the categories for
one variable defining the rows and the
categories of the second variable
defining the columns.
10
The Chi-Square Test for
Independence (cont.)

• The data, called observed frequencies,


simply show how many individuals from
the sample are in each cell of the matrix.
• The null hypothesis for this test states that
there is no relationship between the two
variables; that is, the two variables are
independent.

11
The Chi-Square Test for
Independence
Whether or not two attributes are associated
1. The null hypothesis is used to construct an
idealized sample distribution of expected
frequencies that describes how the sample
would look if the data were in perfect agreement
with the null hypothesis.

12
The Chi-Square Test for
Independence (cont.)
For the goodness of fit test, the expected frequency for
each category is obtained by
expected frequency = fe = pn
(p is the proportion from the null hypothesis and n is the
size of the sample)

13
Expected frequency and df
For the test for independence,
the expected frequency for each cell in the matrix is
obtained by
(row total)(column total)
expected frequency = fe = ─────────────────
n
Or, Fe = (RT x CT) / GT
• where RT = Row Total
• CT = Column Total
• GT = Grand Total
Computation of degree of freedom(from contingency table)
• Df = (r – 1) (c – 1)
X² for 2x2 tables

Contingency ( 2x2 ) table is a two-way table with two


rows & two columns
Used to depict relationships between two attributes

Total

Variable-1 Yes a b a+b


( or control ) Marginal
No c d c+d totals

Total a+cb+d N

Marginal totals Grand total


The Chi-Square Test for
Independence (cont.)
2. A chi-square statistic is computed to measure
the amount of discrepancy between the ideal
sample (expected frequencies from H0) and the
actual sample data (the observed frequencies =
fo).
A large discrepancy results in a large value for
chi-square and indicates that the data do not fit
the null hypothesis and the hypothesis should be
rejected.

16
The Chi-Square Test for
Independence (cont.)
The calculation of chi-square is the same for all
chi-square tests:
(fo – fe)2
chi-square = χ2 = Σ ─────
fe
The fact that chi‑square tests do not require
scores from an interval or ratio scale makes
these tests a valuable alternative to the t tests,
ANOVA, or correlation, because they can be
used with data measured on a nominal or an
ordinal scale.
17

You might also like