🏠 Home
Theory of Attributes
Unit V · Lecture 36

BDS113 — Introduction to Statistics

Independence & Association of Attributes

Independent Attributes · Associated Attributes · Positive & Negative Association · Expected Frequencies · Tests for Independence


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

Theory of Attributes
Unit V · Lecture 36

The Journey — Lecture 36


🔗
Independent Attributes
Definition · Mathematical condition · Expected frequencies · Examples
↔️
Associated Attributes
Definition · Positive vs negative association · How to detect
✏️
Worked Examples & Quiz
Testing independence · Identifying type of association · Practice
Theory of Attributes
Unit V · Lecture 36

🔗 Independent Attributes


📖 Definition

Two attributes A and B are said to be independent if the possession (or non-possession) of one attribute does not affect the probability of possessing the other. Mathematically, A and B are independent if and only if:

(AB) = (A) × (B) / N

That is, the observed joint frequency equals the expected frequency under independence.


💡 Analogy: Coincidence vs Connection

If 60% of a town is literate and 50% is employed, then if literacy and employment are independent, we'd expect 60% × 50% = 30% of the town to be both literate AND employed. If the actual percentage is close to 30%, the attributes are independent — knowing someone is literate doesn't change the chance they're employed. If the actual percentage is very different from 30%, the attributes are associated — there's a connection.


📖 Expected Frequency Under Independence

If A and B are independent, the expected (theoretical) frequency of each cross class is:

E(AB) = (A)(B) / N
E(Aβ) = (A)(β) / N
E(αB) = (α)(B) / N
E(αβ) = (α)(β) / N

These are the frequencies we'd expect if knowing A tells us nothing about B.

📖 Equivalent Conditions for Independence

A and B are independent if any one of these holds:

(AB) = (A)(B)/N
(Aβ) = (A)(β)/N
(αB) = (α)(B)/N
(αβ) = (α)(β)/N

(If one holds, all four hold automatically.)

Theory of Attributes
Unit V · Lecture 36

↔️ Associated Attributes


📖 Definition

Two attributes A and B are associated if they are not independent — that is, if the observed joint frequency (AB) differs from the expected frequency (A)(B)/N. Association means that knowing whether a person has attribute A gives information about whether they have attribute B.


📖 Positive Association

(AB) > (A)(B)/N

The attributes occur together more often than expected by chance. Having A makes it more likely to have B.

Example: Smoking and lung cancer — smokers are more likely to get lung cancer than non-smokers.

Also means: (αβ) > (α)(β)/N — the absences also go together.

📖 Negative Association

(AB) < (A)(B)/N

The attributes occur together less often than expected. Having A makes it less likely to have B.

Example: Exercise and obesity — exercisers are less likely to be obese.

Also means: (Aβ) > (A)(β)/N — presence of A goes with absence of B.


📖 Summary Table

Independent: (AB) = (A)(B)/N    →    Observed = Expected
Positive association: (AB) > (A)(B)/N    →    Observed > Expected
Negative association: (AB) < (A)(B)/N    →    Observed < Expected

Theory of Attributes
Unit V · Lecture 36

✏️ Example 1: Testing Independence


📝 Problem

In a survey of 400 people: (A) = 200, (B) = 160, (AB) = 100. Are A and B independent?


📖 Solution

Expected frequency under independence:
E(AB) = (A)(B)/N = 200 × 160 / 400 = 80

Observed frequency: (AB) = 100

Since (AB) = 100 > 80 = E(AB), the attributes A and B are positively associated (not independent).

They occur together more often than expected by chance.


(B)(β)Total
(A)100 (exp: 80)100 (exp: 120)200
(α)60 (exp: 80)140 (exp: 120)200
Total160240400

💡 Observation: (AB) = 100 > 80 (expected). Also (αβ) = 140 > 120 (expected). Both "both present" and "both absent" are over-represented — a hallmark of positive association.
Theory of Attributes
Unit V · Lecture 36

✏️ Example 2: Independent Attributes


