🏠 Home
Theory of Attributes
Unit V · Lecture 35

BDS113 — Introduction to Statistics

Consistency of Data

What is Consistency? · Conditions for Two Attributes · Conditions for Three Attributes · Frequency Inequalities · Worked Examples


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

Theory of Attributes
Unit V · Lecture 35

The Journey — Lecture 35


✅
What Does "Consistent" Mean?
Logical compatibility · Can the frequencies coexist? · Real-world analogy
📐
Consistency Conditions for Two Attributes
The four inequalities · Derivation · Geometric interpretation
📐
Consistency Conditions for Three Attributes
Extended inequalities · More complex checks
✏️
Worked Examples & Quiz
Checking consistency · Finding missing frequencies · Practice
Theory of Attributes
Unit V · Lecture 35

✅ What Does "Consistent Data" Mean?


📖 Definition

A set of frequency data is said to be consistent if it is logically possible — that is, if there exists at least one valid 2×2 (or larger) table of non-negative frequencies that satisfies all the given marginal totals and cross-class frequencies simultaneously. If no such table exists, the data is inconsistent.


💡 Analogy: The Jigsaw Puzzle

Think of the frequencies as pieces of a jigsaw puzzle. The marginal totals (A), (α), (B), (β) are the edges, and the cross-class frequencies (AB), (Aβ), (αB), (αβ) are the interior pieces. The data is "consistent" if the pieces actually fit together — if the interior pieces add up to match the edges. If someone claims (A) = 100 and (B) = 80 but (AB) = 90, the pieces don't fit — the data is inconsistent because (AB) cannot exceed either (A) or (B).


💬 Why Does This Matter? In real-world data collection, errors in recording, counting, or reporting can produce inconsistent data. Before analysing data, we must verify that it is logically consistent. Inconsistent data cannot represent any real population.
Theory of Attributes
Unit V · Lecture 35

📐 Consistency Conditions for Two Attributes


📖 The Necessary and Sufficient Conditions

Given frequencies (A), (B), (AB), and N, the data is consistent if and only if all four of the following conditions hold:

Condition 1: (AB) ≤ (A)    — The joint class cannot exceed the marginal class
Condition 2: (AB) ≤ (B)    — Same logic for the other attribute
Condition 3: (AB) ≥ (A) + (B) − N    — The overlap cannot be too small
Condition 4: (AB) ≥ 0    — Frequencies cannot be negative

Combining: max(0, (A)+(B)−N) ≤ (AB) ≤ min((A), (B))


📖 Derivation of Condition 3

(αβ) = N − (A) − (B) + (AB) ≥ 0

Therefore: (AB) ≥ (A) + (B) − N

This says: the number of people with both attributes must be at least as large as the "excess" — the amount by which (A) + (B) exceeds N. If (A) + (B) > N, some people must have both attributes.

📖 Intuitive Understanding

Upper bound: (AB) can't be bigger than either (A) or (B) — you can't have more people with both attributes than have either attribute alone.

Lower bound: If (A) + (B) > N, then by the pigeonhole principle, at least (A) + (B) − N people must have both attributes. The classes (A) and (B) must overlap by at least this amount.

Theory of Attributes
Unit V · Lecture 35

✏️ Example 1: Checking Consistency


📝 Problem

Given: N = 1000, (A) = 600, (B) = 500, (AB) = 300. Is this data consistent?


📖 Solution

Check Condition 1: (AB) ≤ (A)? → 300 ≤ 600? → Yes ✓
Check Condition 2: (AB) ≤ (B)? → 300 ≤ 500? → Yes ✓
Check Condition 3: (AB) ≥ (A) + (B) − N? → 300 ≥ 600 + 500 − 1000? → 300 ≥ 100? → Yes ✓
Check Condition 4: (AB) ≥ 0? → 300 ≥ 0? → Yes ✓

All conditions satisfied → Data is CONSISTENT ✓


(B)(β)Total
(A)300300600
(α)200200400
Total5005001000

💡 All four cross-class frequencies are non-negative: (AB) = 300, (Aβ) = 300, (αB) = 200, (αβ) = 200. This confirms consistency.
Theory of Attributes
Unit V · Lecture 35

✏️ Example 2: Inconsistent Data


📝 Problem

Given: N = 200, (A) = 120, (B) = 150, (AB) = 10. Is this data consistent?


📖 Solution

