BUSINFO700 Chap.7 Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA
Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA
This chapter turns test selection into a routine you can run in seconds. It starts from the measurement level of each variable: two non-metric variables call for a chi-square test on their cross-table, a binary group with a metric outcome leads to a t-test, three or more groups with a metric outcome lead to ANOVA, and two metric variables lead to correlation.
You will compute expected counts and a chi-square statistic by hand, see when Fisher's exact test replaces chi-square, and read t-test output where the difference is too small to be significant.
The ANOVA page sets out the follow-up sequence whose R code appears in the Week 7 slides, from the overall F-test to a Levene test on the variances and then Tukey or Tamhane post-hoc comparisons, and shows why a pairwise result means nothing after a non-significant F. Three drills rehearse the selection and interpretation questions in the practice-test format.
The interpretation drills end with the four moves a strong answer makes: why this test, what the output says, what could bias it and which error remains possible.
What this chapter covers
- 01
Classifying variables as metric or non-metric
- 02
Cross-tables, expected counts and chi-square
- 03
Fisher's exact test for small samples
- 04
Two-group comparisons with the t-test
- 05
ANOVA, Levene and post-hoc tests
- 06
Writing the manager's verdict from output
Worked example · free
Follow the branch for each pair of variables in a repair dataset
- 2Classify: turnaround in days and age in years are metric; repair type is a non-metric variable with four categories; warranty is a binary non-metric variable.
- 2Question 1 pairs a four-category grouping variable with a metric outcome, so it takes the ANOVA branch: run the F-test, then a Levene test on the variances and a Tukey or Tamhane post-hoc test if F is significant.
- 2Question 2 pairs two metric variables, so it takes the correlation branch; warranty is not needed for either question.
Key terms
- Expected count
- The number of cases a cell of a cross-table would hold if the two variables were unrelated, computed from the row and column totals.
- Fisher's exact test
- An alternative to chi-square for cross-tables with small samples or expected counts below 5, computing the probability exactly.
- Independent samples t-test
- A comparison of a metric variable's mean between two separate groups, judged by the gap relative to its standard error.
- Levene test
- A check, run after ANOVA, of whether the groups share equal variances, which decides the post-hoc procedure.
- Post-hoc test
- A follow-up comparison of every pair of groups, such as Tukey or Tamhane's T2, used once ANOVA finds a difference.
Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA FAQ
When should I use Fisher's exact test instead of chi-square?
Use it when the sample is small or expected cell counts drop below 5, because the chi-square approximation then becomes unreliable. In R, check the expected table first; if several cells are under 5, run fisher.test on the same two variables and report its p-value instead.
Why not run several t-tests instead of one ANOVA?
Each extra t-test adds another chance of a false positive, so comparing three or more groups pairwise inflates the overall risk of a Type I error. ANOVA tests all group means together first, and post-hoc procedures then compare pairs in a controlled way.
How do I choose between Tukey and Tamhane after ANOVA?
Run a Levene test on the variances. If its p-value is 0.05 or higher, the groups can be treated as having equal variances and Tukey's procedure applies. If it is below 0.05, the variances differ, and Tamhane's T2 is the appropriate pairwise comparison.
Does a significant chi-square result prove one variable causes the other?
No. It shows only that the two variables are associated in the sample. A confounding factor, the order of events or the way the sample was drawn could explain the pattern, so a full answer names the association, its direction and at least one reason it may not be causal.
Why does R need factor() around the group variable in ANOVA?
If groups are stored as numbers such as 1, 2 and 3, R treats them as a continuous scale and fits the wrong model. Wrapping the variable in factor() tells R the values are categories, so aov compares one mean per group as intended.
Assessment move
Make a one-page selector in your own words that lists the four pairings of measurement levels and the analysis each one calls for, then cover it and rebuild it from memory until it takes under a minute. Practise classifying variables from short business descriptions, paying special attention to banded or coded numbers that are really ordinal.
For the chi-square test, compute expected counts and the statistic by hand for at least two small tables so the R output stops being a black box. For t-tests and ANOVA, write out the null and alternative hypotheses before reading any p-value, and practise the ANOVA sequence of F-test, Levene test and post-hoc comparison.
Finish every interpretation with four short moves: why this test, whether the result supports the manager's expectation, what could bias or confound it, and which error type remains possible. Time yourself: the practice test allows 5 minutes for three selection items, which leaves the rest of the time for interpretation.
Working through Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA in BUSINFO700? Sia is AskSia’s AI Statistics tutor — ask any BUSINFO700 Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA question and get a clear, step-by-step explanation grounded in how BUSINFO700 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.