Two-Way Tables and Relative Frequencies

Master two-way tables and relative frequencies: analyzing categorical data, joint/marginal/conditional frequencies through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Basic Two-Way Table
Exercise 1
A survey asked 200 students about their favorite subject (Math or Science) and grade level (Freshman or Sophomore). Complete the two-way table and find all marginal frequencies.
Definition:

Two-Way Table: A table that displays the frequency of two categorical variables. Marginal Frequency: The totals for each category along the margins of the table.

Table Completion Method:
  1. Fill in known values
  2. Use row/column totals to find missing values
  3. Verify that grand total equals total sample size
  4. Calculate marginal frequencies
Given Data
See table below
Complete
Fill missing cells
Marginals
Row/Col totals
Step 1: Set up the table structure
Math Science Total
Freshman 45 55 100
Sophomore 60 40 100
Total 105 95 200
Step 2: Identify marginal frequencies

Row Marginals: Freshman total = 100, Sophomore total = 100

Column Marginals: Math total = 105, Science total = 95

Grand Total: 200 students surveyed

Step 3: Verify the table

Row totals: 100 + 100 = 200 ✓

Column totals: 105 + 95 = 200 ✓

Step 4: Interpret the results

This table shows the distribution of preferences across grade levels. 105 students prefer Math, 95 prefer Science. Equal numbers of Freshmen and Sophomores were surveyed.

Completed table with marginal frequencies shown above
Final answer:

The completed two-way table shows marginal frequencies: 105 students prefer Math, 95 prefer Science; 100 are Freshmen, 100 are Sophomores. The grand total confirms 200 students surveyed.

Applied rules:

• Table Completion: Use known totals to find missing values

• Marginal Frequencies: Row and column totals along table margins

• Consistency Check: Row totals and column totals must equal grand total

2 Joint and Marginal Relative Frequencies
Exercise 2
Using the completed table from Exercise 1, calculate joint relative frequencies and marginal relative frequencies. Express as decimals and percentages.
Definition:

Joint Relative Frequency: Individual cell frequency divided by grand total. Marginal Relative Frequency: Row/column total divided by grand total.

Formula
RelFreq = Cell/GT
Calculate
Each cell ÷ 200
Convert
Decimal to %
Step 1: Calculate joint relative frequencies

Freshman-Math: 45/200 = 0.225 = 22.5%

Freshman-Science: 55/200 = 0.275 = 27.5%

Sophomore-Math: 60/200 = 0.30 = 30%

Sophomore-Science: 40/200 = 0.20 = 20%

Step 2: Calculate marginal relative frequencies

Math total: 105/200 = 0.525 = 52.5%

Science total: 95/200 = 0.475 = 47.5%

Freshman total: 100/200 = 0.50 = 50%

Sophomore total: 100/200 = 0.50 = 50%

Step 3: Create relative frequency table
Math Science Total
Freshman 0.225 (22.5%) 0.275 (27.5%) 0.50 (50%)
Sophomore 0.30 (30%) 0.20 (20%) 0.50 (50%)
Total 0.525 (52.5%) 0.475 (47.5%) 1.0 (100%)
Step 4: Verify the relative frequencies

All joint relative frequencies should sum to 1 (or 100%): 0.225 + 0.275 + 0.30 + 0.20 = 1.0 ✓

Joint: (0.225, 0.275, 0.30, 0.20) | Marginal: (0.525, 0.475, 0.50, 0.50)
Final answer:

The relative frequency table shows that 22.5% of students are Freshmen who prefer Math, 30% are Sophomores who prefer Math, etc. All relative frequencies sum to 100%.

Applied rules:

• Relative Frequency: Individual frequency ÷ Grand total

• Joint Relative Frequency: Each cell value ÷ Grand total

• Sum Check: All joint relative frequencies sum to 1 (or 100%)

3 Conditional Relative Frequencies
Exercise 3
Find the conditional relative frequencies for the table in Exercise 1. What percentage of Math students are Freshmen? What percentage of Freshmen prefer Math?
Definition:

Conditional Relative Frequency: The ratio of a joint frequency to its marginal frequency. It shows the proportion of one category within another category.

Formula
ConFreq = Joint/Marginal
Math Given
45/105 = 0.429
Freshman Given
45/100 = 0.45
Step 1: Calculate "Given Math" conditional frequencies