Check Condition 1: (AB) ≤ (A)? → 10 ≤ 120? → Yes ✓
Check Condition 2: (AB) ≤ (B)? → 10 ≤ 150? → Yes ✓
Check Condition 3: (AB) ≥ (A) + (B) − N? → 10 ≥ 120 + 150 − 200? → 10 ≥ 70? → NO ✗

Condition 3 is violated → Data is INCONSISTENT ✗


Why Is It Inconsistent?

(A) + (B) = 120 + 150 = 270, but N = 200. So 270 − 200 = 70 people must have both attributes (by the pigeonhole principle). But the data claims only 10 have both — that's impossible!

If we try to build the table:
(αβ) = N − (A) − (B) + (AB) = 200 − 120 − 150 + 10 = −60

A negative frequency is impossible. The data is inconsistent.

Theory of Attributes
Unit V · Lecture 35

✏️ Example 3: Finding the Range of (AB)


📝 Problem

Given N = 500, (A) = 300, (B) = 250. What values can (AB) take for the data to be consistent?


📖 Solution

Lower bound: max(0, (A)+(B)−N) = max(0, 300+250−500) = max(0, 50) = 50
Upper bound: min((A), (B)) = min(300, 250) = 250

For consistency: 50 ≤ (AB) ≤ 250

Any value of (AB) between 50 and 250 (inclusive) gives a consistent dataset.


📖 At (AB) = 50 (minimum)

(AB) = 50, (Aβ) = 250, (αB) = 200, (αβ) = 0
→ Maximum possible independence from B for A-holders

📖 At (AB) = 250 (maximum)

(AB) = 250, (Aβ) = 50, (αB) = 0, (αβ) = 200
→ All B-holders are also A-holders (B ⊂ A)

Theory of Attributes
Unit V · Lecture 35

📐 Consistency for Three Attributes


📖 Conditions

For three attributes A, B, C with given (A), (B), (C), (AB), (BC), (AC), (ABC), and N, the data is consistent if:

1. Each pair satisfies the two-attribute conditions:
   max(0, (A)+(B)−N) ≤ (AB) ≤ min((A), (B))
   max(0, (A)+(C)−N) ≤ (AC) ≤ min((A), (C))
   max(0, (B)+(C)−N) ≤ (BC) ≤ min((B), (C))

2. The triple intersection satisfies:
   (ABC) ≤ min((AB), (BC), (AC))
   (ABC) ≥ max(0, (AB)+(AC)−(A), (AB)+(BC)−(B), (AC)+(BC)−(C))

3. All eight cross-class frequencies must be non-negative.


💡 Practical Approach: For three attributes, the easiest check is to compute all eight cross-class frequencies and verify they are all ≥ 0. If any frequency is negative, the data is inconsistent.
Theory of Attributes
Unit V · Lecture 35

🔑 Summary & Quiz — Lecture 35



Q1: Data is consistent when:

A) All frequencies are equal
B) All cross-class frequencies are non-negative
C) (AB) = (A) × (B) / N
D) The attributes are independent

Q2: Given N=100, (A)=60, (B)=70. The minimum possible value of (AB) is:

A) 0
B) 10
C) 30
D) 60

Q3: Given N=100, (A)=60, (B)=70. The maximum possible value of (AB) is:

A) 100
B) 70
C) 60
D) 42

Q4: If (A)+(B) > N, then:

A) The data is always inconsistent
B) Some individuals must have both A and B
C) (AB) must be zero
D) A and B are independent

Q5: If (αβ) = −10, the data is:

A) Consistent
B) Inconsistent
C) Independent
D) Associated
Theory of Attributes
Unit V · Lecture 35

📝 Homework & Next Lecture


📝 Practice Tasks

1. Check consistency: N=300, (A)=180, (B)=200, (AB)=100.

2. Check consistency: N=500, (A)=350, (B)=300, (AB)=50.

3. Given N=400, (A)=250, (B)=200. Find the range of (AB) for consistency.

4. Given N=1000, (A)=400, (B)=500, (C)=600, (AB)=200, (BC)=300, (AC)=250, (ABC)=100. Check consistency by computing all 8 cross-class frequencies.

5. A researcher reports: N=200, (A)=150, (B)=120, (AB)=100, (Aβ)=30. Verify whether this is consistent. If not, identify the error.


Next: Lecture 36

Independence and Association of Attributes — When are attributes related?