0% found this document useful (0 votes)
147 views4 pages

Chi-Square Test of Association: Independence. Testing Procedure: Step-1

The document describes how to perform a chi-square test of association between two categorical variables using sample data. The test determines whether the two variables are independent or associated. The procedure involves: 1) stating the null and alternative hypotheses, 2) choosing a significance level, 3) calculating the test statistic by summing the squared differences between observed and expected frequencies divided by expected frequencies, 4) comparing the test statistic to the critical value, and 5) making a conclusion about whether to reject or fail to reject the null hypothesis of independence. An example calculates the test statistic for sample data on airline ticket and flight types and concludes the variables are associated.

Uploaded by

barirah sohail
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)
147 views4 pages

Chi-Square Test of Association: Independence. Testing Procedure: Step-1

The document describes how to perform a chi-square test of association between two categorical variables using sample data. The test determines whether the two variables are independent or associated. The procedure involves: 1) stating the null and alternative hypotheses, 2) choosing a significance level, 3) calculating the test statistic by summing the squared differences between observed and expected frequencies divided by expected frequencies, 4) comparing the test statistic to the critical value, and 5) making a conclusion about whether to reject or fail to reject the null hypothesis of independence. An example calculates the test statistic for sample data on airline ticket and flight types and concludes the variables are associated.

Uploaded by

barirah sohail
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/ 4

Chi-Square Test of Association

An important application of a chi-square test involves using sample data to test the
independence of two categorical variables. For this test we take one sample from a population
and record the observations for two categorical variables.

We will summarize the data by counting the number of responses for each combination of a
category for variable 1 and a category for variable 2. The null hypothesis for this test is that the
two categorical variables are independent. Thus, this test is referred to as a test of
Independence.

Testing Procedure:

Step-1

𝐻0 : The Attributes are independent

𝐻1 : The Attributes are Associated

Step-2

Choose a level of significance 𝜶 = 𝟎. 𝟎𝟏, 𝟎. 𝟎𝟓

Step-3

Test Statistic
(𝒐𝒊 −𝒆𝒊 )^𝟐
Chi-square test = 𝝌𝟐 = ∑
𝒆𝒊

with df = (r-1)(c-1)

Step-4

Computation:

Where 𝑜𝑖 = Observed frequency 𝑒𝑖 = expected frequency

r = no of rows in data, c = no of columns in data.


(𝑟𝑜𝑤𝑠 𝑡𝑜𝑡𝑎𝑙)∗(𝑐𝑜𝑙𝑢𝑚𝑛 𝑡𝑜𝑡𝑎𝑙)
𝑒𝑖 = 𝑔𝑟𝑎𝑛𝑑 𝑡𝑜𝑡𝑎𝑙

Step-5
Critical Region:

𝝌𝟐 ≥ 𝝌𝟐𝜶, 𝒅𝒇

Step-6

Conclusion:

Decide whether Hypothesis Accepted or Rejected

Example:

A Bloomburg businessweek subsciber study asked. In the past 12 months, when traveling for
business, what type of airline ticket did you purchase most often?. A second question asked if
the type of airline ticket purchased most ofen was for domestic or international travel. Sample
data obtained are shown in the following table.

Type of Flight
Type of Ticket Domestic International Total
First Class 29 22 51
Business Class 95 121 216
Economy Class 518 135 653
Total 642 278 920

Using alpha 5% level of significance, is the type of ticket purchased independent for the type of
flight? What is your conclusion.

Solution:

𝐻0 : There is no association between type of ticket and type of flight.

𝐻1 : There is assocition between type of ticket and type of flight.

Step-2

Choose a level of significance 𝜶 = 𝟎. 𝟎𝟓

Step-3

Test Statistic
(𝒐𝒊 −𝒆𝒊 )^𝟐
Chi-square test = 𝝌𝟐 = ∑
𝒆𝒊
with df = (r-1)(c-1)

Step-4

Computation:

We find expected frequencies;

Type of Flight
Type of Ticket Domestic International Total
First Class 29 22 (278*51)/920= 51
(642*51)/920=35.58 15.41
Business Class 95 121 216
(642*216)/920=150.73 (278*216)/920=65.27
Economy Class 518 135( 278*653)/920= 653
(642*653)/920=455.68 197.32
Total 642 278 920

𝑶𝒊 𝒆𝒊 (𝑶𝒊 − 𝒆𝒊 )^𝟐 (𝑶𝒊 − 𝒆𝒊 )^𝟐/𝒆𝒊


29 35.58 43.296 43.296/35.58=1.216
95 150.73 3105.83 3105.83/150.73=
20.605
518 455.68 3883.78 8.52
22 15.41 43.42 2.818
121 65.27 3105.83 47.58
135 197.32 3883.78 19.68
100.4304

𝝌𝟐 = 𝟏𝟎𝟎. 𝟒𝟑𝟎𝟒

Step-5

Critical Region

𝝌𝟐 ≥ 𝝌𝟐𝜶, 𝒅𝒇 df = (3-1)(2-1) = 2(1)=2

𝝌𝟐 ≥ 𝝌𝟐𝟎.𝟎𝟓, 𝟐

𝝌𝟐 ≥ 𝟓. 𝟗𝟗𝟏
Conclusion:

Since calculated value falls in rejection region so we reject Ho. It may concluded that there is
association between type of ticket most often used with type of flight.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy