SlideShare a Scribd company logo
1 of 33
CHI-SQUARE ( Ξ§2) TESTS
DR NJOGU
11/22/2023
1
CHI-SQUARE ( Ξ§2) TESTS
β€’ Chi Square test is a statistical procedure used to examine differences between
categorical data/variables in the same population.
β€’ It follows a chi-square probability distribution.
β€’ Tests whether a frequency distribution obtained experimentally fits an
β€œexpected" frequency distribution"
β€’ Expected Frequency is based;
β€’ Theoretical or
β€’ Previously known probability of each outcome.
11/22/2023
2
β€’ π’™πŸ =βˆ‘
(𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 π‘­π’“π’†π’’π’–π’†π’π’„π’š βˆ’π’†π’™π’‘π’†π’„π’•π’†π’… π’‡π’“π’†π’’π’–π’†π’π’„π’š)𝟐
𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’‡π’“π’†π’’π’–π’†π’π’„π’š
β€’ π’™πŸ =βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
β€’ The calculated value is compared with the tabulated value
11/22/2023
3
β€’ Steps in Chi square
β€’ An experiment is conducted; a simple random sample is taken from a
population, and each member of the population is grouped into one of k
categories.
β€’ Step 1: The observed frequencies are calculated for the sample.
β€’ Step 2: The expected frequencies are obtained from previous knowledge (or
belief) or probability theory.
β€’ 5 products – expected 20% will go for each product
11/22/2023
4
β€’ Step 3: a null hypothesis is adopted and Chi Square test is performed:
i. The null hypothesis H0: the population frequencies are equal to the
expected frequencies (O = E).
ii. The alternative hypothesis, Ha: the null hypothesis is false
iii. The level of significance is selected eg 95%
iv. The degrees of freedom: df = k -1. (k is number of groups)
11/22/2023
5
v. Calculate π’™πŸ:
π’™πŸ =βˆ‘
(𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐
𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅
π’™πŸ =βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
(vi) From Ξ± and k - 1, a π’™πŸcritical value is determined from the chi-square table.
(vii) Reject H0 if Ο‡2
calculated >π’™πŸ
critical value
11/22/2023
6
EXAMPLE
A survey is carried out among 1600 coffee drinkers on how much coffee they drink
in order to confirm previous studies. Previous studies indicate that 72% of Kenyans
drink coffee. The results of previous studies and those of the survey are presented
below. At Ξ± = 0.05, is there enough evidence to conclude that the distributions are
the same?
11/22/2023
7
Responses (O) % of coffee drinkers
2 cups per week 15%
1 cup per week 13%
1 cup per day 27%
>2cups per day 45%
Responses Number of coffee drinkers (E)
2 cups per week 206
1 cup per week 193
1 cup per day 462
>2cups per day 739
11/22/2023
8
(i) The null hypothesis H0: the population frequencies (O) are equal to expected
frequencies (E)
(ii)The alternate hypothesis, Ha: the null hypothesis is false.
(iii) Ξ± = 0.05.
(iv)The degrees of freedom: df = k - 1 = 4 - 1 = 3.
(v)The π’™πŸ
can be calculated using a table:
11/22/2023
9
Response % of Coffee
Drinkers
E O O - E (O - E)2 [(O-E)2]/E
2 cups per
week
15% 0.15 x 1600 = 240 206 -34 1156 4.817
1 cup per
week
13% 0.13 x 1600= 208 193 -15 225 1.082
1 cup per day 27% 0.27 x 1600= 432 462 30 900 2.083
2+ cups per
day
45% 0.45 x 1600 = 720 739 19 361 0.5014
βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
8:483
11/22/2023
10
π’™πŸ
=βˆ‘
(𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐
𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅
π’™πŸ
=βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
= 8:483
i. From Ξ± = 0:05 and df = k - 1 = 3, the π’™πŸ
critical is 7.815.
ii. s there enough evidence to reject H0?
β€’ Since Ο‡2
calculated 8:483 > π’™πŸ
critical 7.815, we reject the null hypothesis
11/22/2023
11
EXAMPLE
A department store, A, has four competitors: B, C, D, and E. Store A hires a
consultant to determine if the percentage of shoppers who prefer each of the
five stores is the same. A survey of 1100 randomly selected shoppers is
conducted, and the results about which one of the stores shoppers prefer are
below. Is there enough evidence at a significance level Ξ± = 0.05 to conclude
that the proportions are the same?
11/22/2023
12
Store A B C D E
Number of
Shoppers
262 234 204 190 210
11/22/2023
13
(i) The null hypothesis H0: the population frequencies are equal to the expected frequencies
(ii)The alternative hypothesis, Ha: the null hypothesis is false.
(iii) Ξ± = 0:05.
(iv)The degrees of freedom: df = k - 1 = 5 - 1 = 4.
(v) π’™πŸ can be calculated using a table:
11/22/2023
14
Preference % of
Shoppers
E O O - E (O - E)2 [(O-E)2]/E
A 20% 0.2 x 1100 =
220
262 42 1764 8.018
B 20% 0.2 x 1100 =
220
234 14 196 0.891
C 20% 0.2 x 1100 =
220
204 -16 256 1.163
D 20% 0.2 x 1100 =
220
190 -30 900 4.091
E 20% 0.2 x 1100 =
220
210 -10 100 0.455
βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
11/22/2023
15
β€’ π’™πŸ
=βˆ‘
(𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐
𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅
π’™πŸ
=βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
= 14.618
Ο‡2= 14.618
i. From Ξ± = 0:05 and df=k - 1 = 4, the π’™πŸ
critical is 9.488.
ii. Is there enough evidence to reject H0?
iii. Since Ο‡2 =14.618 > 9.488, we reject the null hypothesis
11/22/2023
16
INDEPENDENCE
β€’ Two events are independent if the occurrence of one of the events has no effect
on the occurrence of the other event.
β€’ A chi-square independence test is used to test whether or not two variables are
independent.
β€’ Experiments are conducted in which the frequencies for two variables are
determined.
β€’ To use the test, the same assumptions must be satisfied: the observed
frequencies are obtained through a simple random sample, and each expected
frequency is at least 5.
β€’ The frequencies are written down in a table: the columns contain outcomes for
one variable, and the rows contain outcomes for the other variable.
11/22/2023
17
β€’ The procedure for the hypothesis test is essentially the same. The differences are
that:
i. H0 is that the two variables are independent.
ii. Ha is that the two variables are not independent (they are dependent).
iii. The expected frequency Er,c for the entry in row r, column c is calculated using:
𝐄𝐫, 𝐜 =βˆ‘
(π’”π’–π’Ž 𝒐𝒇 π’“π’π’˜π’”,𝒓))(π’”π’–π’Ž 𝒐𝒇 π’„π’π’π’–π’Žπ’π’”,𝒄)
π’”π’‚π’Žπ’‘π’π’† π’”π’Šπ’›π’†
= 8.843
i. The degrees of freedom: (no. of rows-1)x(no. of columns-1).
11/22/2023
18
EXAMPLE
The results of a random sample of children with pain from musculoskeletal
injuries treated with acetaminophen, ibuprofen, or codeine are shown in the
table below. At Ξ± = 0.10, is there enough evidence to conclude that the
treatment and result are independent?
11/22/2023
19
Acetaminophen
(c.1)
Ibuprofen (c.2) Codeine (c.3) Total
(r.1) Significant
Improvement
58 81 61 200
(r.2) Slight
Improvement
42 19 39 100
Total 100 100 100 300
11/22/2023
20
SOLUTION
β€’ First, calculate the column and row totals.
β€’ Then find the expected frequency for each item and write it in the parenthesis next to the
observed frequency.
β€’ Now perform the hypothesis test.
i. The null hypothesis H0: the treatment and response are independent.
ii. The alternative hypothesis, Ha: the treatment and response are dependent.
iii. Ξ± = 0.10.
iv. The degrees of freedom: df = (no. of rows - 1)x(no. of columns - 1) = (2 x 1) -(3 x 1) = 1 x
2 = 2.
v. The π’™πŸ
critical can be calculated using a table:
11/22/2023
21
Row, Column E O O - E (O - E)2 [(O-E)2]/E
1,1 [200x100]/300
= 66.7
58 -8.7 75.69 1.135
1,2 [200x100]/300 =
66.7
81 14.3 204.49 3.067
1,3 [200x100]/300 =
66.7
61 -5.7 32.49 0.487
2,1 [100x100]/300 =
33.3
42 8.7 75.69 2.271
2,2 [100x100]/300 =
33.3
19 -14.3 204.49 6.135
2,3 [100x100]/300 =
33.3
39 5.7 32.49 0.975
11/22/2023
22
π’™πŸ =βˆ‘
(𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐
𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅
π’™πŸ =βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
π›˜πŸ = 14.07:
β€’
β€’ (vi) From Ξ± = 0:10 and d.f = 2, the critical value is 4.605.
β€’ (vii) Is there enough evidence to reject H0? Since π›˜πŸ 14:07 > 4:605, there is
enough statistical evidence to reject the null hypothesis.
11/22/2023
23
EXAMPLE
The side effects of a new drug are being tested against a placebo. A simple random
sample of 565 patients yields the results below. At a significance level of Ξ± = 0:05, is
there enough evidence to conclude that the treatment is independent of the side
effect of nausea?
β€’
11/22/2023
24
Result Drug (c.1) Placebo (c.2) Total
Nausea (r.1) 36 13 49
No nausea (r.2) 254 262 516
Total 290 275 565
11/22/2023
25
i. The null hypothesis H0: the treatment and response are independent.
ii. The alternative hypothesis, Ha: the treatment and response are dependent.
iii. Ξ± = 0:01.
iv. The degrees of freedom: (no. of rows-1)x(no. of columns-1) = (2 - 1) x (2 - 1) = 1 x 1 = 1.
v. The test statistic can be calculated using a table:
11/22/2023
26
Row, Column E O O – E (O - E)2 [(O-)2]/E
1,1 [49x290]/565 = 25.15 36 10.85 117.72 4.681
1,2 [49x275]/565 = 23.85 13 -10.85 117.72 4.936
2,1 [516x290]/565 = 264.85 254 -10.85 117.72 0.444
2,2 [516x275]/565 = 251.15 262 10.85 117.72 0.469
11/22/2023
27
π’™πŸ
=βˆ‘
(𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐
𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅
π’™πŸ
=βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
π›˜πŸ = 10.53:
β€’
i. From Ξ± = 0:10 and d.f = 1, the critical value is 2.706.
ii. Is there enough evidence to reject H0? Since π›˜πŸ 10.53 > 2.706, there is enough
statistical evidence to reject the null hypothesis and to believe that there is a
relationship between the treatment and response.
11/22/2023
28
EXAMPLE
β€’ Suppose that we have a 6-sided die. We assume that the die is unbiased (upon
rolling the die, each outcome is equally likely). An experiment is conducted in
which the die is rolled 240 times. The outcomes are in the table below. At a
significance level of Ξ± = 0.05, is there enough evidence to support the hypothesis
that the die is unbiased?
11/22/2023
29
Outcome 1 2 3 4 5 6
Frequency 34 44 30 46 51 35
11/22/2023
30
i. The null hypothesis H0: each face is equally likely to be the outcome of a single roll.
ii. The alternative hypothesis, Ha: the null hypothesis is false.
iii. Ξ± = 0:05.
iv. The degrees of freedom: k - 1 = 6 - 1 = 5.
v. The test statistic can be calculated using a table:
11/22/2023
31
Face E O O – E (O - E)2 (O-E)2/E
1 240/6 = 40 34 -6 36 0.9
2 240/6 = 40 44 4 16 0.4
3 240/6 = 40 30 -10 100 2.5
4 240/6 = 40 46 6 36 0.9
5 240/6 = 40 51 11 121 3.025
6 240/6 = 40 35 -5 25 0.625
11/22/2023
32
π’™πŸ
=βˆ‘
(𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐
𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅
π’™πŸ
=βˆ‘
(π‘Άβˆ’π‘¬)𝟐
𝑬
π›˜πŸ = 15.086:
i. From Ξ±= 0:01 and k - 1 = 6, the critical value is 15.086.
ii. Is there enough evidence to reject H0? Since π›˜πŸ 8:35 < 15:086, we fail to reject the null
hypothesis, that the die is fair.
11/22/2023
33

More Related Content

Similar to Chi-Square Tests Explained in Detail

7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatisticsJayashritha
Β 
Chi square test
Chi square testChi square test
Chi square testNayna Azad
Β 
4Probability and probability distributions (1).pptx
4Probability and probability distributions (1).pptx4Probability and probability distributions (1).pptx
4Probability and probability distributions (1).pptxAmanuelMerga
Β 
Categorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisCategorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisMichael770443
Β 
Lect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testLect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testRione Drevale
Β 
Non Parametric Statistics
Non Parametric StatisticsNon Parametric Statistics
Non Parametric Statisticsjennytuazon01630
Β 
1. Consider the following partially completed computer printout fo.docx
1. Consider the following partially completed computer printout fo.docx1. Consider the following partially completed computer printout fo.docx
1. Consider the following partially completed computer printout fo.docxjackiewalcutt
Β 
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docxmercysuttle
Β 
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptxCHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptxrathorebhagwan07
Β 
Chisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatisticsChisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatisticsmuhammadahmad00495
Β 

Similar to Chi-Square Tests Explained in Detail (20)

7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics
Β 
Chapter12
Chapter12Chapter12
Chapter12
Β 
Chi square test
Chi square testChi square test
Chi square test
Β 
Mech ma6452 snm_notes
Mech ma6452 snm_notesMech ma6452 snm_notes
Mech ma6452 snm_notes
Β 
4Probability and probability distributions (1).pptx
4Probability and probability distributions (1).pptx4Probability and probability distributions (1).pptx
4Probability and probability distributions (1).pptx
Β 
Chi square
Chi squareChi square
Chi square
Β 
Categorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisCategorical Data and Statistical Analysis
Categorical Data and Statistical Analysis
Β 
SNM-1.pdf
SNM-1.pdfSNM-1.pdf
SNM-1.pdf
Β 
Lect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testLect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_test
Β 
Contingency Tables
Contingency TablesContingency Tables
Contingency Tables
Β 
Chi-Square test.pptx
Chi-Square test.pptxChi-Square test.pptx
Chi-Square test.pptx
Β 
Chi sqyre test
Chi sqyre testChi sqyre test
Chi sqyre test
Β 
Chi square
Chi squareChi square
Chi square
Β 
exercises.pdf
exercises.pdfexercises.pdf
exercises.pdf
Β 
Non Parametric Statistics
Non Parametric StatisticsNon Parametric Statistics
Non Parametric Statistics
Β 
1. Consider the following partially completed computer printout fo.docx
1. Consider the following partially completed computer printout fo.docx1. Consider the following partially completed computer printout fo.docx
1. Consider the following partially completed computer printout fo.docx
Β 
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
Β 
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptxCHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
Β 
Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
Β 
Chisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatisticsChisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatistics
Β 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
Β 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
Β 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
Β 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
Β 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEslot gacor bisa pakai pulsa
Β 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
Β 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoΓ£o Esperancinha
Β 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
Β 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
Β 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
Β 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
Β 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
Β 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
Β 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
Β 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
Β 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
Β 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Β 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Β 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
Β 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
Β 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
Β 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
Β 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Β 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
Β 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Β 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
Β 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Β 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
Β 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
Β 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
Β 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Β 
β˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
β˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCRβ˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
β˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
Β 

Chi-Square Tests Explained in Detail

  • 1. CHI-SQUARE ( Ξ§2) TESTS DR NJOGU 11/22/2023 1
  • 2. CHI-SQUARE ( Ξ§2) TESTS β€’ Chi Square test is a statistical procedure used to examine differences between categorical data/variables in the same population. β€’ It follows a chi-square probability distribution. β€’ Tests whether a frequency distribution obtained experimentally fits an β€œexpected" frequency distribution" β€’ Expected Frequency is based; β€’ Theoretical or β€’ Previously known probability of each outcome. 11/22/2023 2
  • 3. β€’ π’™πŸ =βˆ‘ (𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 π‘­π’“π’†π’’π’–π’†π’π’„π’š βˆ’π’†π’™π’‘π’†π’„π’•π’†π’… π’‡π’“π’†π’’π’–π’†π’π’„π’š)𝟐 𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’‡π’“π’†π’’π’–π’†π’π’„π’š β€’ π’™πŸ =βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 β€’ The calculated value is compared with the tabulated value 11/22/2023 3
  • 4. β€’ Steps in Chi square β€’ An experiment is conducted; a simple random sample is taken from a population, and each member of the population is grouped into one of k categories. β€’ Step 1: The observed frequencies are calculated for the sample. β€’ Step 2: The expected frequencies are obtained from previous knowledge (or belief) or probability theory. β€’ 5 products – expected 20% will go for each product 11/22/2023 4
  • 5. β€’ Step 3: a null hypothesis is adopted and Chi Square test is performed: i. The null hypothesis H0: the population frequencies are equal to the expected frequencies (O = E). ii. The alternative hypothesis, Ha: the null hypothesis is false iii. The level of significance is selected eg 95% iv. The degrees of freedom: df = k -1. (k is number of groups) 11/22/2023 5
  • 6. v. Calculate π’™πŸ: π’™πŸ =βˆ‘ (𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐 𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’™πŸ =βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 (vi) From Ξ± and k - 1, a π’™πŸcritical value is determined from the chi-square table. (vii) Reject H0 if Ο‡2 calculated >π’™πŸ critical value 11/22/2023 6
  • 7. EXAMPLE A survey is carried out among 1600 coffee drinkers on how much coffee they drink in order to confirm previous studies. Previous studies indicate that 72% of Kenyans drink coffee. The results of previous studies and those of the survey are presented below. At Ξ± = 0.05, is there enough evidence to conclude that the distributions are the same? 11/22/2023 7
  • 8. Responses (O) % of coffee drinkers 2 cups per week 15% 1 cup per week 13% 1 cup per day 27% >2cups per day 45% Responses Number of coffee drinkers (E) 2 cups per week 206 1 cup per week 193 1 cup per day 462 >2cups per day 739 11/22/2023 8
  • 9. (i) The null hypothesis H0: the population frequencies (O) are equal to expected frequencies (E) (ii)The alternate hypothesis, Ha: the null hypothesis is false. (iii) Ξ± = 0.05. (iv)The degrees of freedom: df = k - 1 = 4 - 1 = 3. (v)The π’™πŸ can be calculated using a table: 11/22/2023 9
  • 10. Response % of Coffee Drinkers E O O - E (O - E)2 [(O-E)2]/E 2 cups per week 15% 0.15 x 1600 = 240 206 -34 1156 4.817 1 cup per week 13% 0.13 x 1600= 208 193 -15 225 1.082 1 cup per day 27% 0.27 x 1600= 432 462 30 900 2.083 2+ cups per day 45% 0.45 x 1600 = 720 739 19 361 0.5014 βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 8:483 11/22/2023 10
  • 11. π’™πŸ =βˆ‘ (𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐 𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’™πŸ =βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 = 8:483 i. From Ξ± = 0:05 and df = k - 1 = 3, the π’™πŸ critical is 7.815. ii. s there enough evidence to reject H0? β€’ Since Ο‡2 calculated 8:483 > π’™πŸ critical 7.815, we reject the null hypothesis 11/22/2023 11
  • 12. EXAMPLE A department store, A, has four competitors: B, C, D, and E. Store A hires a consultant to determine if the percentage of shoppers who prefer each of the five stores is the same. A survey of 1100 randomly selected shoppers is conducted, and the results about which one of the stores shoppers prefer are below. Is there enough evidence at a significance level Ξ± = 0.05 to conclude that the proportions are the same? 11/22/2023 12
  • 13. Store A B C D E Number of Shoppers 262 234 204 190 210 11/22/2023 13
  • 14. (i) The null hypothesis H0: the population frequencies are equal to the expected frequencies (ii)The alternative hypothesis, Ha: the null hypothesis is false. (iii) Ξ± = 0:05. (iv)The degrees of freedom: df = k - 1 = 5 - 1 = 4. (v) π’™πŸ can be calculated using a table: 11/22/2023 14
  • 15. Preference % of Shoppers E O O - E (O - E)2 [(O-E)2]/E A 20% 0.2 x 1100 = 220 262 42 1764 8.018 B 20% 0.2 x 1100 = 220 234 14 196 0.891 C 20% 0.2 x 1100 = 220 204 -16 256 1.163 D 20% 0.2 x 1100 = 220 190 -30 900 4.091 E 20% 0.2 x 1100 = 220 210 -10 100 0.455 βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 11/22/2023 15
  • 16. β€’ π’™πŸ =βˆ‘ (𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐 𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’™πŸ =βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 = 14.618 Ο‡2= 14.618 i. From Ξ± = 0:05 and df=k - 1 = 4, the π’™πŸ critical is 9.488. ii. Is there enough evidence to reject H0? iii. Since Ο‡2 =14.618 > 9.488, we reject the null hypothesis 11/22/2023 16
  • 17. INDEPENDENCE β€’ Two events are independent if the occurrence of one of the events has no effect on the occurrence of the other event. β€’ A chi-square independence test is used to test whether or not two variables are independent. β€’ Experiments are conducted in which the frequencies for two variables are determined. β€’ To use the test, the same assumptions must be satisfied: the observed frequencies are obtained through a simple random sample, and each expected frequency is at least 5. β€’ The frequencies are written down in a table: the columns contain outcomes for one variable, and the rows contain outcomes for the other variable. 11/22/2023 17
  • 18. β€’ The procedure for the hypothesis test is essentially the same. The differences are that: i. H0 is that the two variables are independent. ii. Ha is that the two variables are not independent (they are dependent). iii. The expected frequency Er,c for the entry in row r, column c is calculated using: 𝐄𝐫, 𝐜 =βˆ‘ (π’”π’–π’Ž 𝒐𝒇 π’“π’π’˜π’”,𝒓))(π’”π’–π’Ž 𝒐𝒇 π’„π’π’π’–π’Žπ’π’”,𝒄) π’”π’‚π’Žπ’‘π’π’† π’”π’Šπ’›π’† = 8.843 i. The degrees of freedom: (no. of rows-1)x(no. of columns-1). 11/22/2023 18
  • 19. EXAMPLE The results of a random sample of children with pain from musculoskeletal injuries treated with acetaminophen, ibuprofen, or codeine are shown in the table below. At Ξ± = 0.10, is there enough evidence to conclude that the treatment and result are independent? 11/22/2023 19
  • 20. Acetaminophen (c.1) Ibuprofen (c.2) Codeine (c.3) Total (r.1) Significant Improvement 58 81 61 200 (r.2) Slight Improvement 42 19 39 100 Total 100 100 100 300 11/22/2023 20
  • 21. SOLUTION β€’ First, calculate the column and row totals. β€’ Then find the expected frequency for each item and write it in the parenthesis next to the observed frequency. β€’ Now perform the hypothesis test. i. The null hypothesis H0: the treatment and response are independent. ii. The alternative hypothesis, Ha: the treatment and response are dependent. iii. Ξ± = 0.10. iv. The degrees of freedom: df = (no. of rows - 1)x(no. of columns - 1) = (2 x 1) -(3 x 1) = 1 x 2 = 2. v. The π’™πŸ critical can be calculated using a table: 11/22/2023 21
  • 22. Row, Column E O O - E (O - E)2 [(O-E)2]/E 1,1 [200x100]/300 = 66.7 58 -8.7 75.69 1.135 1,2 [200x100]/300 = 66.7 81 14.3 204.49 3.067 1,3 [200x100]/300 = 66.7 61 -5.7 32.49 0.487 2,1 [100x100]/300 = 33.3 42 8.7 75.69 2.271 2,2 [100x100]/300 = 33.3 19 -14.3 204.49 6.135 2,3 [100x100]/300 = 33.3 39 5.7 32.49 0.975 11/22/2023 22
  • 23. π’™πŸ =βˆ‘ (𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐 𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’™πŸ =βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 π›˜πŸ = 14.07: β€’ β€’ (vi) From Ξ± = 0:10 and d.f = 2, the critical value is 4.605. β€’ (vii) Is there enough evidence to reject H0? Since π›˜πŸ 14:07 > 4:605, there is enough statistical evidence to reject the null hypothesis. 11/22/2023 23
  • 24. EXAMPLE The side effects of a new drug are being tested against a placebo. A simple random sample of 565 patients yields the results below. At a significance level of Ξ± = 0:05, is there enough evidence to conclude that the treatment is independent of the side effect of nausea? β€’ 11/22/2023 24
  • 25. Result Drug (c.1) Placebo (c.2) Total Nausea (r.1) 36 13 49 No nausea (r.2) 254 262 516 Total 290 275 565 11/22/2023 25
  • 26. i. The null hypothesis H0: the treatment and response are independent. ii. The alternative hypothesis, Ha: the treatment and response are dependent. iii. Ξ± = 0:01. iv. The degrees of freedom: (no. of rows-1)x(no. of columns-1) = (2 - 1) x (2 - 1) = 1 x 1 = 1. v. The test statistic can be calculated using a table: 11/22/2023 26
  • 27. Row, Column E O O – E (O - E)2 [(O-)2]/E 1,1 [49x290]/565 = 25.15 36 10.85 117.72 4.681 1,2 [49x275]/565 = 23.85 13 -10.85 117.72 4.936 2,1 [516x290]/565 = 264.85 254 -10.85 117.72 0.444 2,2 [516x275]/565 = 251.15 262 10.85 117.72 0.469 11/22/2023 27
  • 28. π’™πŸ =βˆ‘ (𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐 𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’™πŸ =βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 π›˜πŸ = 10.53: β€’ i. From Ξ± = 0:10 and d.f = 1, the critical value is 2.706. ii. Is there enough evidence to reject H0? Since π›˜πŸ 10.53 > 2.706, there is enough statistical evidence to reject the null hypothesis and to believe that there is a relationship between the treatment and response. 11/22/2023 28
  • 29. EXAMPLE β€’ Suppose that we have a 6-sided die. We assume that the die is unbiased (upon rolling the die, each outcome is equally likely). An experiment is conducted in which the die is rolled 240 times. The outcomes are in the table below. At a significance level of Ξ± = 0.05, is there enough evidence to support the hypothesis that the die is unbiased? 11/22/2023 29
  • 30. Outcome 1 2 3 4 5 6 Frequency 34 44 30 46 51 35 11/22/2023 30
  • 31. i. The null hypothesis H0: each face is equally likely to be the outcome of a single roll. ii. The alternative hypothesis, Ha: the null hypothesis is false. iii. Ξ± = 0:05. iv. The degrees of freedom: k - 1 = 6 - 1 = 5. v. The test statistic can be calculated using a table: 11/22/2023 31
  • 32. Face E O O – E (O - E)2 (O-E)2/E 1 240/6 = 40 34 -6 36 0.9 2 240/6 = 40 44 4 16 0.4 3 240/6 = 40 30 -10 100 2.5 4 240/6 = 40 46 6 36 0.9 5 240/6 = 40 51 11 121 3.025 6 240/6 = 40 35 -5 25 0.625 11/22/2023 32
  • 33. π’™πŸ =βˆ‘ (𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 βˆ’π’†π’™π’‘π’†π’„π’•π’†π’…)𝟐 𝒆𝒙𝒑𝒆𝒄𝒕𝒆𝒅 π’™πŸ =βˆ‘ (π‘Άβˆ’π‘¬)𝟐 𝑬 π›˜πŸ = 15.086: i. From Ξ±= 0:01 and k - 1 = 6, the critical value is 15.086. ii. Is there enough evidence to reject H0? Since π›˜πŸ 8:35 < 15:086, we fail to reject the null hypothesis, that the die is fair. 11/22/2023 33