SlideShare a Scribd company logo
Anandapadmanabhan J.
S1 M.Com
Chi-Square Test
Karl Pearson introduced a
test to distinguish whether
an observed set of
frequencies differs from a
specified frequency
distribution
The chi-square test uses
frequency data to generate a
statistic

Karl Pearson
A chi-square test is a statistical test
commonly used for testing independence
and goodness of fit. Testing independence
determines whether two or more
observations across two populations are
dependent on each other (that is, whether
one variable helps to estimate the other).
Testing for goodness of fit determines if
an observed frequency distribution
matches a theoretical frequency
distribution.
Chi-Square Test

Parametric
Test for
comparing
variance

Non-Parametric
Testing
Independence
Test for
Goodness of Fit
Conditions for the application of 2 test
Observations recorded and collected are
collected on random basis.
All items in the sample must be
independent.
No group should contain very few items,
say less than 10. Some statisticians take this
number as 5. But 10 is regarded as better by
most statisticians.
Total number of items should be large, say
at least 50.
The 2 distribution is not symmetrical and all the
values are positive. For each degrees of freedom
we have asymmetric curves.
1. Test for comparing variance

2 =

Chi- Square Test as a Non-Parametric Test

Test of Goodness of Fit.
Test of Independence.

 (O  E ) 
2
  

E


2
 (O  E ) 
2
  

E


2
2. As a Test of Goodness of Fit
It enables us to see how well does
the assumed theoretical distribution(such
as Binomial distribution, Poisson
distribution or Normal distribution) fit to
the observed data. When the calculated
value of χ2 is less than the table value at
certain level of significance, the fit is
considered to be good one and if the
calculated value is greater than the table
value, the fit is not considered to be good.
EXAMPLE
As personnel director, you
want to test the perception of
fairness of three methods of
performance evaluation. Of
180 employees, 63 rated
Method 1 as fair, 45 rated
Method 2 as fair, 72 rated
Method 3 as fair. At the 0.05
level of significance, is there
a difference in perceptions?
SOLUTION
Observed
frequency

Expected
frequency

(O-E)

(O-E)2

(O-E)2
E

63
45
72

60
60
60

3
-15
12

9
225
144

0.15
3.75
2.4
6.3
 H0: p1 = p2 = p3 = 1/3
 H1: At least 1 is different



 = 0.05

Test Statistic:
2 = 6.3

 n1

= 63 n2 = 45 n3 =
 Critical Value(s):

72

Decision:
Reject H0 at sign. level 0.05
Conclusion:
At least 1 proportion is different

Reject H0
 = 0.05
0

5.991

