Solved Exercises on Segmented Bar Graphs

Master segmented bar graphs: constructing, interpreting, and analyzing associations between categorical variables through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Student Transportation
Exercise 1
A survey of 200 students classified transportation method by grade level. Create a segmented bar graph showing the relative frequencies for each grade level. 30 freshmen take the bus, 20 walk; 40 sophomores take the bus, 10 walk; 25 juniors take the bus, 35 walk; 20 seniors take the bus, 20 walk.
Definition:

Segmented Bar Graph: A bar graph where each bar is divided into segments representing subcategories, showing relative frequencies.

Relative Frequency: Proportion of each category within a group.

Method for creating segmented bar graphs:
  1. Organize data in a two-way table
  2. Calculate relative frequencies for each group
  3. Create bars of equal height (100%)
  4. Divide each bar into segments based on relative frequencies
  5. Label segments and include a legend
Grade Level Bus Walk Total freshmen 30 20 50 sophomores 40 10 50 juniors 25 35 60 seniors 20 20 40
Step 1: Calculate relative frequencies for each grade level

freshmen: Bus = 30/50 = 0.60 (60%), Walk = 20/50 = 0.40 (40%)

sophomores: Bus = 40/50 = 0.80 (80%), Walk = 10/50 = 0.20 (20%)

juniors: Bus = 25/60 = 0.417 (41.7%), Walk = 35/60 = 0.583 (58.3%)

seniors: Bus = 20/40 = 0.50 (50%), Walk = 20/40 = 0.50 (50%)

Step 2: Create segmented bar representation

Each bar will be 100% height with segments representing the relative frequencies.

Step 3: Analyze patterns

Sophomores show highest bus usage (80%)

Juniors show highest walking rate (58.3%)

Seniors show equal distribution between bus and walking

Step 4: Draw conclusions

Transportation preferences vary significantly by grade level.

Walking increases as students get older (from 20% to 58.3%).

freshmen
Bus: 60%
Walk: 40%
sophomores
Bus: 80%
Walk: 20%
juniors
Bus: 41.7%
Walk: 58.3%
seniors
Bus: 50%
Walk: 50%
Segmented bar graph shows varying transportation preferences by grade level
Final answer:

The segmented bar graph reveals that transportation preferences differ significantly by grade level.

Sophomores rely most heavily on the bus (80%), while juniors prefer walking (58.3%).

Applied rules:

• Relative Frequency: Each segment = (category count ÷ group total)

• Bar Height: All bars equal 100% for comparison

• Pattern Recognition: Compare segment sizes across bars

2 Lunch Preference Analysis
Exercise 2
A study of 300 employees examined lunch preferences by department. Marketing: 30 eat at desk, 20 eat in cafeteria. Sales: 40 eat at desk, 30 eat in cafeteria. IT: 20 eat at desk, 40 eat in cafeteria. Operations: 30 eat at desk, 90 eat in cafeteria. Create a segmented bar graph and analyze the association between department and lunch location.
Definition:

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

Independence: No relationship exists between variables.

Department Desk Cafeteria Total Marketing 30 20 50 Sales 40 30 70 IT 20 40 60 Operations 30 90 120
Step 1: Calculate relative frequencies for each department

Marketing: Desk = 30/50 = 0.60 (60%), Cafeteria = 20/50 = 0.40 (40%)

Sales: Desk = 40/70 = 0.57 (57%), Cafeteria = 30/70 = 0.43 (43%)

IT: Desk = 20/60 = 0.33 (33%), Cafeteria = 40/60 = 0.67 (67%)

Operations: Desk = 30/120 = 0.25 (25%), Cafeteria = 90/120 = 0.75 (75%)

Step 2: Create segmented bar representation

Each bar represents a department with segments showing lunch preferences.

Step 3: Analyze association patterns

Marketing and Sales: Higher proportion eating at desk

IT and Operations: Higher proportion eating in cafeteria

Operations has the highest cafeteria usage (75%)

Step 4: Determine if association exists

The conditional relative frequencies differ significantly across departments.

Knowing the department provides information about lunch location preference.

Therefore, there is an association between department and lunch location.

