Chi Square Test
1. **Problem Statement:** We are performing a Chi-Square test to check if the observed frequencies of flower colors (Pink, White, Blue) fit the expected ratio 3:2:5 among 100 plants.
2. **Calculate Expected Frequencies:**
- Total parts of ratio = 3 + 2 + 5 = 10
- Total plants = 100
- Expected Pink = $\frac{3}{10} \times 100 = 30$
- Expected White = $\frac{2}{10} \times 100 = 20$
- Expected Blue = $\frac{5}{10} \times 100 = 50$
3. **Observed Frequencies:**
- Pink (O) = 24
- White (O) = 14
- Blue (O) = 62
4. **Calculate Chi-Square Statistic ($\chi^2$):**
$$\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i}$$
- Pink: $\frac{(24 - 30)^2}{30} = \frac{36}{30} = 1.2$
- White: $\frac{(14 - 20)^2}{20} = \frac{36}{20} = 1.8$
- Blue: $\frac{(62 - 50)^2}{50} = \frac{144}{50} = 2.88$
Sum:
$$\chi^2 = 1.2 + 1.8 + 2.88 = 5.88$$
5. **Degrees of Freedom ($df$):**
$$df = \text{number of categories} - 1 = 3 - 1 = 2$$
6. **Critical Value at 1% significance level ($\alpha=0.01$):**
From Chi-Square distribution table,
$$\chi^2_{critical, 0.01, 2} = 9.210$$
7. **Conclusion:**
- Calculated $\chi^2 = 5.88$
- Critical value $= 9.210$
Since $5.88 < 9.210$, we fail to reject the null hypothesis.
**Interpretation:** The observed frequencies do not significantly differ from the expected ratio at 1% significance level.
8. **Software Analysis:** Using Python's scipy library:
```python
import scipy.stats as stats
observed = [24, 14, 62]
expected = [30, 20, 50]
chi2, p = stats.chisquare(f_obs=observed, f_exp=expected)
print(f"Chi2 Statistic: {chi2}, p-value: {p}")
```
The p-value > 0.01 supports the conclusion that observed data fits expected ratio.