Chi Square Opinions 81Ea71
1. **Stating the problem:**
We want to test if there is a significant difference in consumer opinions on three aspects (Harga, Kebersihan, Cita Rasa) of a restaurant based on the survey data.
2. **Hypothesis:**
- Null hypothesis $H_0$: There is no difference in opinions across the three aspects.
- Alternative hypothesis $H_a$: There is a difference in opinions.
3. **Test used:**
We use the Chi-square test for independence because we have categorical data in a contingency table.
4. **Observed frequencies ($O$):**
| Aspect | Baik | Cukup | Kurang |
|-------------|-------|-------|--------|
| Harga | 20 | 15 | 2 |
| Kebersihan | 17 | 18 | 2 |
| Cita Rasa | 15 | 14 | 3 |
5. **Calculate row totals, column totals, and grand total:**
- Row totals: Harga = $20+15+2=37$, Kebersihan = $17+18+2=37$, Cita Rasa = $15+14+3=32$
- Column totals: Baik = $20+17+15=52$, Cukup = $15+18+14=47$, Kurang = $2+2+3=7$
- Grand total = $37+37+32=106$
6. **Calculate expected frequencies ($E$) using:**
$$E = \frac{(\text{row total})(\text{column total})}{\text{grand total}}$$
For example, for Harga-Baik:
$$E = \frac{37 \times 52}{106} \approx 18.15$$
Calculate all expected values:
- Harga: Baik $18.15$, Cukup $16.42$, Kurang $2.44$
- Kebersihan: Baik $18.15$, Cukup $16.42$, Kurang $2.44$
- Cita Rasa: Baik $15.70$, Cukup $14.15$, Kurang $2.11$
7. **Calculate Chi-square statistic:**
$$\chi^2 = \sum \frac{(O - E)^2}{E}$$
Calculate each cell contribution and sum:
- Harga-Baik: $\frac{(20-18.15)^2}{18.15} = 0.19$
- Harga-Cukup: $\frac{(15-16.42)^2}{16.42} = 0.12$
- Harga-Kurang: $\frac{(2-2.44)^2}{2.44} = 0.08$
- Kebersihan-Baik: $\frac{(17-18.15)^2}{18.15} = 0.07$
- Kebersihan-Cukup: $\frac{(18-16.42)^2}{16.42} = 0.15$
- Kebersihan-Kurang: $\frac{(2-2.44)^2}{2.44} = 0.08$
- Cita Rasa-Baik: $\frac{(15-15.70)^2}{15.70} = 0.03$
- Cita Rasa-Cukup: $\frac{(14-14.15)^2}{14.15} = 0.002$
- Cita Rasa-Kurang: $\frac{(3-2.11)^2}{2.11} = 0.37$
Sum: $\chi^2 = 0.19+0.12+0.08+0.07+0.15+0.08+0.03+0.002+0.37 = 1.10$
8. **Degrees of freedom:**
$$df = (\text{rows} - 1)(\text{columns} - 1) = (3-1)(3-1) = 4$$
9. **Critical value at 95% confidence:**
From Chi-square table, $\chi^2_{0.05,4} = 9.488$
10. **Decision:**
Since $1.10 < 9.488$, we fail to reject $H_0$.
**Conclusion:** There is no significant difference in consumer opinions on the three aspects at 95% confidence.
---
"slug": "chi-square-opinions",
"subject": "statistics",
"desmos": {"latex": "", "features": {"intercepts": false, "extrema": false}},
"q_count": 2