Two categorical variables

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

1/4

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

5 Terms

1
New cards

TWO CATEGORICAL VARIABLES

2
New cards

What does the chi-square test of independence/association evaluate? (chisq.test() or associationTest())

It tests whether there is a relationship (association) between two categorical variables.

  • H₀: the variables are independent (no association)

    • there is no relationship between the categorical variables

  • H₁: the variables are not independent (association exists)

    • there is a relationship between the categorical variables

3
New cards

What is the test statistic for a chi-square test of independence and how are degrees of freedom calculated?

O = observed frequency

E = expected frequency

  • Larger X² values correspond to lower probability of H₀ being true

Degrees of freedom: df = (r−1)(c−1)

  • r = number of rows, c = number of columns in contingency table

    • the number of levels in both categorical variables

*exact rejection region depends on degrees of freedom

<p><strong>O</strong> = observed frequency</p><p><strong>E</strong> = expected frequency</p><ul><li><p>Larger X² values correspond to lower probability of H₀ being true</p><p></p></li></ul><p><strong>Degrees of freedom</strong>: df = (r−1)(c−1)</p><ul><li><p><strong>r</strong> = number of rows, <strong>c</strong> = number of columns in contingency table</p><ul><li><p><span>the number of levels in both categorical variables</span></p></li></ul></li></ul><p>*exact rejection region depends on degrees of freedom</p>
4
New cards

What is Cramer’s V and how is it interpreted? (cramersV())

  • Cramer’s V measures the strength of association between two categorical variables

  • Values range from 0 (no association) to 1 (perfect association).

Interpretation scale:

  • 0–0.15: very weak

  • 0.15–0.20: weak

  • 0.20–0.25: moderate

  • 0.25–0.30: moderately strong

  • 0.30–0.35: strong

  • 0.35–0.40: very strong

*larger values correspond to a larger deviation from the specified probability distribution under H0

5
New cards

What are the assumptions of the chi-square test of independence?

  • Expected frequencies are all at least 5

    • if violated: use Fisher’s exact test (fisher.test())

  • Observations are independent

    • if violated: use McNemar’s test (mcnemar.test())