Question
Question: A sample of boys and girls were asked to choose one color from the three options – pink, blue, and o...
A sample of boys and girls were asked to choose one color from the three options – pink, blue, and orange to paint their room with the following results. Calculate χ2 statistics.
| Pink| Blue| Orange
---|---|---|---
Boys| 27| 63| 10
Girls| 41| 45| 14
Solution
We solve this problem by using the direct formula for χ2 which is given as
χ2=∑E(O−E)2
Where, ′O′ is the observed frequency and ′E′ is the frequency of expected value of corresponding observed value which is calculated by using the row total times the column total times divided by grand total. That is for a given data as follows
| Category I| Category II| Category III| Rows total
---|---|---|---|---
Sample A| a| b| c| a+ b+ c
Sample B| d| e| f| d+ e+ f
Column total| a+ d| b+ e| c+ f| N=a+ b+ c+ d+ e+ f
Here, for the observed value ‘a’ the expected value is given as
E11=N(a+b+c)(a+d)
By using this formula we calculate the χ2 for the given data.
Complete step-by-step solution:
Let us assume the given data and add one row and column by adding the rows and columns then we get
| Pink| Blue| Orange| Rows total
---|---|---|---|---
Boys| 27| 63| 10| 100
Girls| 41| 45| 14| 100
Column total| 68| 108| 24| 200 = N
Now let us calculate the expected values for all the observed values.
We know that the expected value is calculated by using the row total times the column total times divided by grand total. That is for a given data as follows
| Category I| Category II| Category III| Rows total
---|---|---|---|---
Sample A| a| b| c| a+ b+ c
Sample B| d| e| f| d+ e+ f
Column total| a+ d| b+ e| c+ f| N=a+ b+ c+ d+ e+ f
Here, for the observed value ‘a’ the expected value is given as
E11=N(a+b+c)(a+d)
Let us take the first observed value that is ‘27’ then we get the expected value as
⇒E11=200100×68=34
Now let us take the second observed value from first row then we get the expected value as
⇒E12=200100×108=54
Similarly, for the third observed value in first row we get the expected value as
⇒E13=200100×24=12
Now, similarly let us calculate the expected values for the observed values in second row then we get
⇒E21=200100×68=34
⇒E22=200100×108=54
⇒E23=200100×24=12
Now, we can see that we have got all the expected values for the corresponding observed values.
We know that the formula for χ2 which is given as
χ2=∑E(O−E)2
By substituting all the required observed and corresponding expected values we get