SlideShare a Scribd company logo
1 of 19
Test
for   Independence
Test of Independence
The goal is to find whether two observed
   characteristics of a member of a population
   are independent.
Contingency Table
-a table for determining whether the distribution
   according to one variable is contingent on the
   distribution of the other.
-is made up of R rows and C columns.
-is designated as R x C table
Suppose we pick a sample size n and classify
 the data in a two-way table on the basis of
 the two variables.

             Column1    Column 2   Column3


 Row 1         C11        C12        C13

 Row 2         C21        C22        C23
The degrees of freedom for any contingency
  table are
(no. of rows-1) x (no. of columns-1) or
 v= (R-1) (C-1)

If x2>xa2    with v=(r-1)(c-1) degrees of
  freedom, reject the null hypothesis of
  independence at the a level of
  significance; otherwise, accept the null
  hypothesis.
Computation of Expected
           Frequencies
1. Find the sum of each row and each
   column, and find the grand total.
2. For each cell, multiply the
   corresponding row sum by the column
   sum and divide by the grand total, to
   get the expected value.
3. Place the expected values in the
   corresponding cells along with the
   observed values.
The general formula for obtaining the expected
 frequency of any cell is given by:




Expected frequency=(column total)x (row total)
                             grand total
Example
A study is being conducted to determine whether
  there is a relationship between jogging and blood
  pressure. A random sample of 210 subjects is
  selected, and they are classified as shown in the
  table. Use α=0.05.
                          Blood Pressure

 Jogging status     Low     Moderate       High   total
 joggers             34         57         21     112

 non joggers         15         63         20      98

 total               49        120         41     210
Solution
Step 1
H0: The blood pressure of a person does not depend
  on whether he jogs or not.
Ha: The blood pressure of a person depends on
  whether he jogs or not.
Step 2
Determine the critical value.
  v= (R-1) (C-1)
    = (2-1) (3-1)
    = (1) (2)
v= 2
Using the table, the critical value is 5.991.
Step 3
Decision Rule: Reject H0 if χ2 > 5.991
Step 4
Compute the test statistic. First, compute for the
  expected values
E11=(112)(49) = 26.13 E22=(98) (120) = 56
       210                       210

E21=(98)(49)               E13=(112) (41)
                 = 22.87                  = 21.87
       210                        210

E12=(112)(120)             E23=(98) (41)
                  = 64                     = 19.13
       210                        210
The expected frequency for each cell is
 recorded in parentheses beside the
 actual observed value. Note that the
 expected frequencies in any row or
 column add up to the appropriate
 marginal total. In our example we may
 compute only the three expected
 frequencies in the top row of the table
 and then find the others by subtraction.
Tabulate the summary of the results

                              Blood Pressure

Jogging status      Low          Moderate      High      total

joggers          34 (26.13)     57 (64)     21 (21.87)   112

non joggers      15 (22.87)     63 (56)     20 (19.13)    98

total                49            120          41       210
The chi-square value is

   Χ2 = Σ (oi - ei)2
             i
                 ei

χ2= (34-26.13)2 + (15-22.87)2 + (57-64)2
      26.13      22.87         64
 + (63-56)2 + (21-21.87)2 + (20-19.13)2
      56         21.87           125.8

     =6.79
Step 5
Make the decision

Since 6.79 > 5.991, reject H0. Hence, the blood
  pressure of a person depends on whether he
  jogs or not.
A researcher wishes to see of the way people obtain information is
   independent of their educational background. A survey of 401
   high school and college graduates yielded the following
   information. At α=0.05, can one conclude that the way people
   obtain information is independent of their educational
   background?
1. H0 & Ha
2. Degrees of freedom and critical value

               Television     Newspapers        Other      Total
                                               sources

 High         159 (139.15)     90 (99.50)       51 (5.)     300
 School
 College         27 (4.)         43 (6.)     31( 20.65)     101

 Total               186          133             82         3.

7-9.compute for χ2
10. Decision
1.  H0: The way people obtain information is
    independent of their educational background.
    Ha: The way people obtain information is
    dependent of their educational background.
2. n=2, a=5.991             10. since χ2 > χa2,
3. 401                      reject H0
4. 46.85
5. 61.35
6. 33.50
7-9. χ2= 46.19
Voting Preferences
          Republican    Democrat    Independent    Row Total
 Male         200          150           50           400
Female        250          300           50           600
Column        450          450           100         1000
 total


Do the men's voting preferences differ significantly from the
  women's preferences? Use a 0.05 level of significance.

More Related Content

What's hot

Basic Concept Of Probability
Basic Concept Of ProbabilityBasic Concept Of Probability
Basic Concept Of Probability
guest45a926
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendency
Chie Pegollo
 

What's hot (20)

