Analysis For Business Chi-Square Test
Analysis For Business Chi-Square Test
Chi-square Test
Introduction
• we learned how to test hypotheses using data from
one or two samples.
• These tests are known as parametric tests, because
they involve testing the parameters of a population,
such as the mean and proportions.
• They use the parametric statistics of samples that
come from the population being tested.
• To formulate these tests, we make assumptions about
the population, for example, that the population is
normally distributed.
Introduction
• There are certain kinds of data that cannot be tested in
this way such as: data which was not collected in a
random sample and therefore does not have a normal
distribution; ordinal data; ranked data; and data from
more than two populations.
• In business, we often encounter data of this type,
such as: the results of a survey of which brand of
washing powder consumers prefer, an analysis of the
arrival of customers at supermarket checkouts, a
survey of employees' attitudes towards performance
appraisal in different departments,
Introduction
• a study of whether male staff have been more
successful in passing professional examinations
than female staff.
• For these types of data, it is necessary to use
tests which do not make restrictive assumptions
about the shape of population distributions.
• These are known as non-parametric tests. we are
going to consider one of the most commonly used non-
parametric tests, called the chi-squared test
Chi-Square as a Statistical Test
• Chi-square test: an inferential statistics
technique designed to test for significant
relationships between two variables
organized in a bivariate table.
• Note:
– The chi square test does not prove that a hypothesis is
correct
• It evaluates to what extent the data and the
hypothesis have a good fit
Example
Left-Handed vs. Gender
Dominant Hand: Left vs. Right
Gender: Male vs. Female
Hand Preference
sample size = n = 300:
Gender Left Right
120 Females, 12
were left handed Female 12 108 120
180 Males, 24 were
left handed Male 24 156 180
36 264 300
2 Test for the Difference
Between Two Proportions
H0: π1 = π2 (Proportion of females who are left
handed is equal to the proportion of
males who are left handed)
H1: π1 ≠ π2 (The two proportions are not the same)
2
χ STAT for the 2 x 2 case has 1 degree of freedom
Decision Rule:
χ 2
If STAT χ 2
α , reject H0,
otherwise, do not reject
H0
0
Do notH Reject H0 2
reject
2α
0
Computing the
Average Proportion
The average X1 X2 X
p
proportion is: n1 n2 n
36 264 300
The Chi-Square Test Statistic
Hand Preference
Gender Left Right
Observed = 12 Observed = 108
Female 120
Expected = 14.4 Expected = 105.6
Observed = 24 Observed = 156
Male 180
Expected = 21.6 Expected = 158.4
36 264 300
The test statistic is:
(f o f e ) 2
χ 2STAT
all cells
fe
(12 14.4) 2 (108 105.6) 2 (24 21.6) 2 (156 158.4) 2
0.7576
14.4 105.6 21.6 158.4
Decision Rule
2
The test statistic is χ STAT 0.7576 ; χ 02.05 with 1 d.f. 3.841
Decision Rule:
2
If χ STAT > 3.841, reject H0,
otherwise, do not reject H0
Here,
2 2
0.05 χ STAT = 0.7576< χ 0.05 = 3.841,
so we do not reject H0 and
0 conclude that there is not
Do notH
reject 0
Reject H0 2 sufficient evidence that the two
20.05 = 3.841 proportions are different at =
0.05
2 Test for Differences Among
More Than Two Proportions
• Extend the 2 test to the case with more
than two independent populations:
H0: π1 = π2 = … = πc
H1: Not all of the πj are equal (j = 1, 2, …, c)
The Chi-Square Test
Statistic
The Chi-square test statistic is:
( fo fe )2
2
χ STAT
all cells
fe
• Where:
fo = observed frequency in a particular cell of the 2 x c table
fe = expected frequency in a particular cell if H0 is true
Where:
row total = sum of all frequencies in the row
column total = sum of all frequencies in the column
n = overall sample size
Decision Rule
χ 2
If STAT χ 2
α , reject H0,
otherwise, do not reject H0
2
Where χ α is from the chi-squared distribution
with (r – 1)(c – 1) degrees of freedom
Example
• The meal plan selected by 200 students is shown below:
( f o f e )2
2
χ STAT
all cells
fe
( 24 24 .5 ) 2 ( 32 30 .8 ) 2 ( 10 8.4 ) 2
0.709
24 .5 30 .8 8.4
2
The test statistic is χ STAT 0.709 ; χ 02.05 with 6 d.f. 12.592
Decision Rule:
2
If χ STAT > 12.592, reject H0,
otherwise, do not reject H0
0.05 Here,
2 2
χ STAT = 0.709 < χ 0.05 = 12.592,
so do not reject H0
0
Do notH
reject Reject H0 2 Conclusion: there is not
0
sufficient evidence that meal
20.05=12.592 plan and class standing are
related at = 0.05