You are on page 1of 12

Chi-Square Tests

A Chi-Square Test for


Goodness of Fit
●● Steps
Stepsininaachi-square
chi-squareanalysis:
analysis:
✓✓Formulate
Formulatenullnulland
andalternative
alternativehypotheses
hypotheses
✓✓Compute
Computefrequencies
frequenciesof ofoccurrence
occurrencethat
thatwould
wouldbe beexpected
expectedififthe
the
nullhypothesis
null hypothesiswere
weretruetrue--expected
expectedcell
cellcounts
counts
✓✓Note
Noteactual,
actual,observed
observedcell cellcounts
counts
✓✓Use
Usedifferences
differencesbetween
betweenexpected
expectedand
andactual
actualcell
cellcounts
countsto
tofind
find
chi-squarestatistic:
chi-square statistic:

✓Where
✓ Wherekkisisthe
thenumber
numberofofcategories
categoriesand
andccisisthe
thenumber
numberof
of
parametersbeing
parameters beingestimated
estimatedfrom
fromthe
thesample
sampledata.
data.
Example
• Quite often in the business world, random
arrivals are Poisson distributed. This
distribution is characterized by an average
arrival rate λ per some interval. Suppose a
teller supervisor believes the distribution of
random arrivals at a local bank is Poisson and
sets out to test this hypothesis by gathering
information. The following data represent a
distribution of frequency of arrivals during
one-minute intervals at the bank.
Example
Number of Observed
Arrivals Frequencies

0 7
1 18
2 25
3 17
4 12
≥5 5

Use α = 0.05 to test these data in an effort to determine


whether they are Poisson distributed.
Test of Independence
• Suppose a business researcher is interested in
determining whether geographic region is
independent of financial investment. On a
questionnaire, the following two questions might
be used to measure geographic region and type of
financial investment.
– In which region of the country do you reside?
A: Northeast B: Midwest C: South D: West
– Which type of financial investment are you most likely
to make today?
E: Stocks F: Bonds G: Treasury Bills
Test of Independence
• The business researcher would tally the
frequencies of responses to these two questions
into a two-way table called a contingency table.
• Because the chi-square test of independence uses
a contingency table, the test is sometimes
referred to as contingency analysis.
• In this example, we have two classification
categories:
– Geographic regions: A, B, C, D
– Types of financial investments: E, F, G
Contingency Table Analysis:
A Chi-Square Test for Independence
Contingency Table Analysis:
A Chi-Square Test for Independence
AAandandBBareareindependent
independentif:
if:P(A
P(A∩∩B)
B)==P(A)×P(B).
P(A)×P(B).
IfIfthe
thefirst
firstand
andsecond
secondclassification
classificationcategories
categoriesare
areindependent:
independent:EEij==(R
ij
(R)(C
i
i)(C)/n
j
j)/n

Null and alternative hypotheses:


H0: The two classification variables are independent of each other
H1: The two classification variables are not independent

Chi-square test statistic for independence:

Degrees of freedom: df=(r-1)(c-1)

Expected cell count:


Example
• Suppose a business researcher wants to
determine whether type of gasoline preferred is
independent of person’s income. She takes a
random survey of gasoline purchasers, asking
them one question about gasoline preference and
a second question about income. The respondent
is to check whether he or she prefers (1) regular
gasoline, (2) premium gasoline, or (3) extra
premium gasoline. The respondent also is to
check his or her income brackets as being (1) less
than $30,000, (2) $30,000 to $49,999, (3) $50,000
to $99,999, or (4) more than $100,000.
Example
• The researcher tallies the responses and obtains the
result in the following table.
Type of
Gasoline
Extra
Income Regular Premium Premium
Less than $30,000 8 1 6 10
$30,000 to 5
10 6
2 1 7
14
$49,999 to
$50,000 23 7
2 3
1 27
$99,000
At least $100,000 6
1 2 5
2 3
6
5
23 3
8 5 3
38
8 8 9
• Using α = .01, test whether type of gasoline preferred 5
is independent of income level.
Chi-Square Test for Equality
of Proportions
Tests
Tests of
of equality
equality of
of proportions
proportions across
across several
several populations
populations are
are also
also called
called
tests of homogeneity.
In general, when we compare c populations (or r populations if they are arranged
as rows rather than columns in the table), then the Null and alternative
hypotheses:
H0: p1 = p2 = p3 = … = pc
H1: Not all pi, I = 1, 2, …, c, are equal
Example
• A survey of morning beverage market shows that
the primary breakfast beverage for 17% of
Americans is milk. A milk producer in Wisconsin,
where milk is plentiful, believes that the figure is
higher for Wisconsin. To test this idea, she
contacts a random sample of 550 Wisconsin
residents and asks which primary beverage they
consumed for breakfast that day. Suppose 115
replied that milk was the primary beverage . Using
a level of significance of .05, test the idea that the
milk figure is higher for Wisconsin.

You might also like