Freshman given Math: 45/105 = 0.429 = 42.9%

Sophomore given Math: 60/105 = 0.571 = 57.1%

Step 2: Calculate "Given Freshman" conditional frequencies

Math given Freshman: 45/100 = 0.45 = 45%

Science given Freshman: 55/100 = 0.55 = 55%

Step 3: Create conditional frequency tables

Given Subject (Column Conditional):

Given Math Freshman Sophomore
Frequency 45/105 = 0.429 60/105 = 0.571

Given Grade Level (Row Conditional):

Given Freshman Math Science
Frequency 45/100 = 0.45 55/100 = 0.55
Step 4: Answer the specific questions

What percentage of Math students are Freshmen? 42.9% (45/105)

What percentage of Freshmen prefer Math? 45% (45/100)

Math students who are Freshmen: 42.9% | Freshmen who prefer Math: 45%
Final answer:

42.9% of Math students are Freshmen, and 45% of Freshmen prefer Math. These are different conditional probabilities showing different perspectives on the same data.

Applied rules:

• Conditional Frequency: Joint frequency ÷ Relevant marginal frequency

• Direction Matters: "Given Math" vs "Given Grade" yield different results

• Sum to One: Conditional frequencies in each group sum to 1 (or 100%)

Key Concepts and Methods
\frac{\text{Cell Value}}{\text{Grand Total}}
Relative Frequency
Joint Relative Frequency
Individual Cell ÷ Grand Total
Probability of both categories occurring
Marginal Relative Frequency
Row/Column Total ÷ Grand Total
Probability of one category
Conditional Relative Frequency
Joint ÷ Marginal
Probability given one condition
Key Definitions:

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

Joint Frequency: The count in each individual cell of the table.

Marginal Frequency: The totals for each row and column, found in the margins of the table.

Joint Relative Frequency: The proportion of the grand total represented by each individual cell.

Marginal Relative Frequency: The proportion of the grand total represented by each row/column total.

Conditional Relative Frequency: The proportion of one category within a specific subset of another category.

Two-Way Table Analysis Strategy:
  1. Organize Data: Place categorical data in rows and columns
  2. Complete Table: Fill in all cells including row/column totals
  3. Calculate Frequencies: Find joint, marginal, and conditional frequencies
  4. Interpret Results: Analyze patterns and relationships between variables
  5. Draw Conclusions: Use frequencies to make data-driven statements
Tip 1: Always verify that row totals equal column totals and both equal the grand total.
Tip 2: Joint relative frequencies sum to 1 (or 100%) across the entire table.
Tip 3: Conditional relative frequencies sum to 1 (or 100%) within each group.
Common Applications: Survey analysis, market research, demographic studies, medical studies, educational assessments.
Data Types: Categorical variables only (nominal or ordinal), not quantitative data.
Essential Rules:

• Table Completeness: Every cell, row total, column total, and grand total must be filled

• Consistency Check: Sum of row totals = Sum of column totals = Grand total

• Relative Frequency: Joint Relative Frequency = Cell Value ÷ Grand Total

• Conditional Frequency: Conditional Relative Frequency = Joint Frequency ÷ Relevant Marginal Frequency

• Probability Interpretation: Relative frequencies can be interpreted as probabilities

Solution: Exercises 4 to 5
4 Association Detection
Exercise 4
A study examined the relationship between studying for a test and passing it. Of 150 students, 90 studied and 60 didn't. Of those who studied, 80 passed and 10 failed. Of those who didn't study, 30 passed and 30 failed. Complete the table and determine if there's an association between studying and passing.
Definition:

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

Setup
Create table
Fill
Complete table
Analyze
Compare conditional frequencies
Step 1: Create and fill the two-way table
Passed Failed Total
Studied 80 10 90
Did Not Study 30 30 60
Total 110 40 150
Step 2: Calculate conditional relative frequencies

Pass rate for those who studied: 80/90 = 0.889 = 88.9%

Pass rate for those who didn't study: 30/60 = 0.50 = 50%

Step 3: Compare conditional frequencies

Students who studied have an 88.9% pass rate, while those who didn't study have only a 50% pass rate.

Step 4: Determine association

Since 88.9% ≠ 50%, there appears to be a strong positive association between studying and passing the test.

Step 5: Conclusion

Students who studied were almost twice as likely to pass the test compared to those who didn't study, indicating a strong positive association.

