🏠 Home
Theory of Attributes
Unit V · Lecture 37

BDS113 — Introduction to Statistics

Measures of Association & Contingency Tables

Chi-Square (φ) Coefficient · Karl Pearson's Coefficient of Contingency (C) · Coefficient of Colligation · Worked Examples


Unit V · Lecture 37 of 40 · B.Sc. Data Science, 1st Year, Semester II

Theory of Attributes
Unit V · Lecture 37

The Journey — Lecture 37


📊
Chi-Square Statistic for Attributes
Formula · φ coefficient · Interpretation · Range
📐
Pearson's Coefficient of Contingency (C)
Formula · Range · Comparison with φ · For larger tables
✏️
Worked Examples & Interactive Calculator
Step-by-step computation · Comparing measures · Quiz
Theory of Attributes
Unit V · Lecture 37

📊 Chi-Square (χ²) for Attributes


📖 Chi-Square Statistic

For a 2×2 contingency table, the chi-square statistic measures the total discrepancy between observed and expected frequencies:

χ² = Σ [(Observed − Expected)² / Expected]

For a 2×2 table:
χ² = N(AD − BC)² / [(A+B)(C+D)(A+C)(B+D)]

Where the table is:
  A B | A+B
  C D | C+D
  ———————
  A+C B+D | N


📖 φ (Phi) Coefficient

φ = √(χ²/N)

Range: 0 ≤ φ ≤ 1
φ = 0: Complete independence (no association)
φ = 1: Perfect association
Interpretation: φ measures the strength of association in a 2×2 table. Higher φ = stronger association.

Theory of Attributes
Unit V · Lecture 37

📐 Pearson's Coefficient of Contingency (C)


📖 Formula

C = √(χ² / (χ² + N))

Range: 0 ≤ C < 1 (never reaches 1, even for perfect association)
C = 0: Complete independence
C → 1: Very strong association (but C < 1 always)

Advantage over φ: C can be used for tables larger than 2×2 (e.g., 3×3, 4×4).
Disadvantage: C never reaches 1, so it's harder to interpret as "perfect" association.


📖 For a 2×2 Table

Both φ and C can be computed. They give similar results but differ in scale:

φ ranges from 0 to 1
C ranges from 0 to less than 1

For the same χ² value, C < φ always.

📖 For Larger Tables (r × c)

For an r×c contingency table:

χ² = Σᵢ Σⱼ (Oᵢⱼ − Eᵢⱼ)² / Eᵢⱼ

Where Oᵢⱼ = observed frequency in cell (i,j)
Eᵢⱼ = (row total × column total) / N

C = √(χ²/(χ²+N)) works for any size table.
φ is mainly used for 2×2 tables.

Theory of Attributes
Unit V · Lecture 37

✏️ Example: Computing χ², φ, and C


📝 Problem

Given the following 2×2 table, compute χ², φ, and C.

(B)(β)Total
(A)100100200
(α)60140200
Total160240400

📖 Solution

Using the 2×2 shortcut with A=100, B=100, C=60, D=140, N=400:

χ² = N(AD−BC)² / [(A+B)(C+D)(A+C)(B+D)]
   = 400(100×140 − 100×60)² / [200×200×160×240]
   = 400(14000−6000)² / [200×200×160×240]
   = 400(8000)² / [1,536,000,000]
   = 400×64,000,000 / 1,536,000,000
   = 25,600,000,000 / 1,536,000,000 = 16.667

φ = √(χ²/N) = √(16.667/400) = √0.04167 = 0.2041

C = √(χ²/(χ²+N)) = √(16.667/416.667) = √0.04 = 0.2000


Results

χ² = 16.667  |  φ = 0.204  |  C = 0.200

There is a weak-to-moderate positive association between A and B. The attributes are NOT independent (χ² > 0).

Theory of Attributes
Unit V · Lecture 37

🎬 Interactive: Association Measures Calculator


Enter the four cell frequencies of a 2×2 table:


Theory of Attributes
Unit V · Lecture 37

⚖️ Comparison of Association Measures


MeasureFormulaRangeBest ForLimitation
χ²Σ(O−E)²/E0 to ∞Testing independenceDepends on N; not a "strength" measure
φ√(χ²/N)0 to 12×2 tablesOnly for 2×2 tables
C√(χ²/(χ²+N))0 to <1Any r×c tableNever reaches 1
Yule's Q(AD−BC)/(AD+BC)−1 to +12×2 tablesLecture 38
Yule's Y(√AD−√BC)/(√AD+√BC)−1 to +12×2 tablesLecture 39

💬 Which to Use? For a 2×2 table, Yule's Q and Y (Lectures 38–39) are most commonly used because they range from −1 to +1 and have a clean interpretation. For larger tables, use C (Pearson's contingency coefficient). Use χ² mainly for hypothesis testing (testing whether association is statistically significant).
Theory of Attributes
Unit V · Lecture 37

🔑 Summary & Quiz — Lecture 37



Q1: The φ coefficient ranges from:

A) −1 to +1
B) 0 to 1
C) 0 to ∞
D) −∞ to +∞

Q2: Pearson's C can be used for:

A) Only 2×2 tables
B) Any r×c contingency table
C) Only 3×3 tables
D) Only when attributes are independent

Q3: If χ² = 0, then:

A) Perfect association
B) Complete independence
C) Negative association
D) The data is inconsistent

Q4: C never reaches 1 because:

A) Of calculation errors
B) The formula C = √(χ²/(χ²+N)) is always less than 1 for finite N
C) Association is always imperfect
D) χ² is always less than N

Q5: For the same data, which is always true?

A) C > φ
B) C < φ
C) C = φ
D) C = φ²
Theory of Attributes
Unit V · Lecture 37

📝 Homework & Next Lecture


📝 Practice Tasks

1. For the table: (AB)=80, (Aβ)=120, (αB)=40, (αβ)=160, N=400. Compute χ², φ, and C.

2. For the table: (AB)=50, (Aβ)=50, (αB)=50, (αβ)=50, N=200. Compute χ², φ, and C. What do you observe?

3. Explain why χ² alone is not a good measure of the strength of association.

4. For a 3×3 table with N=300 and χ²=25, compute C.

5. Show that when attributes are independent, φ = 0 and C = 0.


Next: Lecture 38

Yule's Coefficient of Association Q — The most popular measure for 2×2 tables