Solved Exercises on Analyzing Association in Two-Way Tables

Master association analysis in two-way tables: calculating conditional relative frequencies, detecting patterns, and determining independence through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Student Performance Analysis
Exercise 1
A study of 400 students examined the relationship between tutoring attendance and academic performance. 120 students attended tutoring regularly, 80 passed and 40 failed. 280 students didn't attend tutoring regularly, 140 passed and 140 failed. Create a two-way table and analyze if there's an association between tutoring attendance and passing.
Definition:

Association: A relationship between two categorical variables where knowing the value of one variable provides information about the value of the other.

Independence: No relationship exists between variables; conditional relative frequencies are similar across categories.

Method for analyzing association:
  1. Construct the two-way table with observed frequencies
  2. Calculate conditional relative frequencies for each category
  3. Compare conditional frequencies across categories
  4. Determine if frequencies are similar (independence) or different (association)
  5. Draw conclusions about the relationship
Academic Performance Pass Fail Total Tutoring - Regular 80 40 120 Tutoring - Not Regular 140 140 280 Total 220 180 400
Step 1: Calculate conditional relative frequencies for regular tutoring attendees

Given regular tutoring: P(Pass) = 80/120 = 0.667 or 66.7%

Given regular tutoring: P(Fail) = 40/120 = 0.333 or 33.3%

Step 2: Calculate conditional relative frequencies for non-attendees

Given no regular tutoring: P(Pass) = 140/280 = 0.500 or 50.0%

Given no regular tutoring: P(Fail) = 140/280 = 0.500 or 50.0%

Step 3: Compare conditional frequencies

Regular tutoring: 66.7% pass, 33.3% fail

No regular tutoring: 50.0% pass, 50.0% fail

There's a significant difference in pass rates (66.7% vs 50.0%)

Step 4: Determine association

Students who attend tutoring regularly have a higher pass rate (66.7%) compared to those who don't (50.0%).

Since conditional relative frequencies differ significantly, there is an association between tutoring attendance and academic performance.

Tutoring Pass
66.7%
No Tutoring Pass
50.0%
Difference
16.7%
Association detected: Regular tutoring increases pass rate from 50% to 66.7%
Final answer:

There is a positive association between attending tutoring regularly and passing.

Students who attend tutoring regularly have a 66.7% pass rate compared to 50.0% for those who don't attend regularly.

Applied rules:

• Conditional Relative Frequency: Cell value ÷ Row/Column total

• Association Detection: Compare conditional frequencies across categories

• Independence: Conditional frequencies are similar across categories

2 Medical Treatment Effectiveness
Exercise 2
A medical study of 500 patients compared treatment effectiveness by age group. 200 younger patients (under 40) received treatment: 150 recovered, 50 didn't. 300 older patients (40+) received the same treatment: 225 recovered, 75 didn't. Create a two-way table and analyze if there's an association between age group and recovery.
Definition:

Medical Association: A relationship between treatment/exposure and outcome variables in clinical studies.

Recovery Rate: The conditional probability of recovery given specific patient characteristics.

Age Group Recovered Did Not Recover Total Under 40 150 50 200 40 and Over 225 75 300 Total 375 125 500
Step 1: Calculate conditional relative frequencies for younger patients

Given under 40: P(Recover) = 150/200 = 0.750 or 75.0%

Given under 40: P(Not Recover) = 50/200 = 0.250 or 25.0%

Step 2: Calculate conditional relative frequencies for older patients

Given 40+: P(Recover) = 225/300 = 0.750 or 75.0%

Given 40+: P(Not Recover) = 75/300 = 0.250 or 25.0%

Step 3: Compare conditional frequencies

Under 40: 75.0% recover, 25.0% don't recover

40+: 75.0% recover, 25.0% don't recover

The conditional frequencies are identical!

Step 4: Determine association

Since the conditional relative frequencies are identical for both age groups, there is no association between age group and recovery rate.

Age does not appear to influence the treatment effectiveness in this study.

Under 40
75% Recov
40+
75% Recov
Association
None
No association detected: Recovery rates identical (75%) across age groups
Final answer:

There is no association between age group and recovery rate.