Marketing
Desk: 60%
Caf: 40%
Sales
Desk: 57%
Caf: 43%
IT
Desk: 33%
Caf: 67%
Operations
Desk: 25%
Caf: 75%
Association detected: Department influences lunch location preference
Final answer:

There is a clear association between department and lunch location preference.

Marketing and Sales employees prefer eating at their desks, while IT and Operations employees prefer the cafeteria.

Operations has the highest cafeteria usage (75%).

Applied rules:

• Association Detection: Compare conditional relative frequencies

• Independence Test: Similar frequencies suggest independence

• Segmented Bar Graph: Equal height bars enable comparison

3 Device Preference Study
Exercise 3
A survey of 400 consumers asked about their preferred device for online shopping by age group. 18-30: 80 prefer smartphone, 40 prefer tablet, 30 prefer laptop. 31-50: 60 prefer smartphone, 50 prefer tablet, 40 prefer laptop. 51+: 40 prefer smartphone, 30 prefer tablet, 70 prefer laptop. Create a segmented bar graph and determine if there's an association between age and device preference.
Definition:

Multi-category Segmented Bar: Bars divided into multiple segments representing different categories.

Age Cohort: Group of people sharing similar age characteristics.

Age Group Smartphone Tablet Laptop Total 18-30 80 40 30 150 31-50 60 50 40 150 51+ 40 30 70 140
Step 1: Calculate relative frequencies for each age group

18-30: Smartphone = 80/150 = 0.533 (53.3%), Tablet = 40/150 = 0.267 (26.7%), Laptop = 30/150 = 0.200 (20.0%)

31-50: Smartphone = 60/150 = 0.400 (40.0%), Tablet = 50/150 = 0.333 (33.3%), Laptop = 40/150 = 0.267 (26.7%)

51+: Smartphone = 40/140 = 0.286 (28.6%), Tablet = 30/140 = 0.214 (21.4%), Laptop = 70/140 = 0.500 (50.0%)

Step 2: Create segmented bar representation

Each bar represents an age group with three segments for device preferences.

Step 3: Analyze patterns by age group

18-30: Strong smartphone preference (53.3%)

31-50: Balanced preferences, slight smartphone preference (40%)

51+: Strong laptop preference (50%), lowest smartphone usage (28.6%)

Step 4: Assess association

Device preferences clearly vary by age group.

Younger people favor smartphones, older people favor laptops.

There is a strong association between age and device preference.

18-30
S: 53.3%
T: 26.7%
L: 20.0%
31-50
S: 40.0%
T: 33.3%
L: 26.7%
51+
S: 28.6%
T: 21.4%
L: 50.0%
Strong association: Age significantly influences device preference
Final answer:

There is a strong association between age and device preference for online shopping.

Smartphone preference decreases with age (53.3% → 40% → 28.6%).

Laptop preference increases with age (20% → 26.7% → 50%).

Applied rules:

• Multi-category Segments: Divide bars into multiple segments

• Pattern Recognition: Look for trends across categories

• Association Strength: Greater differences indicate stronger association

Segmented Bar Graphs: Core Concepts
\text{Relative Frequency} = \frac{\text{Category Count}}{\text{Group Total}}
Relative Frequency Formula
Relative Freq.
Proportion
Within each group
Equal Height
100%
For comparison
Segments
Subcategories
Within groups
Key definitions:

Segmented Bar Graph: A bar graph where each bar is divided into segments representing subcategories.

Relative Frequency: The proportion of each category within a specific group.

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

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

Equal Height Bars: All bars have the same height (usually 100%) to enable comparison of relative frequencies.
Association Detection: Compare segment sizes across different bars to identify relationships.
Tip 1: Calculate relative frequencies separately for each group.
Tip 2: Use consistent colors for the same subcategories across all bars.
Tip 3: Look for differences in segment proportions to detect associations.
Essential formulas:

• Relative Frequency = Category Count ÷ Group Total

• Segment Size = Relative Frequency × 100% (for percentage bars)

• Association exists when conditional frequencies differ significantly

• Independence exists when conditional frequencies are similar

Solution: Exercises 4 to 5
4 Housing Preference Survey
Exercise 4
A housing survey of 500 people categorized living arrangements by income level. Low income: 120 live in apartments, 80 live in houses, 50 live in shared housing. Middle income: 90 live in apartments, 100 live in houses, 10 live in shared housing. High income: 40 live in apartments, 110 live in houses, 0 live in shared housing. Create a segmented bar graph and analyze the association.
Definition:

