Hypothesis Testing Using Contingency Tables

calculator steps n.w
1 / 48
Embed
Share

Learn how to conduct hypothesis testing using contingency tables to determine relationships between variables and test for independence. Explore the chi-square goodness-of-fit test and understand how expected frequencies are computed in contingency tables.

  • Hypothesis Testing
  • Contingency Tables
  • Chi-Square Test
  • Independence
  • Relationships

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Calculator steps: The calculator steps for this section can be found on YouTube or by clicking: Click here 1 Bluman, Chapter 11

  2. While you wait: Copy the table below. Allow room for data to be added in each cell. Fill in the last row and column. Four-Year Degree 12 Advanced Degree 8 Location No College 15 Total Urban 8 15 9 Suburban 6 8 7 Rural ` Total 2 Bluman, Chapter 11

  3. Tests Using Contingency Tables Sec: 11.2 3 Bluman, Chapter 11

  4. 11.2 Tests Using Contingency Tables When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested by using the chi-square test. The test of independence of variables is used to determine whether two variables are independent of or related to each other when a single sample is selected. The test of homogeneity of proportions is used to determine whether the proportions for a variable are equal when several samples are selected from different populations. 4 Bluman, Chapter 11

  5. Test for Independence The chi-square goodness-of-fit test can be used to test the independence of two variables. The hypotheses are: H0: There is no relationship between two variables. H1: There is a relationship between two variables. If the null hypothesis is rejected, there is some relationship between the variables. 5 Bluman, Chapter 11

  6. Test for Independence In order to test the null hypothesis, one must compute the expected frequencies, assuming the null hypothesis is true. When data are arranged in table form for the independence test, the table is called a contingency table. 6 Bluman, Chapter 11

  7. Contingency Tables Cell Row by column The dimension of the contingency table is given: ROW by COLUMN 7 Bluman, Chapter 11

  8. Contingency Tables The degrees of freedom for any contingency table are d.f. = (rows 1) (columns 1) = (R 1)(C 1). The table above is 2 by 3. Only count the numerical cells. 8 Bluman, Chapter 11

  9. Test for Independence The formula for the test for independence: ( ) 2 E O E = 2 where d.f. = (R 1)(C 1) O = observed frequency E = expected frequency = ( )( ) row sum column sum grand total 9 Bluman, Chapter 11

  10. Example (see page 618): College Education and Place of Residence A sociologist wishes to see whether the number of years of college a person has completed is related to her or his place of residence. A sample of 88 people is selected and classified as shown. At = 0.05, can the sociologist conclude that a person s location is dependent on the number of years of college? No Four-Year Degree 12 15 8 35 Advanced Degree 8 9 7 24 Location Urban Suburban Rural Total College 15 8 6 29 Total 35 32 21 88 10 Bluman, Chapter 11

  11. Example 11-5: College Education and Place of Residence Step 1: State the hypotheses and identify the claim. H0: A person s place of residence is independent of the number of years of college completed. H1:A person s place of residence is dependent on the number of years of college completed (claim). Step 2: Find the critical value. The critical value is 9.488, since the degrees of freedom are (3 1)(3 1) = 4. 11 Bluman, Chapter 11

  12. See next two slides for calculator use. Compute the expected values. ( )( row sum grand total ( )( 88 ) ) 35 29 column sum = = = 11.53 E E 1,1 No Four-Year Degree 12 (13.92) Advanced Degree 8 (9.55) Location College 15 (11.53) Total Urban 35 8 15 9 Suburban 32 (10.55) (12.73) (8.73) 6 8 7 Rural 21 (5.73) (6.92) (8.35) 29 35 24 88 Total 12 Bluman, Chapter 11

  13. [A] Enter Observed values as Matrix 1: 2nd x-1 [B] Enter Expected values as Matrix 13 Bluman, Chapter 11

  14. Test statistics : 2=3.006 14 Bluman, Chapter 11

  15. College Education and Place of Residence Step 3: Compute the test value. ( 2 = ) 2 E O E ( ) ( ) ( ) 2 2 2 15 11.53 11.53 8 10.55 10.55 6 6.92 6.92 12 13.92 13.92 15 12.73 12.73 8 8.35 8.35 8 9.55 9.55 9 8.73 8.73 7 5.73 5.73 = + + ( ) ( ) ( ) 2 2 2 + + + ( ) ( ) ( ) 2 2 2 + + + = 3.01 15 Bluman, Chapter 11

  16. College Education and Place of Residence Step 4: Make the decision. Do not reject the null hypothesis, since 3.01<9.488. Step 5: Summarize the results. There is not enough evidence to support the claim that a person s place of residence is dependent on the number of years of college completed. 16 Bluman, Chapter 11

  17. Chapter 11 Other Chi-Square Tests Section 11-2 Example 11-6 Page # 610 17 Bluman, Chapter 11

  18. Example 11-6: Alcohol and Gender A researcher wishes to determine whether there is a relationship between the gender of an individual and the amount of alcohol consumed. A sample of 68 people is selected, and the following data are obtained. At = 0.10, can the researcher conclude that alcohol consumption is related to gender? Alcohol Consumption Low Moderate 10 13 23 Gender Male Female Total High Total 27 41 68 9 8 16 25 12 20 18 Bluman, Chapter 11

  19. Example 11-6: Alcohol and Gender Step 1: State the hypotheses and identify the claim. H0: The amount of alcohol that a person consumes is independent of the individual s gender. H1:The amount of alcohol that a person consumes is dependent on the individual s gender (claim). Step 2: Find the critical value. The critical value is 4.605, since the degrees of freedom are (2 1 )(3 1) = (1)(2) = 2. 19 Bluman, Chapter 11

  20. Example 11-6: Alcohol and Gender Compute the expected values. ( )( row sum grand total ( )( 68 ) ) 27 23 column sum = = = 9.13 E E 1,1 Alcohol Consumption Low Moderate 10 (9.13) (9.93) Gender High Total 9 8 Male 27 (7.94) 13 16 12 Female 41 (13.87) (15.07) (12.06) 23 25 20 68 Total 20 Bluman, Chapter 11

  21. Example 11-6: Alcohol and Gender Step 3: Compute the test value. ( 2 = ) 2 E O E ( ) ( ) ( ) 2 2 2 10 9.13 9.13 13 13.87 13.87 9 9.93 9.93 16 15.07 15.07 8 7.94 7.94 = + + ( ) ( ) ( ) 2 2 2 12 12.06 12.06 + + + 2= 0.281 21 Bluman, Chapter 11

  22. Example 11-6: Alcohol and Gender Step 4: Make the decision. Do not reject the null hypothesis, since 0.281 < 4.605. . Step 5: Summarize the results. There is not enough evidence to support the claim that the amount of alcohol a person consumes is dependent on the individual s gender. 22 Bluman, Chapter 11

  23. Please record the table below in your notes. Allow for additional col and row Household income Less than $30,000 ( 24%) $30,000- $74,999 (33%) $75,000- $99,999 (38%) $100,000 or more (49%) YES 24 33 38 49 23 Bluman, Chapter 11

  24. Please record the table below in your notes. Allow for additional col and row Viewing Preferences Sesame Street The Simpsons 30 80 Lone Ranger 50 50 Boys Girls 20 70 24 Bluman, Chapter 11

  25. Test for Homogeneity of Proportions Homogeneity of proportions test is used when samples are selected from several different populations and the researcher is interested in determining whether the proportions of elements that have a common characteristic are the same for each population. 25 Bluman, Chapter 11

  26. Test for Homogeneity of Proportions The hypotheses are: H0: p1 = p2 = p3= = pn H1: At least one proportion is different from the others. When the null hypothesis is rejected, it can be assumed that the proportions are not all equal. 26 Bluman, Chapter 11

  27. Assumptions for Homogeneity of Proportions 1. The data are obtained from a random sample. 2. The expected frequency for each category must be 5 or more. 27 Bluman, Chapter 11

  28. Chapter 11 Other Chi-Square Tests Section 11-2 Example 11-7 Page #611 28 Bluman, Chapter 11

  29. Money and Happiness A psychologist selected 100 people from each of 4 income groups and asked them if they were VERY HAPPY . The percent of each group who said yes are shown. At =0.05 test the claim that there is no difference in proportions. Household income Less than $30,000 ( 24%) $30,000- $74,999 (33%) $75,000- $99,999 (38%) $100,000 or more (49%) YES 24 33 38 49 29 Bluman, Chapter 11

  30. Complete the table: Total Household income Less than $30,000 ( 24%) $30,000- $74,999 (33%) $75,000- $99,999 (38%) $100,000 or more (49%) YES NO Total 24 33 38 49 Total Household income Less than $30,000 ( 24%) $30,000- $74,999 (33%) $75,000- $99,999 (38%) $100,000 or more (49%) YES NO Total 24 76 100 33 67 100 38 62 100 49 51 100 144 256 400 30 Bluman, Chapter 11

  31. Example 11-7: Money and Happiness Step 1: State the hypotheses. H0: p1 = p2 = p3 = p4 H1:At least one proportion differs from the other. Step 2: Find the critical value. The critical value is 7.815, since the degrees of freedom are (2 1 )(4 1) = 3. 31 Bluman, Chapter 11

  32. Example 11-7: Money and Happiness Step 4: Make the decision. Reject the null hypothesis, since 14.149 > 7.815 . Step 5: Summarize the results. There is enough evidence to reject the claim that there is a difference proportions. Hence it seems that there is a difference in the proportions of the income. 32 Bluman, Chapter 11

  33. Example 11-7: Lost Luggage A researcher selected 100 passengers from each of 3 airlines and asked them if the airline had lost their luggage on their last flight. The data are shown in the table. At = 0.05, test the claim that the proportion of passengers from each airline who lost luggage on the flight is the same for each airline. Airline 1 10 90 100 Airline 2 Airline 3 Total 21 279 300 7 4 Yes No Total 93 100 96 100 33 Bluman, Chapter 11

  34. Example 11-7: Lost Luggage Step 1: State the hypotheses. H0: p1 = p2 = p3 H1:At least one proportion differs from the other. Step 2: Find the critical value. The critical value is 5.991, since the degrees of freedom are (2 1 )(3 1) = (1)(2) = 2. 34 Bluman, Chapter 11

  35. Example 11-7: Lost Luggage Compute the expected values. ( )( row sum grand total ( )( 300 ) ) 21 100 column sum = = = 7 E E 1,1 Airline 1 10 (7) Airline 2 Airline 3 Total 7 4 Yes 21 (7) (7) 90 (93) 93 (93) 96 (93) No 279 100 100 100 300 Total 35 Bluman, Chapter 11

  36. Example 11-7: Luggage Step 3: Compute the test value. ( 2 = ) 2 E O E ( ) ( ) ( ) 2 2 2 10 7 7 7 4 7 7 = + + 7 7 ( ) ( ) ( ) 2 2 2 90 93 93 93 93 93 96 93 93 + + + = 2.765 36 Bluman, Chapter 11

  37. Example 11-7: Lost Luggage Step 4: Make the decision. Do not reject the null hypothesis, since 2.765 < 5.991. . Step 5: Summarize the results. There is not enough evidence to reject the claim that the proportions are equal. Hence it seems that there is no difference in the proportions of the luggage lost by each airline. 37 Bluman, Chapter 11

  38. In a study of the television viewing habits of children, a developmental psychologist selects a random sample of 300 first graders: 100 boys and 200 girls. Each child is asked which of the following TV programs they like best: The Lone Ranger, Sesame Street, or The Simpsons. Results are shown in the contingency table to follow. 38 Bluman, Chapter 11

  39. Viewing Preferences Sesame Street The Simpsons 30 80 Lone Ranger 50 50 Boys Girls 20 70 Do the boys' preferences for these TV programs differ significantly from the girls' preferences? Use a 0.05 level of significance. 39 Bluman, Chapter 11

  40. Null hypothesis: The null hypothesis states that the proportion of boys who prefer the Lone Ranger is identical to the proportion of girls. Similarly, for the other programs. Step 1: H0: Pboys who prefer Lone Ranger= Pgirls who prefer Lone Ranger H0: Pboys who prefer Sesame Street= Pgirls who prefer Sesame Street H0: Pboys who prefer The Simpsons= Pgirls who prefer The Simpsons Alternative hypothesis: At least one of the null hypothesis statements is false. 40 Bluman, Chapter 11

  41. Calculations: Determine the expected values: Viewing Preferences Sesame Street The Simpsons 30 80 110 Row total Lone Ranger 50 50 100 Boys Girls Column total 20 70 90 100 200 300 41 Bluman, Chapter 11

  42. On your own Read section 11.2 and all its examples. Sec 11.2 page 614 #1-7 all; And #9, 17, 23, 27, 31 42 Bluman, Chapter 11

  43. Example Suppose a new postoperative procedure is administered to a number of patients in a large hospital. Do the doctors feel differently about this procedure from the nurses, or do they feel basically the same? The question is not whether the doctors prefer the procedure but whether there is a difference of opinion between doctors and nurses.

  44. Hypothesis: H0: the opinion about the procedure is independent of the profession. H1: the opinion about the procedure is dependent of the profession.

  45. Consider the result listed below: Group Prefers Prefers old No pref new 100 nurses 80 20 doctors 50 120 30

  46. Chapter 11 Other Chi-Square Tests Section 11-2 Example 11-5 Page #606 46 Bluman, Chapter 11

  47. Hospitals and Infections 47 Bluman, Chapter 11

  48. Chapter 11 Other Chi-Square Tests Section 11-2 618 Page #606 48 Bluman, Chapter 11

More Related Content