Both age groups have identical recovery rates of 75.0%.

Age does not appear to influence treatment effectiveness.

Applied rules:

• Conditional Relative Frequency: Cell value ÷ Row total

• Independence Detection: Identical conditional frequencies suggest independence

• Association Strength: Larger differences indicate stronger association

3 College Admission Analysis
Exercise 3
A university analyzed admission rates by gender. 400 male applicants applied: 240 were admitted, 160 were rejected. 600 female applicants applied: 300 were admitted, 300 were rejected. Create a two-way table and analyze if there's an association between gender and admission.
Definition:

Admission Rate: The conditional probability of being admitted given gender.

Gender Bias: A systematic difference in treatment or outcomes based on gender.

Gender Admitted Rejected Total Male 240 160 400 Female 300 300 600 Total 540 460 1000
Step 1: Calculate conditional relative frequencies for male applicants

Given male: P(Admitted) = 240/400 = 0.600 or 60.0%

Given male: P(Rejected) = 160/400 = 0.400 or 40.0%

Step 2: Calculate conditional relative frequencies for female applicants

Given female: P(Admitted) = 300/600 = 0.500 or 50.0%

Given female: P(Rejected) = 300/600 = 0.500 or 50.0%

Step 3: Compare conditional frequencies

Male: 60.0% admitted, 40.0% rejected

Female: 50.0% admitted, 50.0% rejected

There's a 10% difference in admission rates

Step 4: Determine association

Male applicants have a higher admission rate (60.0%) than female applicants (50.0%).

Since conditional relative frequencies differ, there is an association between gender and admission.

Male applicants are 10 percentage points more likely to be admitted.

Step 5: Consider implications

This association might suggest potential gender bias in admissions.

Further investigation would be needed to determine if this difference is statistically significant.

Male Admit
60.0%
Female Admit
50.0%
Difference
10%
Association detected: Male admission rate (60%) > Female rate (50%)
Final answer:

There is an association between gender and admission.

Male applicants have a higher admission rate (60.0%) than female applicants (50.0%).

This suggests potential gender bias in the admission process.

Applied rules:

• Conditional Relative Frequency: Cell value ÷ Row total

• Association Detection: Different conditional frequencies indicate association

• Implication Analysis: Consider broader implications of detected associations

Association Analysis: Core Concepts
P(A|B) = \frac{P(A \cap B)}{P(B)}
Conditional Probability Formula
Conditional Prob
P(A|B)
Given B, prob A
Independence
P(A|B) = P(A)
No association
Association
P(A|B) ≠ P(A)
Related variables
Key definitions:

Two-Way Table: A table displaying the frequency distribution of two categorical variables.

Conditional Relative Frequency: The relative frequency of one variable given a specific value of another variable.

Association: A relationship between variables where conditional frequencies differ across categories.

Independence: No relationship exists between variables; conditional frequencies are similar.

Association Detection: Compare conditional relative frequencies across categories to detect relationships.
Independence Criterion: Variables are independent if conditional frequencies are similar across all categories.
Tip 1: Always calculate conditional relative frequencies for each category separately.
Tip 2: Compare conditional frequencies across categories to detect associations.
Tip 3: Consider practical significance of detected associations, not just statistical significance.
Essential formulas:

• Conditional Relative Frequency = Cell Value ÷ Row/Column Total

• Marginal Relative Frequency = Row/Column Total ÷ Grand Total

• Association exists when conditional frequencies differ significantly

• Independence exists when conditional frequencies are similar

Solution: Exercises 4 to 5
4 Restaurant Satisfaction Study
Exercise 4
A restaurant chain studied customer satisfaction by service type. 300 customers used dine-in service: 240 were satisfied, 60 were dissatisfied. 200 customers used takeout service: 120 were satisfied, 80 were dissatisfied. 150 customers used delivery service: 90 were satisfied, 60 were dissatisfied. Analyze the association between service type and satisfaction.
Definition:

Customer Satisfaction: The conditional probability of being satisfied given the service type.

Service Quality: Measured by satisfaction rates across different service modalities.

Service Type Satisfied Dissatisfied Total Dine-in 240 60 300 Takeout 120 80 200 Delivery 90 60 150 Total 450 200 650
Step 1: Calculate conditional relative frequencies for each service type

