Solveeit Logo

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{{\chi }^{2}} statistics.

| Pink| Blue| Orange
---|---|---|---
Boys| 27| 63| 10
Girls| 41| 45| 14

Explanation

Solution

We solve this problem by using the direct formula for χ2{{\chi }^{2}} which is given as
χ2=(OE)2E{{\chi }^{2}}=\sum{\dfrac{{{\left( O-E \right)}^{2}}}{E}}
Where, O'O' is the observed frequency and E'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=(a+b+c)(a+d)N{{E}_{11}}=\dfrac{\left( a+b+c \right)\left( a+d \right)}{N}
By using this formula we calculate the χ2{{\chi }^{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=(a+b+c)(a+d)N{{E}_{11}}=\dfrac{\left( a+b+c \right)\left( a+d \right)}{N}
Let us take the first observed value that is ‘27’ then we get the expected value as
E11=100×68200=34\Rightarrow {{E}_{11}}=\dfrac{100\times 68}{200}=34
Now let us take the second observed value from first row then we get the expected value as
E12=100×108200=54\Rightarrow {{E}_{12}}=\dfrac{100\times 108}{200}=54
Similarly, for the third observed value in first row we get the expected value as
E13=100×24200=12\Rightarrow {{E}_{13}}=\dfrac{100\times 24}{200}=12
Now, similarly let us calculate the expected values for the observed values in second row then we get
E21=100×68200=34\Rightarrow {{E}_{21}}=\dfrac{100\times 68}{200}=34
E22=100×108200=54\Rightarrow {{E}_{22}}=\dfrac{100\times 108}{200}=54
E23=100×24200=12\Rightarrow {{E}_{23}}=\dfrac{100\times 24}{200}=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{{\chi }^{2}} which is given as
χ2=(OE)2E{{\chi }^{2}}=\sum{\dfrac{{{\left( O-E \right)}^{2}}}{E}}
By substituting all the required observed and corresponding expected values we get

& \Rightarrow {{\chi }^{2}}=\dfrac{{{\left( 27-34 \right)}^{2}}}{34}+\dfrac{{{\left( 63-54 \right)}^{2}}}{54}+\dfrac{{{\left( 10-12 \right)}^{2}}}{12}+\dfrac{{{\left( 41-34 \right)}^{2}}}{34}+\dfrac{{{\left( 45-54 \right)}^{2}}}{54}+\dfrac{{{\left( 14-12 \right)}^{2}}}{12} \\\ & \Rightarrow {{\chi }^{2}}=\dfrac{49}{34}+\dfrac{81}{54}+\dfrac{4}{12}+\dfrac{49}{34}+\dfrac{81}{54}+\dfrac{4}{12} \\\ \end{aligned}$$ Now, by regrouping the terms with same denominator we get $$\begin{aligned} & \Rightarrow {{\chi }^{2}}=\left( \dfrac{49}{34}+\dfrac{49}{34} \right)+\left( \dfrac{81}{54}+\dfrac{81}{54} \right)+\left( \dfrac{4}{12}+\dfrac{4}{12} \right) \\\ & \Rightarrow {{\chi }^{2}}=\dfrac{49}{17}+3+\dfrac{2}{3} \\\ \end{aligned}$$ By taking the LCM and adding the fractions then we get $$\begin{aligned} & \Rightarrow {{\chi }^{2}}=\dfrac{147+153+34}{51} \\\ & \Rightarrow {{\chi }^{2}}=\dfrac{334}{51}=6.56 \\\ \end{aligned}$$ Therefore the value of chi square $${{\chi }^{2}}$$ for given data is 6.56. **Note:** Here, for the easy calculations we can create a table such that we can reduce the calculations for the time being. Let us create a table containing the observed values and corresponding expected values that are shown below. Observed value (O)| Expected values (E) | $$\left| O-E \right|$$| $${{\left( O-E \right)}^{2}}$$| $$\dfrac{{{\left( O-E \right)}^{2}}}{E}$$ ---|---|---|---|--- 27| 34| 7| 49| 1.44 63| 54| 9| 81| 1.5 10| 12| 2| 4| 0.34 41| 34| 7| 49| 1.44 45| 54| 9| 81| 1.5 14| 12| 2| 4| 0.34 Now the value of chi square $${{\chi }^{2}}$$ is given by adding all the values on last column that is $$\begin{aligned} & \Rightarrow {{\chi }^{2}}=1.44+1.5+0.34+1.44+1.5+0.34 \\\ & \Rightarrow {{\chi }^{2}}=6.56 \\\ \end{aligned}$$ Therefore the value of chi square $${{\chi }^{2}}$$ for given data is 6.56.