🛍️ Gender and product preference
Research question: Is product preference associated with gender? Answer: A chi-square test of independence showed a significant association between gender and preferred product, χ²(2, N = 240) = 6.45, p = .040, Cramér's V = .16.
Open this example in StatLab Dataset and codebook (CSV, Excel, .sav)
What is the situation?
A fictional gadget store asked 240 shoppers which of three products they would buy next. The data are synthetic — produced by a seeded random process for teaching; they describe no real people or organisations.
What is in the dataset?
240 cases.
| Variable | Label | Measure | Value labels |
|---|---|---|---|
id | Shopper ID | scale | |
gender | Gender | nominal | 1 = Male, 2 = Female |
product | Preferred product | nominal | 1 = Smartwatch, 2 = Wireless earbuds, 3 = Tablet |
How is it analysed, step by step?
- Crosstabs — Cross-tabulate, test the association and see which cells drive it (adjusted residuals). (guide)
Male: Smartwatch 39.2%, Wireless earbuds 31.7%, Tablet 29.2%
Female: Smartwatch 28.3%, Wireless earbuds 47.5%, Tablet 24.2%
Pearson χ²(2, N = 240) = 6.45, p = .040; Cramér's V = .16; cells with expected count < 5: 0.
How would I write it up (APA style)?
A chi-square test of independence showed a significant association between gender and preferred product, χ²(2, N = 240) = 6.45, p = .040, Cramér's V = .16.
Every number on this page was computed by StatLab's statistics engine from this dataset when the page was built, and the same analyses are part of the reference validation against scipy/statsmodels (433 reference test cases, 36,554 values checked against scipy/statsmodels/numpy, 0 failures). “Open this example” loads the data and runs these steps live in your browser.