Studying: 88.9% pass rate | Not studying: 50% pass rate → Strong association
Final answer:

There is a strong positive association between studying and passing the test. Students who studied had an 88.9% pass rate compared to only 50% for those who didn't study. The conditional relative frequencies show a significant difference, indicating association.

Applied rules:

• Association Detection: Compare conditional relative frequencies between groups

• Strong Association: Large differences in conditional frequencies

• No Association: Conditional frequencies approximately equal

5 Real-World Application
Exercise 5
A restaurant surveyed customers about their satisfaction (Satisfied or Dissatisfied) and whether they received a promotional offer (Yes or No). Of 400 customers, 250 received offers. Of those who received offers, 200 were satisfied. Of those who didn't receive offers, 120 were satisfied. Calculate all relative frequencies and determine if there's an association.
Definition:

Statistical Association: A relationship between two variables where the conditional distributions differ significantly from the marginal distributions.

Table
Create complete table
RelFreq
Calculate all types
Assoc
Compare conditional freq
Step 1: Complete the two-way table
Satisfied Dissatisfied Total
Received Offer 200 50 250
Did Not Receive Offer 120 30 150
Total 320 80 400
Step 2: Calculate joint relative frequencies

Received offer and satisfied: 200/400 = 0.50 = 50%

Received offer and dissatisfied: 50/400 = 0.125 = 12.5%

No offer and satisfied: 120/400 = 0.30 = 30%

No offer and dissatisfied: 30/400 = 0.075 = 7.5%

Step 3: Calculate conditional relative frequencies

Satisfaction rate for those who received offers: 200/250 = 0.80 = 80%

Satisfaction rate for those who didn't receive offers: 120/150 = 0.80 = 80%

Step 4: Determine association

Both groups have the same satisfaction rate (80%), suggesting no association between receiving an offer and customer satisfaction.

Step 5: Verify with overall satisfaction rate

Overall satisfaction rate: 320/400 = 0.80 = 80%. Since conditional rates equal the overall rate, there's no association.

Offer group: 80% satisfied | No offer group: 80% satisfied → No association
Final answer:

There is no association between receiving a promotional offer and customer satisfaction. Both groups have the same 80% satisfaction rate, which also equals the overall satisfaction rate of 80%. The promotional offers did not impact satisfaction levels.

Applied rules:

• Association Test: Compare conditional frequencies to marginal frequencies

• No Association: Conditional frequencies approximately equal marginal frequencies

• Independence: When conditional probabilities equal marginal probabilities

Comprehensive Summary: Two-Way Tables and Relative Frequencies
\text{Relative Frequency} = \frac{\text{Frequency}}{\text{Total}}
Basic Formula
Key Definitions:

Two-Way Table: A table that displays the frequency distribution of two categorical variables, allowing for analysis of their relationship.

Joint Frequency: The count in each individual cell of the table representing occurrences of both categories simultaneously.

Marginal Frequency: The totals for each row and column, found in the margins of the table, representing occurrences of one category regardless of the other.

Joint Relative Frequency: The proportion of the grand total represented by each individual cell (Joint Frequency ÷ Grand Total).

Marginal Relative Frequency: The proportion of the grand total represented by each row or column total (Marginal Frequency ÷ Grand Total).

Conditional Relative Frequency: The proportion of one category within a specific subset of another category (Joint Frequency ÷ Relevant Marginal Frequency).

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

Complete Analysis Process:
  1. Table Construction: Organize categorical data into rows and columns
  2. Table Completion: Fill in all cells and calculate row/column totals
  3. Joint Frequencies: Record the count in each cell
  4. Marginal Frequencies: Calculate row and column totals
  5. Relative Frequencies: Convert to proportions or percentages
  6. Conditional Analysis: Calculate conditional frequencies to detect associations
  7. Interpretation: Draw conclusions about relationships between variables
Tip 1: Always check that row totals equal column totals and both equal the grand total.
Tip 2: Joint relative frequencies across the entire table sum to 1 (or 100%).
Tip 3: Conditional relative frequencies sum to 1 (or 100%) within each grouping.
Tip 4: To detect association, compare conditional frequencies between different groups.
Common Applications: Market research, medical studies, educational assessments, survey analysis, quality control, social sciences.
Data Requirements: Two categorical variables only (not quantitative), finite number of categories.
Essential Formulas and Rules:

