Video summary
uji chi square
Main summary
Key takeaways
Summary
The video explains how to use the chi-square test to assess whether two categorical variables are associated or differ across groups. It demonstrates both a manual calculation and the procedure in SPSS.
What the chi-square test is for
- The test compares observed frequencies with the frequencies expected if there were no association between the variables.
- It is generally used with categorical data, especially nominal variables.
- The presenter describes it as an alternative to the independent-samples t-test for some comparisons, while emphasizing its use with categorical data.
- The same analysis may be framed as a test of a relationship or a difference, depending on how the research question is worded.
Formula and degrees of freedom
The chi-square statistic is calculated as:
[ \chi^2 = \sum \frac{(O-E)^2}{E} ]
where (O) is the observed frequency and (E) is the expected frequency.
For a contingency table, the degrees of freedom are:
[ (r-1)(c-1) ]
where (r) is the number of rows and (c) is the number of columns. The calculated statistic is compared with a chi-square table value using the selected significance level. The examples use (\alpha = 0.05). A p-value below (\alpha) also indicates a statistically significant result.
Manual example: Smoking and low birth weight (LBW)
The first example asks whether smoking is related to, or differs by, LBW status. The table contains:
- Non-smoking mothers: 86 children without LBW and 29 with LBW
- Smoking mothers: 44 children without LBW and 30 with LBW
The null hypothesis is that LBW status does not differ between the smoking groups; the alternative hypothesis is that it does.
The calculation proceeds as follows:
- Find each cell’s expected frequency using its row total × column total ÷ the overall total.
- Calculate ((O-E)^2/E) for every cell.
- Add those values to obtain the calculated chi-square statistic.
- For a 2 × 2 table, use 1 degree of freedom and compare the statistic with the table value at (\alpha = 0.05).
The video reports a calculated chi-square of 4.92, compared with a table value of 3.84. Since 4.92 is larger, the null hypothesis is rejected. The reported conclusion is that smoking and LBW status are significantly associated—or, when phrased as a comparison, that LBW status differs between mothers who smoke and those who do not.
Chi-square assumptions and alternatives
- Expected frequencies should not be below 1.
- For tables larger than 2 × 2, no more than 20% of cells should have expected frequencies below 5.
- If a larger table does not meet these conditions, the presenter suggests combining categories to increase expected frequencies.
- For a 2 × 2 table with an expected frequency below 5, the presenter recommends using Fisher’s exact test instead.
SPSS example: Smoking and fertility
The second example examines smoking behavior and fertility status among men. The presenter demonstrates these steps:
- In Variable View, create variables for smoking behavior and fertility status.
- Define numeric category codes and value labels—for example, non-smoker/smoker and fertile/infertile. Set decimals to zero and the measurement scale to nominal.
- Enter the coded data in Data View.
- Select Analyze → Descriptive Statistics → Crosstabs.
- Place smoking behavior and fertility status in the row and column fields.
- Select Statistics → Chi-square. The presenter also selects a risk estimate.
- Under Cells, request observed and expected counts, as well as row and column percentages.
- Check expected counts before interpreting the chi-square result. The example’s minimum expected count is reported as 22.5, so the chi-square test is considered suitable.
The example reports a chi-square statistic of 9.091 and a p-value of about 0.003. Because the p-value is below 0.05, the null hypothesis is rejected. The video concludes that fertility status differs between men who smoke and those who do not. It also reports a risk estimate of 3.5, interpreted in the video as smokers having 3.5 times the chance of infertility compared with non-smokers.
Speakers and sources
- Ervina Rahmawati — presenter and instructor in inferential statistics.
- SPSS — statistical software demonstrated in the lesson; not a speaker.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.