Chi-Square Test of Independence

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

Chi-Square Test of Independence:

Two-Way Contingency Analysis


Typical questions:
Medicine - Are children more likely to get infected
with virus A than adults?
Sociology - Is there a difference between the marital
status of men and woman in their early 30s?
Management - Is customer segment A more likely to
make an online purchase than segment B?
Economy - Do white-collar employees have a brighter
economical outlook than blue-collar workers?
Examples:
1. A market researcher might want to determine
whether the type of soft drink preferred by a
consumer is independent of the consumers age.
2. An organizational behaviorist might want to know
whether absenteeism is independent of job
classification
3. Financial investors might want to determine whether
type of preferred stock investment is independent of
the region where the investor resides.
Examples: The maternity wards of two hospitals had different
preparation for childbirth schemes. A study of mothers who had
participated in the schemes asked them to assess their
satisfaction with the scheme with the following results:
(Observed counts) Hospital
A B Total
Very satisfied 38 72 110
Satisfied 33 57 90
Neutral 42 38 80
Dissatisfied a little 26 44 70
Dissatisfied a lot 11 29 40
Total 200 240 440
Teaching Pedagogy

Learning by Doing

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
When observations are classified on the basis of two
variables and arranged in a table, the resulting table is
referred to as a contingency table. Chi-square test of
independence uses this contingency table for
determining independence of two variables; this is why
this test is sometimes referred to as contingency
analysis.
When we add the row or column totals, the grand total
(N) is obtained. This grand total is the sum of all the
frequencies and represents the sample size.

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
The chi-square independence test is used to
determine whether there is association between a row
variable and column variable in a contingency table
constructed from sample data.
( ) The null hypothesis is that the variables are
not associated, or independent.
( ) The alternative hypothesis is that the variables
are associated, or dependent.

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
In a chi-square independence test, the null hypothesis is
always

Ho: the variables are independent

The alternative hypothesis is always

H1: the variables are dependent



Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
The expected frequency of cell jk is

Where RT is the row total, CT the column total, and N the total number of frequencies

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis

Chi-Square Test Statistic



Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Example: The Vice President (Sales) of a garment
company wants to determine whether sales of the
companys brand of jeans is independent of age group. He
has appointed a marketing researcher for this purpose. This
marketing researcher has taken a random sample of 703
consumers who have purchased jeans. The researcher
conducted survey for three brands of the jeans, namely
Brand 1, Brand 2, and Brand 3.The researcher has also
divided the age groups into four categories: 15 to 25, 26 to
35, 36 to 45, and 46 to 55. The observations of the
researcher are provided in Table 1:

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Table 1: Contingency table for Example 1

Determine whether brand preference is independent


of age group. Use alpha=0.05.

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Solution: The seven steps of hypothesis can be
performed as below:
Step 1: Set null and alternative hypothesis
The null and alternatives hypothesis can be stated as
Ho: Brand preference is independent of age group
(i.e. the variables are independent)
H1: Brand preference is not independent of age
group (i.e. the variables are dependent)

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Step 2: Determine the appropriate statistical test

Chi-Square Test Statistic



Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Step 3: Set the level of Significance
Alpha () has been specified as 0.05
Step 4: Set the decision rule
For a given level of significance 0.05, the rules for the acceptance or
rejection of the null hypothesis are as follows:
2 2
If > , reject the null hypothesis, otherwise, do not reject
the null hypothesis
2
The critical 2 value is 0.05, 6 =12.59, where degree of freedom=
(number of rows-1) (number of columns-1)=(4-1)(3-1)=6

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Step 5: Collect the sample data
The sample data are given in Table 1

Step 6: Analysis the data


The contingency table with the observed and expected
frequencies shown in below Table.

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Step-2

Step-1

Step-3

