| 
 
 
| Question 1189316:  A survey of children under 15 years of age residing in the inner-city area of a large city were
 classified according to ethnic group and hemoglobin level. The results were as follows:
 Hemoglobin status
 Ethnic group           >or equal to 10       9 - 9.9     < 9      Total
 A                       80                   100          20       200
 
 B                       99                   190          96       385
 C                       70                    30          10       110
 Total                   240                   320        160        695
 a. Do these data provide sufficient evidence to indicate, at 5% level of significance, that the
 two variables are related?
 b. What is the p-value for this test?
 
 Answer by math_tutor2020(3817)
      (Show Source): 
You can put this solution on YOUR website! We'll be doing a Chi-Square independence test
 
 For more info about that, check out this page
 https://www.mathsisfun.com/data/chi-square-test.html
 which has a fairly good explanation in my opinion.
 
 -----------------------------------
 
 To start things off, let's set up the two hypotheses.
 
 H0: The two variables ethnic group and hemoglobin level are independent
 H1: The two variables ethnic group and hemoglobin level are dependent (i.e. not independent)
 
 H0 and H1 refer to the null and alternative hypothesis respectively
 
 -----------------------------------
 
 Given data table
 
There were 2 typos in the original table. I adjusted the total 240 to 249 (since 80+99+70 = 249 along the first column) and also adjusted the 160 to 126 (because 20+96+10 = 126 along the third column). Both of these corrections are in the bottom row.|  | Hemoglobin Status |  |  | Ethnic group | >or equal to 10 | 9 - 9.9 | < 9 | Total |  | A | 80 | 100 | 20 | 200 |  | B | 99 | 190 | 96 | 385 |  | C | 70 | 30 | 10 | 110 |  | Total | 249 | 320 | 126 | 695 |  
 Ignoring the row and column totals, we have a 3x3 table. So we have r = 3 and c = 3, where r and c refer to the number of rows and columns respectively. The degrees of freedom (df) is df = (r-1)*(c-1) = (3-1)*(3-1) = 2*2 = 4.
 
 Again, the r and c values do not include the row and column totals. We'll use this df value when it comes to the Chi-Square table later on.
 
 -----------------------------------
 
 But for now, let's compute the Chi-Square value.
 
 We have 200 people in group A and 249 people with hemoglobin level of 10 or larger. This is out of 695 participants overall. So we expect roughly 200*249/695 = 71.655 people to be in this row and column. In other words, we will have this as the expected value in the upper left corner. For now, we won't round to the nearest whole number so we keep some form of precision. You'll follow these steps for the remaining cells of the table to get this table of expected values.
 
At this point the row and column totals are irrelevant, so we'll ignore them.|  | Hemoglobin Status |  |  | Ethnic group | >or equal to 10 | 9 - 9.9 | < 9 | Total |  | A | 71.655 | 92.086 | 36.259 | — |  | B | 137.935 | 177.266 | 69.799 | — |  | C | 39.41 | 50.647 | 19.942 | — |  | Total | — | — | — | — |  
 The next task is to compute the
  value. In other words, we follow these steps For the upper left corner we haveSubtract the observed and expected valuesSquare the previous resultDivide that previous result over the expected value
  and  to lead us to  approximately. 
 Do this for each of the 9 items in that table (ignore the row and colum totals).
 You should have this new table
 
Once again, we leave out the row and column totals.|  | Hemoglobin Status |  |  | Ethnic group | >or equal to 10 | 9 - 9.9 | < 9 | Total |  | A | 0.972 | 0.68 | 7.291 | — |  | B | 10.99 | 0.915 | 9.836 | — |  | C | 23.744 | 8.417 | 4.957 | — |  | Total | — | — | — | — |  
 With that new table of values in mind, we'll add up all of those values to get the chi-square value.
 I'll denote chi-square as X^2 (since the greek letter chi looks a lot like the letter X)
 
 X^2 = 0.972+0.68+7.291+10.99+0.915+9.836+23.744+8.417+4.957
 X^2 = 67.802
 
 The next step is to look at a chi-square table such as this one here
 https://www.mathsisfun.com/data/chi-square-table.html
 
 Look in the row that has df = 4, ie the fourth row. Then locate the X^2 value 67.802. Unfortunately, this value is not in this row. The closest we can get is 18.467 but even that isn't really that close at all. Notice the value 18.467 corresponds to a p-value of 0.001. What this tells us is that the p-value for X^2 = 67.802 is going to be much smaller than 0.001
 
 Unfortunately we cannot compute the p-value directly based on using a Chi-Square table. But the good news is that we really don't have to. The p-value being less than 0.001 means that it's certainly less than alpha = 0.05; which indicates we will reject the null hypothesis. Recall that the null was that the two variables are independent. Since we rejected this idea, we go for the hypothesis that the two variables ethnic group and hemoglobin level are linked somehow (i.e. dependent).
 
 Side note: In the links I posted, the website offers a chi-square calculator to do all of these calculations fairly quickly without any work done at all. I recommend checking it out; however, keep in mind that you won't be able to use such a calculator when it comes to exam time. So it's best to get practice in however much you can.
 
 | 
  
 | 
 |