Analysis of Categorical Data and Contingency Tables

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/25

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering key terms from the lecture notes on categorical data analysis, contingency tables, chi-square tests, Fisher’s exact test, and odds ratios.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

Categorical Variable

A variable that takes on categories (e.g., eye color).

2
New cards

Numerical Variable

A variable that takes numeric values (e.g., height, age).

3
New cards

Ordinal

Categorical with a meaningful order (e.g., first, second, third).

4
New cards

Nominal

Categorical without an inherent order.

5
New cards

Contingency Table

A table showing frequencies for two categorical variables to assess association.

6
New cards

Observed Frequencies

Frequencies that are actually observed in the data for each cell.

7
New cards

Expected Frequencies

Frequencies expected under the null hypothesis, calculated from margins.

8
New cards

Null Hypothesis (H0) in Contingency Table

There is no association between the variables; they are independent.

9
New cards

Alternative Hypothesis (Ha)

There is an association between the variables.

10
New cards

Pearson Chi-Square Test

Tests for an association between two categorical variables by comparing observed and expected frequencies.

11
New cards

Chi-Square Statistic

Sum over all cells of (O − E)² / E, where O is observed and E is expected.

12
New cards

Degrees of Freedom (df)

For an r × c table, df = (r − 1) × (c − 1).

13
New cards

Yates' Continuity Correction

Adjustment to the chi-square for 2×2 tables in small samples, subtracting 0.5 from |O − E|.

14
New cards

Fisher’s Exact Test

An exact test for count data; preferred when expected counts are < 5; more conservative than chi-square.

15
New cards

Odds Ratio (OR)

A measure of effect size for binary variables; OR = (ad)/(bc) for a 2×2 table.

16
New cards

Interpreting OR > 1 or OR < 1

OR > 1 indicates higher odds of the outcome with the first condition; OR < 1 indicates lower odds.

17
New cards

Independence in Contingency Table

Null hypothesis that row and column variables are independent (no association).

18
New cards

Standardized Residuals

Residuals divided by their standard deviation; help identify cells contributing to the chi-square.

19
New cards

Observed vs Expected in R Output

O = observed frequencies; E = expected frequencies; used to compute chi-square and residuals.

20
New cards

CrossTable (gmodels)

R function to display a contingency table with options like fisher, chisq, expected, and standardized residuals.

21
New cards

Chi-Square Test in R (chisq.test)

R function to perform Pearson's chi-square test; can disable Yates' correction with correct=FALSE.

22
New cards

Fisher's Exact Test in R (fisher.test)

R function to perform Fisher's Exact Test for count data.

23
New cards

Expected Counts in a 2×2 Table

Calculated as (row total × column total) / grand total.

24
New cards

Contingency Test Summary

Use Chi-square when expected counts are sufficient; use Fisher's exact when not; if they disagree, prefer Fisher.

25
New cards

Example Contingency Table (Training vs Dancing in Cats)

A case study with variables like Reward type and whether cats danced, used to illustrate testing and odds ratios.

26
New cards

Sample Size Assumption Met

All expected cell counts ≥ 5 allows use of Pearson's chi-square; otherwise use Fisher's exact.