Mode of Grouped Data - Math 7 (4th Quarter)
Mode of Grouped Data - Math 7 (4th Quarter)Mode of Grouped Data - Math 7 (4th Quarter)
Mode of Grouped Data - Math 7 (4th Quarter)
 
Chapter9 the normal curve distribution
Chapter9 the normal curve distributionChapter9 the normal curve distribution
Chapter9 the normal curve distribution
 
Basic Concept Of Probability
Basic Concept Of ProbabilityBasic Concept Of Probability
Basic Concept Of Probability
 
Discrete and Continuous Random Variables
Discrete and Continuous Random VariablesDiscrete and Continuous Random Variables
Discrete and Continuous Random Variables
 
Measuresofcentraltendencygrpdata
MeasuresofcentraltendencygrpdataMeasuresofcentraltendencygrpdata
Measuresofcentraltendencygrpdata
 
Determining measures of central tendency for grouped data
Determining measures of central tendency for grouped dataDetermining measures of central tendency for grouped data
Determining measures of central tendency for grouped data
 
Two Way ANOVA
Two Way ANOVATwo Way ANOVA
Two Way ANOVA
 
Measures of Variability
Measures of VariabilityMeasures of Variability
Measures of Variability
 
Frequency distribution
Frequency distributionFrequency distribution
Frequency distribution
 
The Sign Test
The Sign TestThe Sign Test
The Sign Test
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendency
 
4 2 continuous probability distributionn
4 2 continuous probability    distributionn4 2 continuous probability    distributionn
4 2 continuous probability distributionn
 
6. point and interval estimation
6. point and interval estimation6. point and interval estimation
6. point and interval estimation
 
Contingency tables
Contingency tables  Contingency tables
Contingency tables
 
Normal distribution
Normal distributionNormal distribution
Normal distribution
 
Inferences about Two Proportions
 Inferences about Two Proportions Inferences about Two Proportions
Inferences about Two Proportions
 
Real Applications of Normal Distributions
Real Applications of Normal Distributions  Real Applications of Normal Distributions
Real Applications of Normal Distributions
 
Z test
Z testZ test
Z test
 
Normal and standard normal distribution
Normal and standard normal distributionNormal and standard normal distribution
Normal and standard normal distribution
 
Comparing means
Comparing meansComparing means
Comparing means
 

Similar to Test for independence

C2 st lecture 12 the chi squared-test handout
C2 st lecture 12   the chi squared-test handoutC2 st lecture 12   the chi squared-test handout
C2 st lecture 12 the chi squared-test handout
fatima d
 
METHOD OF DISPERSION to upload.pptx
METHOD OF DISPERSION to upload.pptxMETHOD OF DISPERSION to upload.pptx
METHOD OF DISPERSION to upload.pptx
SreeLatha98
 
Chi square test ( x2 )
Chi square test ( x2  )Chi square test ( x2  )
Chi square test ( x2 )
yogesh ingle
 
Solving Systems of Linear Inequalities
Solving Systems of Linear InequalitiesSolving Systems of Linear Inequalities
Solving Systems of Linear Inequalities
swartzje
 

Similar to Test for independence (20)

Chi square distribution and analysis of frequencies.pptx
Chi square distribution and analysis of frequencies.pptxChi square distribution and analysis of frequencies.pptx
Chi square distribution and analysis of frequencies.pptx
 
chi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistanchi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistan
 
Chapter12
Chapter12Chapter12
Chapter12
 
Statistical analysis by iswar
Statistical analysis by iswarStatistical analysis by iswar
Statistical analysis by iswar
 
C2 st lecture 12 the chi squared-test handout
C2 st lecture 12   the chi squared-test handoutC2 st lecture 12   the chi squared-test handout
C2 st lecture 12 the chi squared-test handout
 
Normal Distribution.pptx
Normal Distribution.pptxNormal Distribution.pptx
Normal Distribution.pptx
 
METHOD OF DISPERSION to upload.pptx
METHOD OF DISPERSION to upload.pptxMETHOD OF DISPERSION to upload.pptx
METHOD OF DISPERSION to upload.pptx
 
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
 
Non Parametric Statistics
Non Parametric StatisticsNon Parametric Statistics
Non Parametric Statistics
 
Lec. 10: Making Assumptions of Missing data
Lec. 10: Making Assumptions of Missing dataLec. 10: Making Assumptions of Missing data
Lec. 10: Making Assumptions of Missing data
 
Chi square test ( x2 )
Chi square test ( x2  )Chi square test ( x2  )
Chi square test ( x2 )
 
Central tendency
Central tendencyCentral tendency
Central tendency
 
exam1 unsolved
exam1 unsolvedexam1 unsolved
exam1 unsolved
 
