Project: Association Between Two Categorical Variables
Project — Chi-Square Test of Independence. Carry out the analysis in Jamovi (or R) and communicate the result. The graded skills are framing the association question, checking the expected-count condition, and interpreting the test in context.
The question
Few airplane debates are as heated as whether it’s acceptable to recline your seat. FiveThirtyEight ran a national survey on flying etiquette, asking travelers whether reclining is rude — and recording each respondent’s age.
Is a flyer’s opinion on reclining associated with their age?
The data
flying_etiquette.csv holds the survey responses (about 1,040 people; ~843 answered both questions here). You’ll use two categorical variables: recline_rude (No, Somewhat, Very — how rude is it to recline?) and age (18-29, 30-44, 45-60, > 60). Source: FiveThirtyEight, “Hey, You Should Stop Reclining Your Airplane Seat.”
Plan it first
Variables. Confirm both variables are categorical and give the size of the table (rows × columns).
Hypotheses. State \(H_0\) and \(H_A\) for a test of independence in words (opinion on reclining and age are independent vs. associated).
Eyeball it. Look at the row percentages (the opinion mix within each age group). Can you tell for sure whether opinion depends on age, or could the differences be chance? This is the judgment the test makes rigorous.
Procedure & condition. Two categorical variables, “are they associated?” → chi-square test of independence. It needs expected counts that aren’t too small (a common rule: each ≥ 5) — what will you check?
# Condition check: smallest expected count (rule of thumb: each >= 5)cat("Smallest expected count:", round(min(chisq.test(tab)$expected), 1), "\n")
Smallest expected count: 14.3
ggplot(fly, aes(age, fill = recline_rude)) +geom_bar(position ="fill") +labs(x ="Age group", y ="Proportion", fill ="Reclining is rude?") +theme_minimal(base_size =13)
Opinion on reclining by age group. Younger flyers are the most likely to call reclining rude — but is the difference real or noise?
Your deliverable
Submit a short report containing all of:
Graphic — a labeled stacked (or side-by-side) bar chart showing the opinion mix by age group.
Numerical result — the contingency table, the χ² statistic, the degrees of freedom, and the p-value.
Conditions — one sentence confirming the expected counts are large enough for the chi-square approximation.
Conclusion in context — 3–4 sentences: is there discernible evidence that opinion on reclining is associated with age? Describe the pattern (who finds it rudest?), note how the test settled what the percentages alone left uncertain, and stress that association is not causation.
One limitation — e.g., this is a single online survey; opinions may shift over time or differ by who chose to respond.