Chi-square ( ) Test of Independence
Expected Frequencies
Age Brand 1 Brand 2 Brand 3
15-25 67.85206 69.96302 74.18492176
25-35 52.48933 54.12233 57.3883357
35-45 47.04836 48.51209 51.43954481
45-55 57.61024 59.40256 62.98719772

Observed Frequencies Expected Frequencies


Step-3
(fo) (fe)
65 67.85206
60 52.48933
45 47.04836
55 57.61024
75 69.96302
40 54.12233
52 48.51209
65 59.40256
72 74.18492
64 57.38834
50 51.43954
60 62.9872
Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Observed Expected
Frequencies Frequencies ( - ) ( ) ( ) /( ) Step-4
( ) ( )
65 67.85206 -2.85206259 8.134261011 0.119882
60 52.48933 7.510668563 56.41014227 1.074697
45 47.04836 -2.04836415 4.195795706 0.08918
55 57.61024 -2.61024182 6.813362363 0.118267
75 69.96302 5.036984353 25.37121137 0.362637
40 54.12233 -14.1223329 199.4402854 3.684991
52 48.51209 3.487908962 12.16550892 0.250773
65 59.40256 5.597439545 31.33132946 0.527441
72 74.18492 -2.18492176 4.773883114 0.064351
64 57.38834 6.611664296 43.71410476 0.761725
50 51.43954 -1.43954481 2.072289254 0.040286
60 62.9872 -2.98719772 8.923350243 0.141669
Chi square ( ) = 7.235899

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Step 7: Arrive at a Statistical conclusion and business
implication

= .23

., =12.59.

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Step 7: Arrive at a Statistical conclusion and business
implication
At 95% confidence level, the critical value obtained from the
2 2
chi-square table is 0.05, 6 =12.59. is 7.23, which is less
than the tabular value and falls in the acceptance region.
Hence, the null hypothesis is accepted and the alternative
hypothesis is rejected.
On the basis of analysis, we can say that there is enough
evidence to indicate that brand preference is independent of age
group. So, the management can go in for a uniform sales and
marketing policy.

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Problem 1: Tire Quality: Case Study
The operations manager of a company that manufactures tires wants
to determine whether there are any differences in the quality of
workmanship among the three daily shifts. He randomly selects
496 tires and carefully inspects them. Each tire is either classified as
perfect, satisfactory, or defective, and the shift that produced it is
also recorded. The two categorical variables of interest are: shift and
condition of the tire produced. The data can be summarized by the
accompanying two-way table. Do these data provide sufficient
evidence at the 5% significance level to infer that there are
differences in quality among the three shifts?

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Practice 1: Tire Quality: Case Study

Perfect Satisfactory Defective


Shift 1 106 124 1
Shift 2 67 85 1
Shift 3 37 72 3

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Problem 2: A firm interested in knowing preference for its three
brands: Brand 1, Brand 2, and Brand 3 is independent of type of
occupation: government job, private job, and own business. Data
collected from the consumers are given in the following contingency
table. Use Alpha () = 0.05 to test whether brand preference is
independent of type of occupation.
Brands
Type of Occupation
Brand 1 Brand 2 Brand 3
Government Job 78 87 90
Private Job 110 120 125
Own Business 111 123 127

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis
Problem 3: A business researcher wants to determine whether type
of gasoline preferred is independent of a persons income. She takes
a random survey of gasoline purchaser, 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 49999, (3) 50, 000 to 99999, or (4) more than
100000. The business researcher tallies the responses and obtains the
results in Below table. Using Alpha () = 0.05.

Chi-square ( ) Test of Independence: Two-way
Contingency Analysis

Type of Gasoline
Regular Premium Extra Premium
Less than 30,000 85 16 6
Income 30,000 to 49999 102 27 13
50,000 to 99999 36 22 15
More than 10000 15 23 25
Home Practices

Book: page no. 563


Chi-Square Test of Independence
Example Table 12.9, Problems: 12.22, 12.23, 12.24,
12.25, 12.26 and 12.27.

You might also like