Income Level: Categorical variable with three levels (low, middle, high).

Living Arrangement: Categorical variable with three options (apartment, house, shared).

Income Level Apartment House Shared Total Low 120 80 50 250 Middle 90 100 10 200 High 40 110 0 150
Step 1: Calculate relative frequencies for each income level

Low income: Apartment = 120/250 = 0.48 (48%), House = 80/250 = 0.32 (32%), Shared = 50/250 = 0.20 (20%)

Middle income: Apartment = 90/200 = 0.45 (45%), House = 100/200 = 0.50 (50%), Shared = 10/200 = 0.05 (5%)

High income: Apartment = 40/150 = 0.267 (26.7%), House = 110/150 = 0.733 (73.3%), Shared = 0/150 = 0.0 (0%)

Step 2: Create segmented bar representation

Each bar represents an income level with segments for different housing types.

Step 3: Analyze patterns by income level

Low income: Highest shared housing usage (20%), balanced between apartment and house

Middle income: Nearly equal apartment and house, very little shared housing (5%)

High income: Overwhelming house preference (73.3%), no shared housing

Step 4: Determine association strength

There is a clear association between income and housing type.

As income increases, preference shifts from shared housing to houses.

High-income earners never choose shared housing.

Low Income
A: 48%
H: 32%
S: 20%
Middle Income
A: 45%
H: 50%
S: 5%
High Income
A: 26.7%
H: 73.3%
S: 0%
Strong association: Income level significantly influences housing choice
Final answer:

There is a strong association between income level and housing choice.

Low-income earners prefer apartments (48%) and shared housing (20%).

High-income earners overwhelmingly prefer houses (73.3%) and never choose shared housing.

Applied rules:

• Relative Frequency Calculation: Category count ÷ Group total

• Association Detection: Compare conditional frequencies across groups

• Pattern Recognition: Look for systematic changes in segment proportions

5 Fashion Preference Analysis
Exercise 5
A fashion retailer surveyed 600 customers about clothing style preference by gender. Male: 100 prefer casual, 80 prefer formal, 70 prefer athletic wear. Female: 90 prefer casual, 110 prefer formal, 150 prefer athletic wear. Create a segmented bar graph and determine if there's an association between gender and clothing style preference.
Definition:

Clothing Style: Categorical variable with three options (casual, formal, athletic).

Gender: Categorical variable with two levels (male, female).

Gender Casual Formal Athletic Total Male 100 80 70 250 Female 90 110 150 350
Step 1: Calculate relative frequencies for each gender

Male: Casual = 100/250 = 0.40 (40%), Formal = 80/250 = 0.32 (32%), Athletic = 70/250 = 0.28 (28%)

Female: Casual = 90/350 = 0.257 (25.7%), Formal = 110/350 = 0.314 (31.4%), Athletic = 150/350 = 0.429 (42.9%)

Step 2: Create segmented bar representation

Each bar represents a gender with segments for different clothing styles.

Step 3: Analyze patterns by gender

Male: Highest casual preference (40%), followed by formal (32%) and athletic (28%)

Female: Highest athletic preference (42.9%), followed by formal (31.4%) and casual (25.7%)

Significant differences in style preferences between genders

Step 4: Assess association

There is a clear association between gender and clothing style preference.

Males prefer casual wear more than females (40% vs 25.7%)

Females prefer athletic wear more than males (42.9% vs 28%)

Male
C: 40%
F: 32%
A: 28%
Female
C: 25.7%
F: 31.4%
A: 42.9%
Association detected: Gender influences clothing style preference
Final answer:

There is an association between gender and clothing style preference.

Males prefer casual wear significantly more than females (40% vs 25.7%).

Females prefer athletic wear significantly more than males (42.9% vs 28%).

Formal wear preferences are similar between genders.

Applied rules:

• Relative Frequency Calculation: Each segment = Category count ÷ Group total

• Association Detection: Compare segment sizes across bars

• Pattern Analysis: Look for systematic differences in preferences

Segmented Bar Graphs: Comprehensive Summary