Dine-in: P(Satisfied) = 240/300 = 0.800 or 80.0%

Takeout: P(Satisfied) = 120/200 = 0.600 or 60.0%

Delivery: P(Satisfied) = 90/150 = 0.600 or 60.0%

Step 2: Compare satisfaction rates across service types

Dine-in: 80.0% satisfied

Takeout: 60.0% satisfied

Delivery: 60.0% satisfied

Dine-in has significantly higher satisfaction (20% higher than other services)

Step 3: Determine association strength

There is a clear association between service type and customer satisfaction.

Dine-in customers are more satisfied than takeout or delivery customers.

Takeout and delivery have identical satisfaction rates.

Step 4: Analyze patterns

Dine-in service has the highest satisfaction rate (80%)

Takeout and delivery services have lower but equal satisfaction rates (60%)

Service type significantly influences customer satisfaction

Dine-in
80% Sat
Takeout
60% Sat
Delivery
60% Sat
Association detected: Service type influences satisfaction (80% vs 60%)
Final answer:

There is a strong association between service type and customer satisfaction.

Dine-in customers have the highest satisfaction rate (80%).

Takeout and delivery customers have identical satisfaction rates (60%).

Applied rules:

• Conditional Relative Frequency: Cell value ÷ Row total

• Association Detection: Compare conditional frequencies across categories

• Pattern Recognition: Look for systematic differences in frequencies

5 Device Usage and Productivity
Exercise 5
A productivity study of 800 office workers examined the relationship between primary device used and work performance. 300 workers used laptops: 210 were high performers, 90 were low performers. 250 workers used tablets: 125 were high performers, 125 were low performers. 250 workers used smartphones: 100 were high performers, 150 were low performers. Analyze the association.
Definition:

Work Performance: Categorical variable with two levels (high performer, low performer).

Device Effectiveness: Measured by the conditional probability of high performance given device type.

Device Type High Performer Low Performer Total Laptop 210 90 300 Tablet 125 125 250 Smartphone 100 150 250 Total 435 365 800
Step 1: Calculate conditional relative frequencies for each device type

Laptop: P(High Perf) = 210/300 = 0.700 or 70.0%

Tablet: P(High Perf) = 125/250 = 0.500 or 50.0%

Smartphone: P(High Perf) = 100/250 = 0.400 or 40.0%

Step 2: Compare performance rates across devices

Laptop: 70.0% high performers

Tablet: 50.0% high performers

Smartphone: 40.0% high performers

Clear trend: laptop > tablet > smartphone for high performance

Step 3: Determine association

There is a strong association between device type and work performance.

Laptop users have the highest rate of high performance (70.0%).

Smartphone users have the lowest rate of high performance (40.0%).

Performance decreases as device complexity decreases.

Step 4: Assess practical significance

Laptop users are 30 percentage points more likely to be high performers than smartphone users.

This represents a substantial difference in productivity.

Organizations should consider device policies based on these findings.

Laptop
70% HP
Tablet
50% HP
Smartphone
40% HP
Strong association: Laptop (70%) > Tablet (50%) > Smartphone (40%) for high performance
Final answer:

There is a strong association between device type and work performance.

Laptop users have the highest high-performance rate (70%).

Smartphone users have the lowest high-performance rate (40%).

Device type significantly influences work performance.

Applied rules:

• Conditional Relative Frequency: Cell value ÷ Row total

• Association Strength: Larger differences indicate stronger association

• Practical Significance: Consider real-world implications of findings

Association Analysis in Two-Way Tables: Comprehensive Summary

Complete Summary: Analyzing Association in Two-Way Tables

Core Concepts

Two-Way Table: Displays frequency distribution of two categorical variables.

Conditional Relative Frequency: Proportion of one variable given a specific value of another.

Association: Relationship where conditional frequencies differ across categories.

Independence: No relationship exists when conditional frequencies are similar.

Key Properties

Association Detection: Compare conditional relative frequencies across categories.

Independence Criterion: Conditional frequencies are similar across all categories.

Strength of Association: Larger differences indicate stronger association.