Solving Systems of Linear Inequalities
Solving Systems of Linear InequalitiesSolving Systems of Linear Inequalities
Solving Systems of Linear Inequalities
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Practice test1 solution
Practice test1 solutionPractice test1 solution
Practice test1 solution
 
Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
 
Ch01_03.ppt
Ch01_03.pptCh01_03.ppt
Ch01_03.ppt
 
Anova by Hazilah Mohd Amin
Anova by Hazilah Mohd AminAnova by Hazilah Mohd Amin
Anova by Hazilah Mohd Amin
 
Contingency Tables
Contingency TablesContingency Tables
Contingency Tables
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 

Test for independence

  • 1. Test for Independence
  • 2. Test of Independence The goal is to find whether two observed characteristics of a member of a population are independent. Contingency Table -a table for determining whether the distribution according to one variable is contingent on the distribution of the other. -is made up of R rows and C columns. -is designated as R x C table
  • 3. Suppose we pick a sample size n and classify the data in a two-way table on the basis of the two variables. Column1 Column 2 Column3 Row 1 C11 C12 C13 Row 2 C21 C22 C23
  • 4.
  • 5. The degrees of freedom for any contingency table are (no. of rows-1) x (no. of columns-1) or v= (R-1) (C-1) If x2>xa2 with v=(r-1)(c-1) degrees of freedom, reject the null hypothesis of independence at the a level of significance; otherwise, accept the null hypothesis.
  • 6. Computation of Expected Frequencies 1. Find the sum of each row and each column, and find the grand total. 2. For each cell, multiply the corresponding row sum by the column sum and divide by the grand total, to get the expected value. 3. Place the expected values in the corresponding cells along with the observed values.
  • 7. The general formula for obtaining the expected frequency of any cell is given by: Expected frequency=(column total)x (row total) grand total
  • 8. Example A study is being conducted to determine whether there is a relationship between jogging and blood pressure. A random sample of 210 subjects is selected, and they are classified as shown in the table. Use α=0.05. Blood Pressure Jogging status Low Moderate High total joggers 34 57 21 112 non joggers 15 63 20 98 total 49 120 41 210
  • 9. Solution Step 1 H0: The blood pressure of a person does not depend on whether he jogs or not. Ha: The blood pressure of a person depends on whether he jogs or not. Step 2 Determine the critical value. v= (R-1) (C-1) = (2-1) (3-1) = (1) (2) v= 2 Using the table, the critical value is 5.991.
  • 10. Step 3 Decision Rule: Reject H0 if χ2 > 5.991
  • 11. Step 4 Compute the test statistic. First, compute for the expected values E11=(112)(49) = 26.13 E22=(98) (120) = 56 210 210 E21=(98)(49) E13=(112) (41) = 22.87 = 21.87 210 210 E12=(112)(120) E23=(98) (41) = 64 = 19.13 210 210
  • 12. The expected frequency for each cell is recorded in parentheses beside the actual observed value. Note that the expected frequencies in any row or column add up to the appropriate marginal total. In our example we may compute only the three expected frequencies in the top row of the table and then find the others by subtraction.
  • 13. Tabulate the summary of the results Blood Pressure Jogging status Low Moderate High total joggers 34 (26.13) 57 (64) 21 (21.87) 112 non joggers 15 (22.87) 63 (56) 20 (19.13) 98 total 49 120 41 210
  • 14. The chi-square value is Χ2 = Σ (oi - ei)2 i ei χ2= (34-26.13)2 + (15-22.87)2 + (57-64)2 26.13 22.87 64 + (63-56)2 + (21-21.87)2 + (20-19.13)2 56 21.87 125.8 =6.79
  • 15. Step 5 Make the decision Since 6.79 > 5.991, reject H0. Hence, the blood pressure of a person depends on whether he jogs or not.
  • 16.
  • 17. A researcher wishes to see of the way people obtain information is independent of their educational background. A survey of 401 high school and college graduates yielded the following information. At α=0.05, can one conclude that the way people obtain information is independent of their educational background? 1. H0 & Ha 2. Degrees of freedom and critical value Television Newspapers Other Total sources High 159 (139.15) 90 (99.50) 51 (5.) 300 School College 27 (4.) 43 (6.) 31( 20.65) 101 Total 186 133 82 3. 7-9.compute for χ2 10. Decision
  • 18. 1. H0: The way people obtain information is independent of their educational background. Ha: The way people obtain information is dependent of their educational background. 2. n=2, a=5.991 10. since χ2 > χa2, 3. 401 reject H0 4. 46.85 5. 61.35 6. 33.50 7-9. χ2= 46.19
  • 19. Voting Preferences Republican Democrat Independent Row Total Male 200 150 50 400 Female 250 300 50 600 Column 450 450 100 1000 total Do the men's voting preferences differ significantly from the women's preferences? Use a 0.05 level of significance.