Complete Summary: Segmented Bar Graphs

Core Concepts

Segmented Bar Graph: A bar graph where each bar is divided into segments representing subcategories.

Relative Frequency: Proportion of each subcategory within a group.

Conditional Relative Frequency: Frequency of subcategory given a specific group.

Equal Height Bars: All bars have same height (usually 100%) for comparison.

Key Properties

Comparison Tool: Enables comparison of subcategory proportions across different groups.

Association Detection: Different segment sizes across bars indicate association.

Visual Pattern Recognition: Easy identification of trends and differences.

Standardized Format: All bars equal 100% for fair comparison.

Construction Process

Step 1: Organize data in a two-way table format.

Step 2: Calculate relative frequencies for each group separately.

Step 3: Create bars of equal height (100%).

Step 4: Divide each bar into segments based on relative frequencies.

Step 5: Label segments and include a legend.

Association Analysis

Association Present: Different segment proportions across bars.

Independence: Similar segment proportions across bars.

Strength: Greater differences indicate stronger association.

Direction: Identify which groups prefer which categories.

Detailed Definitions:

Segmented Bar Graph: A graphical representation showing the distribution of a categorical variable within each category of another variable.

Relative Frequency: The proportion of observations in a particular category relative to the total number of observations in that group.

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

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

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

Systematic Analysis Method:
  1. Data Organization: Arrange data in a two-way table.
  2. Relative Frequency Calculation: Calculate for each group separately.
  3. Graph Construction: Create segmented bars of equal height.
  4. Pattern Recognition: Compare segment sizes across bars.
  5. Association Assessment: Determine if variables are related.
Memory Tip: "Seg" = segments, "mented" = portions of a whole.
Common Mistake: Forgetting to calculate relative frequencies separately for each group.
Efficiency Tip: Use consistent colors for the same subcategories across all bars.
Analysis Tip: Look for systematic changes in segment proportions across groups.
Key Applications: Survey analysis, market research, demographic studies, preference analysis.
Important Note: Association does not imply causation; correlation doesn't prove cause-and-effect.
Critical Formulas to Remember:

• Relative Frequency = Category Count ÷ Group Total

• Segment Size = Relative Frequency × 100% (for percentage bars)

• Association exists when conditional frequencies differ significantly

• Independence exists when conditional frequencies are similar

Questions & Answers

Question: What's the difference between a regular bar graph and a segmented bar graph? When should I use each?

Answer: The key differences are:

Regular Bar Graph:

  • Shows frequency or count for each category of ONE variable
  • Each bar represents a single category
  • Used for comparing magnitudes across categories
  • Example: Number of students in each grade level

Segmented Bar Graph:

  • Shows the distribution of ONE variable within categories of ANOTHER variable
  • Each bar is divided into segments representing subcategories
  • Used for comparing proportions across groups
  • Example: Transportation method preferences by grade level

Use segmented bar graphs when you want to compare the composition or relative frequencies of subcategories across different groups.

Question: How do I know if there's an association between variables using a segmented bar graph? What exactly should I look for?

Answer: To detect association in segmented bar graphs:

Look For:

  • Different segment proportions: If segments have different sizes across bars
  • Systematic patterns: Consistent changes in segment sizes across groups
  • Contrasting preferences: One group strongly favors one category while another favors a different category

Examples:

  • Association: Young people prefer smartphones (large segment), old people prefer laptops (large segment)
  • Independence: All groups have similar proportions of smartphone, tablet, and laptop users

If the conditional relative frequencies (segment sizes) differ significantly across the groups, there's an association. If they're similar, the variables appear independent.

Question: In Exercise 5, you said there's an association between gender and clothing style, but does that mean gender causes people to prefer certain styles?

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:

Gender might correlate with other factors like social norms, lifestyle, occupation, or cultural expectations that influence clothing preferences. These could be the actual causes.

Establishing Causation:

  • Requires controlled experiments
  • Must eliminate confounding variables
  • Needs to establish temporal order (cause before effect)
  • Should show a dose-response relationship

We can say gender is associated with clothing style preferences, but we cannot conclude gender causes these preferences without a controlled experiment. The association might reflect cultural norms, social expectations, or other underlying factors.