Direction of Association: Identify which categories are more likely to co-occur.

Analysis Process

Step 1: Construct two-way table with observed frequencies.

Step 2: Calculate conditional relative frequencies for each category.

Step 3: Compare conditional frequencies across categories.

Step 4: Determine if association exists based on frequency differences.

Step 5: Interpret results in context of the problem.

Association Strength

Strong Association: Large differences in conditional frequencies (>20%).

Moderate Association: Moderate differences in conditional frequencies (10-20%).

Weak Association: Small differences in conditional frequencies (<10%).

Independence: Negligible differences in conditional frequencies (<5%).

Detailed Definitions:

Association: A relationship between two categorical variables where the conditional relative frequencies of one variable differ depending on the value of the other variable.

Conditional Relative Frequency: The relative frequency of a specific category of one variable given a specific category of another variable.

Independence: Two variables are independent if the conditional relative frequencies of one variable are the same regardless of the value of the other variable.

Contingency Table: Another name for a two-way table showing the relationship between two categorical variables.

Marginal Frequencies: The totals for each row and column in a two-way table.

Systematic Association Analysis Method:
  1. Construct Table: Organize data into a two-way table format.
  2. Calculate Marginals: Find row and column totals.
  3. Compute Conditional Frequencies: Calculate P(A|B) for each category of B.
  4. Compare Frequencies: Look for differences in conditional frequencies.
  5. Determine Association: Decide if variables are associated or independent.
  6. Interpret Results: Explain the meaning of the association in context.
Memory Tip: "Condition on the row variable and calculate proportions within each row."
Common Mistake: Using wrong denominator when calculating conditional frequencies.
Efficiency Tip: Convert frequencies to percentages for easier comparison.
Analysis Tip: Look for systematic patterns in the differences across categories.
Key Applications: Medical studies, market research, educational assessments, social science research.
Important Note: Association does not imply causation; correlation doesn't prove cause-and-effect.
Critical Formulas to Remember:

• Conditional Relative Frequency = Cell Value ÷ Row/Column Total

• Association exists when: P(A|B₁) ≠ P(A|B₂) for different values of B

• Independence exists when: P(A|B₁) ≈ P(A|B₂) for different values of B

• Strength of association increases with larger differences in conditional frequencies

Questions & Answers

Question: How do I know if the difference in conditional frequencies is big enough to claim there's an association? How do I determine if it's just due to chance?

Answer: This is a great question about statistical significance! At the high school level:

Rule of Thumb:

  • Differences > 15-20% are usually meaningful
  • Differences < 5% are typically not meaningful
  • Differences 5-15% require careful consideration

Advanced Statistics:

Later, you'll learn about the chi-square test of independence, which mathematically determines if the observed differences are statistically significant or likely due to chance.

For now, focus on the practical significance: "Is this difference large enough to matter in real life?"

In our examples, a 10-16% difference in pass rates or satisfaction is meaningful in practice.

Question: In Exercise 2, the recovery rates were identical (75% for both age groups). But couldn't this still be due to chance? Maybe with a larger sample, we'd see differences?

Answer: Excellent critical thinking! You're absolutely right:

Sample Size Matters:

  • With small samples, identical results might be due to chance
  • With large samples, identical results are more likely to represent true independence

Confidence in Results:

The larger your sample size, the more confident you can be that identical conditional frequencies represent true independence rather than chance.

In Exercise 2, with 200 and 300 participants respectively, the identical results (75%) are more convincing than if we had only 10 participants in each group.

For now, we accept the apparent independence, but you're right to think about sample size effects.

Question: In Exercise 3, you found an association between gender and admission. Does this mean the university is discriminating based on gender?

Answer: This is a crucial distinction in statistics:

Association vs. Causation:

Association: Variables tend to occur together (correlation)

Causation: One variable directly causes changes in another

Confounding Variables:

The association might be explained by other factors like:

  • Academic major preferences (some majors have different admission rates)
  • Test scores or GPA differences by gender
  • Application timing or other factors

Further Investigation Needed:

To determine if there's actual discrimination, researchers would need to control for other relevant factors using more sophisticated statistical methods.

Association is a clue that warrants investigation, but doesn't prove discrimination.