Frequency Calculations:

• Joint Relative Frequency: Cell Value ÷ Grand Total

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

• Conditional Relative Frequency: Joint Frequency ÷ Relevant Marginal Frequency

Association Detection:

• Strong Association: Large differences in conditional frequencies between groups

• No Association: Conditional frequencies approximately equal between groups

• Independence: Conditional probabilities equal marginal probabilities

Example Progression

Simple Table: 2×2 table with basic counts

Joint Relative Freq: Each cell ÷ total (shows individual probability)

Marginal Relative Freq: Row/col totals ÷ total (shows category probability)

Conditional Freq: Joint ÷ marginal (shows probability given condition)

Association Test: Compare conditional frequencies between groups

Real-World Application: Use for decision-making and predictions

Advanced Applications and Problem-Solving Strategies
P(A|B) = \frac{P(A \cap B)}{P(B)}
Conditional Probability
Advanced Concepts:

Independence: Two variables are independent if P(A|B) = P(A), meaning knowing B provides no information about A.

Chi-Square Test: A statistical test to determine if observed frequencies significantly differ from expected frequencies under independence.

Expected Frequencies: Under independence assumption, expected frequency = (row total × column total) ÷ grand total.

Advanced Problem-Solving Steps:
  1. Data Organization: Systematically arrange categorical data in table format
  2. Pattern Recognition: Look for trends and potential associations
  3. Statistical Analysis: Calculate various types of relative frequencies
  4. Hypothesis Testing: Assess strength of associations
  5. Conclusion Drawing: Make evidence-based statements about relationships
  6. Application: Use findings for predictions and decision-making
Tip 1: When comparing conditional frequencies, look for differences greater than 10-15% to indicate potential association.
Tip 2: Always consider sample size - larger samples provide more reliable results.
Tip 3: Remember that association does not imply causation - correlation is not causation.
Tip 4: Consider lurking variables that might explain apparent associations.
Limitations: Cannot establish causation, assumes representative sampling, may miss complex relationships.
Best Practices: Ensure adequate sample size, consider confounding variables, validate findings with additional data.
Critical Success Factors:

• Accurate Data Entry: Ensure all table values are correct and complete

• Proper Calculations: Use correct denominators for different types of relative frequencies

• Meaningful Interpretation: Connect statistical results to real-world context

• Appropriate Conclusions: Avoid overstating the strength of associations

• Context Consideration: Account for relevant external factors

• Clear Communication: Present findings in accessible language

Questions & Answers

Question: What's the difference between joint, marginal, and conditional relative frequencies? How do I know which one to use?

Answer: Each type serves a different purpose:

  • Joint Relative Frequency: Shows the probability of both events happening together (cell ÷ grand total). Use when you want to know the likelihood of a specific combination.
  • Marginal Relative Frequency: Shows the probability of a single event regardless of the other variable (row/column total ÷ grand total). Use when you want the overall probability of one category.
  • Conditional Relative Frequency: Shows the probability of one event given that another has occurred (joint ÷ marginal). Use when you want to know how one variable affects another.

Use conditional frequencies when exploring relationships or associations between variables. Use marginal frequencies for overall probabilities. Use joint frequencies to understand specific combinations.

Question: How do I determine if there's an association between two variables using a two-way table?

Answer: To determine association:

  1. Calculate conditional relative frequencies for each category of one variable
  2. Compare these conditional frequencies across the categories
  3. If the conditional frequencies are significantly different, there's an association
  4. If the conditional frequencies are approximately equal, there's no association

For example, if 80% of Group A has Characteristic X but only 30% of Group B has Characteristic X, there's likely an association. The larger the difference in conditional frequencies, the stronger the association.

Remember: association does not imply causation!

Question: Why do we need to learn about relative frequencies when we already have regular frequencies?

Answer: Relative frequencies are essential because they allow for fair comparisons:

  • Standardization: Convert raw counts to proportions that account for different group sizes
  • Comparison: Compare groups of different sizes meaningfully
  • Probability: Relative frequencies approximate probabilities in the population
  • Patterns: Easier to spot trends and relationships in the data

For example, if Group A has 10 successes out of 20 trials and Group B has 100 successes out of 200 trials, both have the same success rate (50%) despite very different raw numbers. Relative frequencies reveal this similarity.

Regular frequencies tell us counts, but relative frequencies tell us rates and probabilities.