📝 Problem

In a group of 500: (A) = 250, (B) = 200, (AB) = 100. Are A and B independent?


📖 Solution

E(AB) = (A)(B)/N = 250 × 200 / 500 = 100

Observed (AB) = 100

Since (AB) = E(AB) = 100, the attributes A and B are independent.

Knowing whether someone has A gives no information about whether they have B.


(B)(β)Total
(A)100150250
(α)100150250
Total200300500

💡 Notice: When attributes are independent, the proportion of B-holders is the same in both (A) and (α) groups: 100/250 = 40% and 100/250 = 40%. This is the hallmark of independence — the distribution of B is unaffected by A.
Theory of Attributes
Unit V · Lecture 36

✏️ Example 3: Negative Association


📝 Problem

In a study of 300 patients: (A) = 150 (received treatment), (B) = 100 (recovered), (AB) = 20 (received treatment AND recovered). Determine the type of relationship.


📖 Solution

E(AB) = (A)(B)/N = 150 × 100 / 300 = 50

Observed (AB) = 20

Since (AB) = 20 < 50 = E(AB), the attributes are negatively associated.

Patients who received the treatment recovered less often than expected by chance. (This would be a very concerning result for the treatment!)


⚠️ Important: This is a simplified illustration. In real medical research, establishing causation requires controlled experiments, not just observed associations. The negative association here could be due to confounding (e.g., sicker patients were more likely to receive treatment).
Theory of Attributes
Unit V · Lecture 36

📐 Independence for Three Attributes


📖 Complete Independence

Three attributes A, B, C are mutually independent if:

(ABC) = (A)(B)(C) / N²

And all pairwise expected frequencies also match:
(AB) = (A)(B)/N, (AC) = (A)(C)/N, (BC) = (B)(C)/N


📖 Pairwise Independence

A, B, C are pairwise independent if each pair is independent:

(AB) = (A)(B)/N
(AC) = (A)(C)/N
(BC) = (B)(C)/N

Note: Pairwise independence does NOT guarantee mutual independence. All three conditions plus the triple condition must hold.

📖 Types of Relationship (Three Attributes)

1. Complete independence: All pairs and the triple are independent.

2. Pairwise association: Some or all pairs are associated, but the triple may or may not be.

3. Conditional independence: A and B are independent when C is held fixed, but may appear associated overall (Simpson's paradox).

Theory of Attributes
Unit V · Lecture 36

🔑 Summary & Quiz — Lecture 36



Q1: A and B are independent if:

A) (AB) = 0
B) (AB) = (A)(B)/N
C) (AB) = N
D) (A) = (B)

Q2: If (AB) > (A)(B)/N, the attributes are:

A) Independent
B) Positively associated
C) Negatively associated
D) Mutually exclusive

Q3: N=200, (A)=100, (B)=80. If A and B are independent, (AB) should be:

A) 180
B) 20
C) 40
D) 80

Q4: Positive association means:

A) Both attributes are always present together
B) The attributes co-occur more often than expected by chance
C) One attribute causes the other
D) The attributes are independent

Q5: For mutual independence of three attributes, we need:

A) Only pairwise independence
B) All pairwise conditions plus (ABC) = (A)(B)(C)/N²
C) (ABC) = 0
D) All attributes to be equal
Theory of Attributes
Unit V · Lecture 36

📝 Homework & Next Lecture


📝 Practice Tasks

1. N=500, (A)=250, (B)=200, (AB)=120. Test for independence. If not independent, what type of association?

2. N=400, (A)=200, (B)=180, (AB)=90. Test for independence.

3. N=600, (A)=300, (B)=240, (AB)=80. Test for independence and interpret.

4. If A and B are independent and (A)=150, (B)=120, N=300, find all four cross-class frequencies.

5. Explain why pairwise independence of three attributes does not guarantee mutual independence. Give a conceptual example.


Next: Lecture 37

Measures of Association & Contingency Tables — Quantifying the strength of association