2
3.As a Test of Independence
χ2 test enables us to explain whether or not
two attributes are associated. Testing
independence determines whether two or more
observations across two populations are
dependent on each other (that is, whether one
variable helps to estimate the other. If the
calculated value is less than the table value at
certain level of significance for a given degree of
freedom, we conclude that null hypotheses stands
which means that two attributes are independent
or not associated. If calculated value is greater
than the table value, we reject the null
hypotheses.
Steps involved
Determine The Hypothesis:
Ho : The two variables are independent
Ha : The two variables are associated

Calculate Expected frequency
Calculate test statistic

 (O  E ) 
  

E


2

2

Determine Degrees of Freedom

df = (R-1)(C-1)
Compare computed test statistic
against a tabled/critical value
The computed value of the Pearson chisquare statistic is compared with the critical
value to determine if the computed value is
improbable
The critical tabled values are based on
sampling distributions of the Pearson chisquare statistic.
If calculated 2 is greater than 2 table value,
reject Ho
Critical values of

2

EXAMPLE
Suppose a researcher is interested in voting
preferences on gun control issues.
 A questionnaire was developed and sent to a
random sample of 90 voters.
 The researcher also collects information about
the political party membership of the sample of
90 respondents.

BIVARIATE FREQUENCY TABLE OR
CONTINGENCY TABLE
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

25
BIVARIATE FREQUENCY TABLE OR
CONTINGENCY TABLE
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

25
Row frequency

BIVARIATE FREQUENCY TABLE OR
CONTINGENCY TABLE
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

25

22
BIVARIATE FREQUENCY TABLE OR
CONTINGENCY TABLE
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

Column frequency

25
DETERMINE THE HYPOTHESIS
•

Ho : There is no difference between D &
R in their opinion on gun control issue.

•

Ha : There is an association between
responses to the gun control survey and
the party membership in the population.
CALCULATING TEST STATISTICS
Favor

Neutral

Oppose

f row

fo =10
fe =13.9
Republican fo =15
fe =11.1

fo =10
fe =13.9
fo =15
fe =11.1

fo =30
fe=22.2
fo =10
fe =17.8

50

f column

25

40

n = 90

Democrat

25

40
CALCULATING TEST STATISTICS
Favor
Democrat

Neutral

Oppose

f row

fo =10
fe =13.9
Republican fo =15
fe =11.1

fo =10
fo =30
fe =13.9 fe=22.2
fo =15
fo =10
= 40* fe =17.8
fe =11.1 25/90

50

f column

25

n = 90

25

40

40
CALCULATING TEST STATISTICS
(10  13.89) 2 (10  13.89) 2 (30  22.2) 2
 



13.89
13.89
22.2
2

(15  11.11) 2 (15  11.11) 2 (10  17.8) 2


11.11
11.11
17.8

= 11.03
DETERMINE DEGREES OF FREEDOM
df

= (R-1)(C-1) =
(2-1)(3-1) = 2
COMPARE COMPUTED TEST STATISTIC
AGAINST TABLE VALUE
α

= 0.05
 df = 2
 Critical tabled value = 5.991
 Test statistic, 11.03, exceeds critical
value
 Null hypothesis is rejected
 Democrats & Republicans differ
significantly in their opinions on gun
control issues
2 TEST OF INDEPENDENCE
THINKING CHALLENGE
You’re a marketing research analyst. You ask a
random sample of 286 consumers if they
purchase Diet Pepsi or Diet Coke. At the 0.05
level of significance, is there evidence of a
relationship?
Diet Pepsi
Diet Coke
No
Yes
Total
No
84
32
116
Yes
48
122
170
Total
132
154
286
2 TEST OF INDEPENDENCE SOLUTION*



Eij  5 in all cells

116·132
286

Diet Coke

Diet Pepsi
154·132
286
No
Yes
Obs. Exp. Obs. Exp. Total

No

84

53.5

32

62.5

116

Yes

48

78.5

122

91.5

170

Total

132

132

154

154

286

170·132
286

170·154
286
2 TEST OF INDEPENDENCE SOLUTION*

 nij  Eij 


  
Eij
all cells

2

2

 n11  E11 


 n12  E12 


2

2

E11

E12

84  53.5


2

53.5

 n22  E22 
 

2

E22

32  62.5


2

62.5

122  91.5
 

2

91.5

 54.29
 H0:

No Relationship

 H1:

Relationship

 = 0.05
 df = (2 - 1)(2 - 1) = 1
 Critical Value(s):


Test Statistic:

2 = 54.29

Decision:
Reject at sign. level 0 .05

Reject H0
 = 0.05

0

3.841

2

Conclusion:

There is evidence of a relationship
2 TEST OF INDEPENDENCE THINKING
CHALLENGE 2
There is a statistically significant relationship
between purchasing Diet Coke and Diet
Pepsi. So what do you think the relationship
is? Aren’t they competitors?
Diet Coke
No
Yes
Total

Diet Pepsi
No
Yes
84
32
48
122
132
154

Total
116
170
286
YOU RE-ANALYZE THE DATA
High
Income
Diet Coke
No
Yes
Total

Diet Pepsi
No
Yes
4
30
40
2
44
32

Total
34
42
76

Diet Coke
No
Yes
Total

Diet Pepsi
No
Yes
80
2
8
120
88
122

Total
82
128
210

Low
Income

Data mining example: no need for statistics here!
TRUE RELATIONSHIPS*
Diet Coke

Underlying
causal relation
Control or
intervening variable
(true cause)

Apparent
relation
Diet Pepsi
MORAL OF THE STORY
Numbers don’t
think - People
do!
CONCLUSION
1.

Explained 2 Test for Proportions

2.

Explained 2 Test of Independence
Chi square test

More Related Content

What's hot

Student t-test
Student t-testStudent t-test
Student t-test
Steve Bishop
 
Chi – square test
Chi – square testChi – square test
Chi – square test
Dr.M.Prasad Naidu
 
Analysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to knowAnalysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to know
Stat Analytica
 
Mann Whitney U test
Mann Whitney U testMann Whitney U test
Mann Whitney U test
Dr. Ankit Gaur
 
Chi -square test
Chi -square testChi -square test
Chi -square test
VIVEK KUMAR SINGH
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaQasim Raza
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
Tesfamichael Getu
 
STATISTICS: Hypothesis Testing
STATISTICS: Hypothesis TestingSTATISTICS: Hypothesis Testing
STATISTICS: Hypothesis Testingjundumaug1
 
non parametric statistics
non parametric statisticsnon parametric statistics
non parametric statistics
Anchal Garg
 
Test of significance
Test of significanceTest of significance
Test of significance
Dr Bushra Jabeen
 
Introduction to ANOVA
Introduction to ANOVAIntroduction to ANOVA
Introduction to ANOVA
AKASH GHANATE
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Madhuranath R
 
Chi square
Chi squareChi square
Analysis of variance
Analysis of varianceAnalysis of variance
Analysis of variance
Dr NEETHU ASOKAN
 
The chi – square test
The chi – square testThe chi – square test
The chi – square test
Majesty Ortiz
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Kaori Kubo Germano, PhD
 

What's hot (20)

Student t-test
Student t-testStudent t-test
Student t-test
 
Non-Parametric Tests
Non-Parametric TestsNon-Parametric Tests
Non-Parametric Tests
 
Chi – square test
Chi – square testChi – square test
Chi – square test
 
Analysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to knowAnalysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to know
 
T test
T testT test
T test
 
Mann Whitney U test
Mann Whitney U testMann Whitney U test
Mann Whitney U test
 
Chi -square test
Chi -square testChi -square test
Chi -square test
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anova
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
STATISTICS: Hypothesis Testing
STATISTICS: Hypothesis TestingSTATISTICS: Hypothesis Testing
STATISTICS: Hypothesis Testing
 
non parametric statistics
non parametric statisticsnon parametric statistics
non parametric statistics
 
Test of significance
Test of significanceTest of significance
Test of significance
 
Introduction to ANOVA
Introduction to ANOVAIntroduction to ANOVA
Introduction to ANOVA
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Confidence interval
Confidence intervalConfidence interval
Confidence interval
 
Chi square
Chi squareChi square
Chi square
 
Analysis of variance
Analysis of varianceAnalysis of variance
Analysis of variance
 
The chi – square test
The chi – square testThe chi – square test
The chi – square test
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Analysis of variance anova
Analysis of variance anovaAnalysis of variance anova
Analysis of variance anova
 

Viewers also liked

Tests of significance
Tests of significanceTests of significance
Tests of significance
Shubhanshu Gupta
 
mathematical models for drug release studies
mathematical models for drug release studiesmathematical models for drug release studies
mathematical models for drug release studies
SR drug laboratories
 
Linear regression without tears
Linear regression without tearsLinear regression without tears
Linear regression without tears
Ankit Sharma
 
Compaction and compression PPT MANIK
Compaction and compression PPT MANIKCompaction and compression PPT MANIK
Compaction and compression PPT MANIK
Imran Nur Manik
 
Diffusion ppt ak
Diffusion ppt akDiffusion ppt ak
Diffusion ppt ak
Atish khilari
 
Dissolution f1 and f2 Analysis and IVIVC
Dissolution f1 and f2 Analysis and IVIVCDissolution f1 and f2 Analysis and IVIVC
Dissolution f1 and f2 Analysis and IVIVC
Cipla Pharmaceuticals
 
Student's T-Test
Student's T-TestStudent's T-Test
Sales budget ,forcasting and control
Sales budget ,forcasting and controlSales budget ,forcasting and control
Sales budget ,forcasting and control
jack99
 
Analytical method validation
Analytical method validationAnalytical method validation
Analytical method validationGaurav Kr
 
Pharmacokinetics ppt
Pharmacokinetics pptPharmacokinetics ppt
Pharmacokinetics ppt
NITISH SHAH
 
Industrial relations
Industrial relations Industrial relations
Industrial relations Geeno George
 

Viewers also liked (15)

Chi square test
Chi square testChi square test
Chi square test
 
Tests of significance
Tests of significanceTests of significance
Tests of significance
 
mathematical models for drug release studies
mathematical models for drug release studiesmathematical models for drug release studies
mathematical models for drug release studies
 
Linear regression without tears
Linear regression without tearsLinear regression without tears
Linear regression without tears
 
Compaction and compression PPT MANIK
Compaction and compression PPT MANIKCompaction and compression PPT MANIK
Compaction and compression PPT MANIK
 
Pradip ppt
Pradip pptPradip ppt
Pradip ppt
 
Chi square test
Chi square test Chi square test
Chi square test
 
Diffusion ppt ak
Diffusion ppt akDiffusion ppt ak
Diffusion ppt ak
 
Dissolution f1 and f2 Analysis and IVIVC
Dissolution f1 and f2 Analysis and IVIVCDissolution f1 and f2 Analysis and IVIVC
Dissolution f1 and f2 Analysis and IVIVC
 
Student's T-Test
Student's T-TestStudent's T-Test
Student's T-Test
 
Diffusion
DiffusionDiffusion
Diffusion
 
Sales budget ,forcasting and control
Sales budget ,forcasting and controlSales budget ,forcasting and control
Sales budget ,forcasting and control
 
Analytical method validation
Analytical method validationAnalytical method validation
Analytical method validation
 
Pharmacokinetics ppt
Pharmacokinetics pptPharmacokinetics ppt
Pharmacokinetics ppt
 
Industrial relations
Industrial relations Industrial relations
Industrial relations
 

Similar to Chi square test

Chisquare Test
Chisquare Test Chisquare Test
Chisquare Test
Manas Mondal
 
Chi sqaure test
Chi sqaure testChi sqaure test
Chi sqaure test
Pritam Kolge
 
Marketing Research Hypothesis Testing.pptx
Marketing Research Hypothesis Testing.pptxMarketing Research Hypothesis Testing.pptx
Marketing Research Hypothesis Testing.pptx
xababid981
 
Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.ppt
BAGARAGAZAROMUALD2
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
Azmi Mohd Tamil
 
NON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptxNON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptx
DrLasya
 
Parametric Statistics
Parametric StatisticsParametric Statistics
Parametric Statistics
jennytuazon01630
 
Goodness of Fit Notation
Goodness of Fit NotationGoodness of Fit Notation
Goodness of Fit Notation
Long Beach City College
 
Non parametric-tests
Non parametric-testsNon parametric-tests
Non parametric-tests
Asmita Bhagdikar
 
Parametric Test -T test.pptx by Dr. Neha Deo
Parametric Test -T test.pptx by Dr. Neha DeoParametric Test -T test.pptx by Dr. Neha Deo
Parametric Test -T test.pptx by Dr. Neha Deo
Neha Deo
 
Hypothesis testing for nonparametric data
Hypothesis testing for nonparametric data Hypothesis testing for nonparametric data
Hypothesis testing for nonparametric data
KwambokaLeonidah
 
Stat2013
Stat2013Stat2013
univariate and bivariate analysis in spss
univariate and bivariate analysis in spss univariate and bivariate analysis in spss
univariate and bivariate analysis in spss
Subodh Khanal
 
Lesson06_static11
Lesson06_static11Lesson06_static11
Lesson06_static11thangv
 
Non-parametric Statistical tests for Hypotheses testing
Non-parametric Statistical tests for Hypotheses testingNon-parametric Statistical tests for Hypotheses testing
Non-parametric Statistical tests for Hypotheses testing
Sundar B N
 
Test of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testTest of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square test
dr.balan shaikh
 
linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...
KavyasriPuttamreddy
 
Testing hypothesis (methods of testing the statement of organizations)
Testing hypothesis (methods of testing the statement of organizations)Testing hypothesis (methods of testing the statement of organizations)
Testing hypothesis (methods of testing the statement of organizations)
syedahadisa929
 
Hypothsis testing
Hypothsis testingHypothsis testing
Hypothsis testing
University of Balochistan
 

Similar to Chi square test (20)

Chisquare Test
Chisquare Test Chisquare Test
Chisquare Test
 
Chi sqaure test
Chi sqaure testChi sqaure test
Chi sqaure test
 
CHI Square
CHI SquareCHI Square
CHI Square
 
Marketing Research Hypothesis Testing.pptx
Marketing Research Hypothesis Testing.pptxMarketing Research Hypothesis Testing.pptx
Marketing Research Hypothesis Testing.pptx
 
Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.ppt
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
 
NON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptxNON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptx
 
Parametric Statistics
Parametric StatisticsParametric Statistics
Parametric Statistics
 
Goodness of Fit Notation
Goodness of Fit NotationGoodness of Fit Notation
Goodness of Fit Notation
 
Non parametric-tests
Non parametric-testsNon parametric-tests
Non parametric-tests
 
Parametric Test -T test.pptx by Dr. Neha Deo
Parametric Test -T test.pptx by Dr. Neha DeoParametric Test -T test.pptx by Dr. Neha Deo
Parametric Test -T test.pptx by Dr. Neha Deo
 
Hypothesis testing for nonparametric data
Hypothesis testing for nonparametric data Hypothesis testing for nonparametric data
Hypothesis testing for nonparametric data
 
Stat2013
Stat2013Stat2013
Stat2013
 
univariate and bivariate analysis in spss
univariate and bivariate analysis in spss univariate and bivariate analysis in spss
univariate and bivariate analysis in spss
 
Lesson06_static11
Lesson06_static11Lesson06_static11
Lesson06_static11
 
Non-parametric Statistical tests for Hypotheses testing
Non-parametric Statistical tests for Hypotheses testingNon-parametric Statistical tests for Hypotheses testing
Non-parametric Statistical tests for Hypotheses testing
 
Test of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testTest of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square test
 
linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...
 
Testing hypothesis (methods of testing the statement of organizations)
Testing hypothesis (methods of testing the statement of organizations)Testing hypothesis (methods of testing the statement of organizations)
Testing hypothesis (methods of testing the statement of organizations)
 
Hypothsis testing
Hypothsis testingHypothsis testing
Hypothsis testing
 

Recently uploaded

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Chi square test

  • 2. Chi-Square Test Karl Pearson introduced a test to distinguish whether an observed set of frequencies differs from a specified frequency distribution The chi-square test uses frequency data to generate a statistic Karl Pearson
  • 3. A chi-square test is a statistical test commonly used for testing independence and goodness of fit. Testing independence determines whether two or more observations across two populations are dependent on each other (that is, whether one variable helps to estimate the other). Testing for goodness of fit determines if an observed frequency distribution matches a theoretical frequency distribution.
  • 5. Conditions for the application of 2 test Observations recorded and collected are collected on random basis. All items in the sample must be independent. No group should contain very few items, say less than 10. Some statisticians take this number as 5. But 10 is regarded as better by most statisticians. Total number of items should be large, say at least 50.
  • 6. The 2 distribution is not symmetrical and all the values are positive. For each degrees of freedom we have asymmetric curves.
  • 7. 1. Test for comparing variance 2 = 
  • 8. Chi- Square Test as a Non-Parametric Test Test of Goodness of Fit. Test of Independence.  (O  E )  2     E   2
  • 9.  (O  E )  2     E   2
  • 10. 2. As a Test of Goodness of Fit It enables us to see how well does the assumed theoretical distribution(such as Binomial distribution, Poisson distribution or Normal distribution) fit to the observed data. When the calculated value of χ2 is less than the table value at certain level of significance, the fit is considered to be good one and if the calculated value is greater than the table value, the fit is not considered to be good.
  • 11. EXAMPLE As personnel director, you want to test the perception of fairness of three methods of performance evaluation. Of 180 employees, 63 rated Method 1 as fair, 45 rated Method 2 as fair, 72 rated Method 3 as fair. At the 0.05 level of significance, is there a difference in perceptions?
  • 13.  H0: p1 = p2 = p3 = 1/3  H1: At least 1 is different   = 0.05 Test Statistic: 2 = 6.3  n1 = 63 n2 = 45 n3 =  Critical Value(s): 72 Decision: Reject H0 at sign. level 0.05 Conclusion: At least 1 proportion is different Reject H0  = 0.05 0 5.991 2
  • 14. 3.As a Test of Independence χ2 test enables us to explain whether or not two attributes are associated. Testing independence determines whether two or more observations across two populations are dependent on each other (that is, whether one variable helps to estimate the other. If the calculated value is less than the table value at certain level of significance for a given degree of freedom, we conclude that null hypotheses stands which means that two attributes are independent or not associated. If calculated value is greater than the table value, we reject the null hypotheses.
  • 15. Steps involved Determine The Hypothesis: Ho : The two variables are independent Ha : The two variables are associated Calculate Expected frequency
  • 16. Calculate test statistic  (O  E )      E   2 2 Determine Degrees of Freedom df = (R-1)(C-1)
  • 17. Compare computed test statistic against a tabled/critical value The computed value of the Pearson chisquare statistic is compared with the critical value to determine if the computed value is improbable The critical tabled values are based on sampling distributions of the Pearson chisquare statistic. If calculated 2 is greater than 2 table value, reject Ho
  • 19. EXAMPLE Suppose a researcher is interested in voting preferences on gun control issues.  A questionnaire was developed and sent to a random sample of 90 voters.  The researcher also collects information about the political party membership of the sample of 90 respondents. 
  • 20. BIVARIATE FREQUENCY TABLE OR CONTINGENCY TABLE Favor Neutral Oppose f row 10 10 30 50 Republican 15 15 10 40 f column 25 40 n = 90 Democrat 25
  • 21. BIVARIATE FREQUENCY TABLE OR CONTINGENCY TABLE Favor Neutral Oppose f row 10 10 30 50 Republican 15 15 10 40 f column 25 40 n = 90 Democrat 25
  • 22. Row frequency BIVARIATE FREQUENCY TABLE OR CONTINGENCY TABLE Favor Neutral Oppose f row 10 10 30 50 Republican 15 15 10 40 f column 25 40 n = 90 Democrat 25 22
  • 23. BIVARIATE FREQUENCY TABLE OR CONTINGENCY TABLE Favor Neutral Oppose f row 10 10 30 50 Republican 15 15 10 40 f column 25 40 n = 90 Democrat Column frequency 25
  • 24. DETERMINE THE HYPOTHESIS • Ho : There is no difference between D & R in their opinion on gun control issue. • Ha : There is an association between responses to the gun control survey and the party membership in the population.
  • 25. CALCULATING TEST STATISTICS Favor Neutral Oppose f row fo =10 fe =13.9 Republican fo =15 fe =11.1 fo =10 fe =13.9 fo =15 fe =11.1 fo =30 fe=22.2 fo =10 fe =17.8 50 f column 25 40 n = 90 Democrat 25 40
  • 26. CALCULATING TEST STATISTICS Favor Democrat Neutral Oppose f row fo =10 fe =13.9 Republican fo =15 fe =11.1 fo =10 fo =30 fe =13.9 fe=22.2 fo =15 fo =10 = 40* fe =17.8 fe =11.1 25/90 50 f column 25 n = 90 25 40 40
  • 27. CALCULATING TEST STATISTICS (10  13.89) 2 (10  13.89) 2 (30  22.2) 2      13.89 13.89 22.2 2 (15  11.11) 2 (15  11.11) 2 (10  17.8) 2   11.11 11.11 17.8 = 11.03
  • 28. DETERMINE DEGREES OF FREEDOM df = (R-1)(C-1) = (2-1)(3-1) = 2
  • 29. COMPARE COMPUTED TEST STATISTIC AGAINST TABLE VALUE α = 0.05  df = 2  Critical tabled value = 5.991  Test statistic, 11.03, exceeds critical value  Null hypothesis is rejected  Democrats & Republicans differ significantly in their opinions on gun control issues
  • 30. 2 TEST OF INDEPENDENCE THINKING CHALLENGE You’re a marketing research analyst. You ask a random sample of 286 consumers if they purchase Diet Pepsi or Diet Coke. At the 0.05 level of significance, is there evidence of a relationship? Diet Pepsi Diet Coke No Yes Total No 84 32 116 Yes 48 122 170 Total 132 154 286
  • 31. 2 TEST OF INDEPENDENCE SOLUTION*  Eij  5 in all cells 116·132 286 Diet Coke Diet Pepsi 154·132 286 No Yes Obs. Exp. Obs. Exp. Total No 84 53.5 32 62.5 116 Yes 48 78.5 122 91.5 170 Total 132 132 154 154 286 170·132 286 170·154 286
  • 32. 2 TEST OF INDEPENDENCE SOLUTION*  nij  Eij       Eij all cells 2 2  n11  E11    n12  E12   2 2 E11 E12 84  53.5  2 53.5  n22  E22    2 E22 32  62.5  2 62.5 122  91.5   2 91.5  54.29
  • 33.  H0: No Relationship  H1: Relationship  = 0.05  df = (2 - 1)(2 - 1) = 1  Critical Value(s):  Test Statistic: 2 = 54.29 Decision: Reject at sign. level 0 .05 Reject H0  = 0.05 0 3.841 2 Conclusion: There is evidence of a relationship
  • 34. 2 TEST OF INDEPENDENCE THINKING CHALLENGE 2 There is a statistically significant relationship between purchasing Diet Coke and Diet Pepsi. So what do you think the relationship is? Aren’t they competitors? Diet Coke No Yes Total Diet Pepsi No Yes 84 32 48 122 132 154 Total 116 170 286
  • 35. YOU RE-ANALYZE THE DATA High Income Diet Coke No Yes Total Diet Pepsi No Yes 4 30 40 2 44 32 Total 34 42 76 Diet Coke No Yes Total Diet Pepsi No Yes 80 2 8 120 88 122 Total 82 128 210 Low Income Data mining example: no need for statistics here!
  • 36. TRUE RELATIONSHIPS* Diet Coke Underlying causal relation Control or intervening variable (true cause) Apparent relation Diet Pepsi
  • 37. MORAL OF THE STORY Numbers don’t think - People do!
  • 38. CONCLUSION 1. Explained 2 Test for Proportions 2. Explained 2 Test of Independence