Solved Exercises on Segmented Bar Graphs

Master segmented bar graphs: construction, interpretation, comparison with two-way tables, and statistical analysis through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Basic Segmented Bar Construction
Exercise 1
A survey was conducted to determine preferences for transportation methods among different age groups. The results are shown in the two-way table below:

Car Public Transit Bicycle Total
18-25 40 50 10 100
26-40 60 30 10 100
41-60 70 20 10 100
Total 170 100 30 300

Construct a segmented bar graph to represent this data.
Definition:

Segmented Bar Graph: A bar graph where each bar is divided into segments representing subcategories of a categorical variable. Each segment's length corresponds to the proportion of that subcategory within the main category.

Also Known As: Stacked bar graph, proportional bar chart

Segmented Bar Graph Construction Method:
  1. Convert each row of the two-way table to percentages of the row total
  2. Create a horizontal bar for each category (age group)
  3. Divide each bar into segments proportional to the percentages
  4. Use distinct colors for each subcategory
  5. Add labels showing percentages
Step 1: Convert to Percentages

For Age Group 18-25:

  • Car: 40/100 = 40%
  • Public Transit: 50/100 = 50%
  • Bicycle: 10/100 = 10%

For Age Group 26-40:

  • Car: 60/100 = 60%
  • Public Transit: 30/100 = 30%
  • Bicycle: 10/100 = 10%

For Age Group 41-60:

  • Car: 70/100 = 70%
  • Public Transit: 20/100 = 20%
  • Bicycle: 10/100 = 10%
Step 2: Create Segmented Bars
18-25 Age Group 100%
Car (40%)
Public Transit (50%)
Bicycle (10%)
26-40 Age Group 100%
Car (60%)
Public Transit (30%)
Bicycle (10%)
41-60 Age Group 100%
Car (70%)
Public Transit (20%)
Bicycle (10%)
Step 3: Interpret the Pattern

Observations from the segmented bar graph:

  • Car usage increases with age (40% → 60% → 70%)
  • Public transit usage decreases with age (50% → 30% → 20%)
  • Bicycle usage remains constant across age groups (10%)
The segmented bar graph effectively shows the changing transportation preferences across age groups, revealing a clear association between age and preferred transportation method.
Final answer:

The segmented bar graph shows that car usage increases and public transit usage decreases as age increases, while bicycle usage remains constant. This suggests an association between age group and transportation preference.

Applied rules:

• Percentage Conversion: Each segment represents (cell count)/(row total) × 100%

• Segment Addition: All segments in a bar must sum to 100%

• Color Consistency: Same subcategory uses same color across all bars

• Pattern Recognition: Look for consistent directional changes across bars

2 Comparing Segmented Bars to Two-Way Tables
Exercise 2
The following two-way table shows the relationship between education level and employment status:

Employed Unemployed Not in Labor Force Total
High School 120 30 50 200
College 200 20 30 250
Graduate 150 10 15 175
Total 470 60 95 625

Create a segmented bar graph and compare the insights gained from the graph versus the raw table.
Definition:

Visual vs. Numerical Analysis: Different data representations highlight different aspects of the relationship between variables. Segmented bar graphs emphasize proportional relationships, while two-way tables provide exact counts.

Step 1: Convert to Percentages

For High School:

  • Employed: 120/200 = 60%
  • Unemployed: 30/200 = 15%
  • Not in Labor Force: 50/200 = 25%

For College:

  • Employed: 200/250 = 80%
  • Unemployed: 20/250 = 8%
  • Not in Labor Force: 30/250 = 12%

For Graduate:

  • Employed: 150/175 = 85.7%
  • Unemployed: 10/175 = 5.7%
  • Not in Labor Force: 15/175 = 8.6%
Step 2: Create Segmented Bars
High School 100%
Employed (60%)
Unemployed (15%)
Not in LF (25%)
College 100%
Employed (80%)
Unemployed (8%)
Not in LF (12%)
Graduate 100%
Employed (85.7%)
Unemployed (5.7%)
Not in LF (8.6%)
Step 3: Compare Insights

From Two-Way Table:

  • Raw counts: College graduates have the highest employment count (150)
  • Exact numbers for planning purposes
  • Can calculate marginal totals

From Segmented Bar Graph:

  • Clear pattern: Employment rate increases with education level (60% → 80% → 85.7%)
  • Unemployment rate decreases with education level (15% → 8% → 5.7%)
  • Visual trend is immediately apparent
Step 4: Analyze Association

The segmented bar graph makes the association between education level and employment status much clearer than the raw table. The consistent pattern of increasing employment and decreasing unemployment with higher education levels is visually obvious.

Segmented bar graphs reveal proportional patterns that may be hidden in raw count data, making association detection easier.
Final answer:

The segmented bar graph clearly shows a positive association between education level and employment status. Higher education levels correspond to higher employment rates and lower unemployment rates. While the table shows raw numbers, the graph highlights the proportional relationships and trends.

Applied rules:

• Complementary Representation: Tables show exact counts, graphs show proportional relationships

• Pattern Recognition: Graphs make trends more visible than numerical tables

• Data Transformation: Convert counts to percentages for proportional representation

• Association Visualization: Segmented bars help identify associations between categorical variables

3 Horizontal vs Vertical Segmented Bars
Exercise 3
Using the same data from Exercise 2, create both horizontal and vertical segmented bar graphs. Discuss the advantages and disadvantages of each orientation.

Employed Unemployed Not in Labor Force Total
High School 120 30 50 200
College 200 20 30 250
Graduate 150 10 15 175

Create and compare horizontal and vertical segmented bar graphs.
Definition:

Horizontal Segmented Bar Graph: Bars extend horizontally from left to right, with categories labeled vertically.

Vertical Segmented Bar Graph: Bars extend vertically from bottom to top, with categories labeled horizontally.

Step 1: Horizontal Segmented Bar Graph

Advantages:

  • Category labels have more space for longer names
  • Easier to read percentages within each bar
  • Better for many categories

Disadvantages:

  • Takes up more horizontal space
  • Less familiar to some viewers
High School 100%
Employed (60%)
Unemployed (15%)
Not in LF (25%)
College 100%
Employed (80%)
Unemployed (8%)
Not in LF (12%)
Graduate 100%
Employed (85.7%)
Unemployed (5.7%)
Not in LF (8.6%)
Step 2: Vertical Segmented Bar Graph Concept

For vertical segmented bars, the process is similar but with bars extending upward:

  • Each bar represents one education level
  • Segments stack vertically
  • Height represents 100% for each category

Advantages:

  • More familiar to viewers
  • Takes less horizontal space
  • Easier to compare total heights

Disadvantages:

  • Less space for category labels
  • Harder to read individual segment percentages
Step 3: When to Use Each Orientation

Use Horizontal:

  • Many categories (more than 5-6)
  • Long category names
  • Need to read percentages easily

Use Vertical:

  • Few categories (less than 5-6)
  • Short category names
  • Viewer expects traditional bar chart format
Step 4: Decision for This Data

For the education level data with 3 categories and medium-length labels, either orientation works well. However, horizontal bars allow for easier reading of the percentages within each bar, making them slightly preferable for this dataset.

Horizontal segmented bars are preferred when reading individual percentages is important, while vertical bars are more familiar but may be harder to read for complex data.
Final answer:

For this data, horizontal segmented bars are recommended because they allow easier reading of individual percentages within each category. Both orientations effectively show the association between education level and employment status, with higher education levels showing higher employment rates.

Applied rules:

• Orientation Selection: Choose based on number of categories and label length

• Readability: Horizontal bars are better for reading individual segment values

• Familiarity: Vertical bars are more conventional but may be less practical

• Space Consideration: Horizontal takes more width, vertical takes more height

Key Concepts and Statistical Measures for Segmented Bar Graphs
\text{Segment Percentage} = \frac{\text{Cell Count}}{\text{Row Total}} \times 100\%
Segment Percentage Formula
Segment Width
\text{Width} = \frac{\text{Value}}{\text{Total}} \times 100\%
For each segment
Bar Total
\sum \text{Segment Widths} = 100\%
All segments sum to 100%
Comparison Index
CI = \left|\frac{p_1 - p_2}{\sqrt{\frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2}}}\right|
For comparing proportions
Key definitions:

Segmented Bar Graph: A visual representation where each bar is divided into segments that represent parts of a whole, showing the relative contribution of each category.

Stacked Bar Graph: Another term for segmented bar graph, emphasizing that segments are stacked on top of each other (vertical) or side by side (horizontal).

Proportional Representation: Each segment's size represents its proportion of the total for that bar, making comparisons across categories easier.

Relative Frequency: The proportion of observations in each subcategory relative to the total in the main category.

Conditional Distribution: The distribution of one variable given a specific value of another variable, which is what segmented bar graphs visualize.

Segmented Bar Graph Construction Methodology:
  1. Data Preparation: Organize data in a two-way table format
  2. Percentage Conversion: Convert each row to percentages of the row total
  3. Orientation Selection: Choose horizontal or vertical based on data characteristics
  4. Color Scheme: Assign distinct colors to each subcategory
  5. Bar Creation: Create bars with segments proportional to percentages
  6. Labeling: Add clear labels and percentages for each segment
  7. Legend: Include a legend explaining color assignments
  8. Analysis: Interpret patterns and associations
Tip 1: Always ensure segments in each bar sum to 100% for accuracy.
Tip 2: Use contrasting colors to make segments easily distinguishable.
Tip 3: Order segments consistently across all bars for easier comparison.
Tip 4: Add percentage labels to make values immediately readable.
Tip 5: For many categories, horizontal bars are more readable than vertical ones.
Common errors: Incorrect percentage calculations, inconsistent color schemes, missing legends, misaligned segments, failing to verify 100% sums.
Exam preparation: Practice converting tables to percentages, understand association patterns, know when to use horizontal vs vertical orientation.
Essential Formulas and Rules:

• Segment Percentage: (Cell Count / Row Total) × 100%

• Bar Total: Σ(Segment Percentages) = 100% for each bar

• Proportional Width: Segment width = (Percentage / 100) × Bar width

• Color Consistency: Same subcategory uses same color across all bars

• Label Accuracy: Include both category and percentage on each segment

Solution: Exercises 4 to 5
4 Advanced Color Coding and Pattern Recognition
Exercise 4
A market research company surveyed customer satisfaction across different store locations. The results are shown in the two-way table below:

Very Satisfied Satisfied Neutral Dissatisfied Very Dissatisfied Total
Downtown 45 35 15 4 1 100
Suburban 30 40 20 8 2 100
Rural 20 30 25 18 7 100
Total 95 105 60 30 10 300

Create a segmented bar graph with appropriate color coding and analyze the satisfaction patterns across locations.
Definition:

Color Coding Strategy: Systematic assignment of colors to represent different levels of a variable, especially useful for ordinal categorical variables like satisfaction levels.

Ordinal Variables: Categories that have a natural order (e.g., Very Satisfied > Satisfied > Neutral > Dissatisfied > Very Dissatisfied).

\text{Color Intensity} \propto \text{Satisfaction Level}
Color Coding Principle
Step 1: Convert to Percentages

For Downtown:

  • Very Satisfied: 45/100 = 45%
  • Satisfied: 35/100 = 35%
  • Neutral: 15/100 = 15%
  • Dissatisfied: 4/100 = 4%
  • Very Dissatisfied: 1/100 = 1%

For Suburban:

  • Very Satisfied: 30/100 = 30%
  • Satisfied: 40/100 = 40%
  • Neutral: 20/100 = 20%
  • Dissatisfied: 8/100 = 8%
  • Very Dissatisfied: 2/100 = 2%

For Rural:

  • Very Satisfied: 20/100 = 20%
  • Satisfied: 30/100 = 30%
  • Neutral: 25/100 = 25%
  • Dissatisfied: 18/100 = 18%
  • Very Dissatisfied: 7/100 = 7%
Step 2: Design Color Scheme

For satisfaction levels, use a gradient from green (positive) to red (negative):

  • Very Satisfied: Bright Green (#10b981)
  • Satisfied: Light Green (#34d399)
  • Neutral: Yellow (#f59e0b)
  • Dissatisfied: Light Red (#f87171)
  • Very Dissatisfied: Bright Red (#ef4444)
Step 3: Create Segmented Bars
Downtown Store 100%
Very Sat (45%)
Sat (35%)
Neutral (15%)
Dissat (4%)
Very Dissat (1%)
Suburban Store 100%
Very Sat (30%)
Sat (40%)
Neutral (20%)
Dissat (8%)
Very Dissat (2%)
Rural Store 100%
Very Sat (20%)
Sat (30%)
Neutral (25%)
Dissat (18%)
Very Dissat (7%)
Step 4: Analyze Patterns

Clear patterns emerge from the segmented bar graph:

  • Downtown Store: Highest satisfaction (75% satisfied or better), lowest dissatisfaction (5%)
  • Suburban Store: Moderate satisfaction (70% satisfied or better), moderate dissatisfaction (10%)
  • Rural Store: Lowest satisfaction (50% satisfied or better), highest dissatisfaction (25%)
Step 5: Draw Conclusions

The color-coded segmented bar graph makes the satisfaction trend immediately apparent: Downtown > Suburban > Rural in terms of customer satisfaction. The visual representation clearly shows that location affects customer satisfaction levels.

Downtown store has highest satisfaction (75% positive), Rural has lowest (50% positive). Location significantly affects customer satisfaction.
Final answer:

The segmented bar graph with appropriate color coding reveals a clear pattern: Downtown stores have the highest customer satisfaction (75% positive responses), followed by Suburban (70% positive), and Rural stores have the lowest satisfaction (50% positive). The visual representation makes this association between location and satisfaction level immediately apparent.

Applied rules:

• Ordinal Color Coding: Use color intensity to reflect natural ordering of categories

• Consistent Ordering: Maintain same segment order across all bars for easy comparison

• Pattern Recognition: Look for directional trends across categories

• Visual Impact: Effective color coding enhances pattern visibility

5 Comprehensive Analysis and Association Testing
Exercise 5
A comprehensive study examined the relationship between age group and technology adoption. The results from 600 participants are shown in the two-way table below:

Early Adopter Late Majority Laggard Total
18-29 80 15 5 100
30-49 60 30 10 100
50-64 40 40 20 100
65+ 10 45 45 100
Total 190 130 80 400

Create a segmented bar graph, analyze the association, and discuss the implications.
Definition:

Technology Adoption Lifecycle: Model describing how different population segments adopt new technologies over time, including Early Adopters, Late Majority, and Laggards.

Comprehensive Analysis: Multi-step examination combining visual representation, statistical calculation, and practical interpretation.

Step 1: Convert to Percentages

For Age 18-29:

  • Early Adopter: 80/100 = 80%
  • Late Majority: 15/100 = 15%
  • Laggard: 5/100 = 5%

For Age 30-49:

  • Early Adopter: 60/100 = 60%
  • Late Majority: 30/100 = 30%
  • Laggard: 10/100 = 10%

For Age 50-64:

  • Early Adopter: 40/100 = 40%
  • Late Majority: 40/100 = 40%
  • Laggard: 20/100 = 20%

For Age 65+:

  • Early Adopter: 10/100 = 10%
  • Late Majority: 45/100 = 45%
  • Laggard: 45/100 = 45%
Step 2: Create Segmented Bars
18-29 Age Group 100%
Early Adop (80%)
Late Major (15%)
Laggard (5%)
30-49 Age Group 100%
Early Adop (60%)
Late Major (30%)
Laggard (10%)
50-64 Age Group 100%
Early Adop (40%)
Late Major (40%)
Laggard (20%)
65+ Age Group 100%
Early Adop (10%)
Late Major (45%)
Laggard (45%)
Step 3: Analyze Association Strength

Compare conditional percentages to marginal percentages:

  • Marginal for Early Adopter: 190/400 = 47.5%
  • Conditionals: 18-29 (80%), 30-49 (60%), 50-64 (40%), 65+ (10%)
  • Large differences indicate strong association
Step 4: Quantify the Pattern

Age group strongly predicts technology adoption pattern:

  • Youngest group (18-29): 80% early adopters
  • Oldest group (65+): 45% laggards
  • Linear trend: Early adoption decreases with age
Step 5: Discuss Implications

Practical implications of this strong association:

  • Marketing strategies should target age-appropriate technology adoption stages
  • Product development should consider age-related adoption patterns
  • Training programs may need to focus more on older demographics
Strong negative association exists between age and early technology adoption. Younger groups are much more likely to be early adopters.
Final answer:

The segmented bar graph reveals a strong negative association between age and early technology adoption. The youngest group (18-29) has 80% early adopters, while the oldest group (65+) has only 10% early adopters and 45% laggards. This clear pattern demonstrates that age is a significant predictor of technology adoption behavior.

Applied rules:

• Association Strength: Larger differences between conditional and marginal percentages indicate stronger associations

• Pattern Consistency: Look for consistent directional changes across all categories

• Practical Significance: Consider real-world implications of identified associations

• Statistical vs. Practical: Both statistical significance and practical importance matter

Detailed Summary: Segmented Bar Graphs
\text{Segment Percentage} = \frac{\text{Cell Count}}{\text{Row Total}} \times 100\%
Core Formula
Key definitions:

Segmented Bar Graph: A visual representation where each bar is divided into segments representing subcategories of a categorical variable. Each segment's size corresponds to the proportion of that subcategory within the main category. Also known as stacked bar graphs.

Proportional Representation: A method of displaying data where the length or area of each segment represents its proportion relative to the whole, making it easy to compare parts of a whole across different categories.

Conditional Distribution: The distribution of one variable given a specific value of another variable. Segmented bar graphs visualize conditional distributions.

Relative Frequency: The proportion of observations in each subcategory relative to the total in the main category, expressed as a percentage.

Association Visualization: The process of using visual tools like segmented bar graphs to identify and understand relationships between categorical variables.

Complete Segmented Bar Graph Construction Process:
  1. Data Preparation: Organize data in a two-way table with clear row and column labels
  2. Percentage Conversion: Convert each row to percentages of the row total (each row should sum to 100%)
  3. Orientation Decision: Choose horizontal or vertical based on number of categories and label length
  4. Color Scheme Design: Select distinct colors for each subcategory, considering ordinal relationships if applicable
  5. Bar Creation: Create bars with segments proportional to calculated percentages
  6. Labeling: Add clear labels and percentages to each segment
  7. Legend Creation: Include a legend explaining color assignments
  8. Quality Check: Verify each bar sums to 100% and all segments are accurately represented
  9. Pattern Analysis: Examine the graph for trends, associations, and relationships
  10. Interpretation: Draw conclusions about the relationship between variables
Tip 1: Always verify that segments in each bar sum to 100% - this is crucial for accuracy.
Tip 2: Use consistent segment ordering across all bars to facilitate comparison.
Tip 3: For ordinal variables, use a color gradient that reflects the natural ordering.
Tip 4: Include both numerical percentages and clear labels on segments for maximum readability.
Tip 5: When comparing multiple categories, horizontal bars often provide better readability than vertical ones.
Tip 6: Use high-contrast colors to ensure accessibility and readability for all viewers.
Common errors: Incorrect percentage calculations leading to bars that don't sum to 100%, inconsistent color coding across bars, missing or unclear legends, misaligned segments, failing to verify accuracy of proportions, using too many categories that make the graph cluttered.
Exam preparation: Practice converting two-way tables to percentages, understand how to identify associations from segmented bar graphs, know when to use horizontal vs vertical orientation, master color coding strategies, be able to interpret patterns and draw conclusions about variable relationships.
Essential Formulas and Rules:

• Segment Percentage: (Cell Count / Row Total) × 100%

• Bar Total: Σ(Segment Percentages) = 100% for each bar

• Proportional Width: Segment width = (Percentage / 100) × Bar width

• Color Consistency: Same subcategory uses identical color across all bars

• Label Accuracy: Include both category name and percentage on each segment

• Association Detection: Look for systematic differences in segment patterns across bars

• Independence Check: If segment patterns are similar across all bars, variables may be independent

Segmented Bar Graph Construction
📊
Step 1: Data Organization
Arrange data in two-way table with explanatory variable as rows and response variable as columns
Rows: Main Categories
Columns: Subcategories
Step 2: Convert to Percentages
Transform each row to percentages of row total
Segment % = (Cell Count / Row Total) × 100
Step 3: Color Assignment
Assign distinct colors to each subcategory
Same color for same subcategory
Step 4: Bar Creation
Create bars with segments proportional to percentages
Each bar = 100% of its category
Step 5: Pattern Analysis
Compare segment patterns across bars for associations
Look for systematic differences
Step 6: Verification
Ensure each bar sums to 100% and segments are accurate
Accuracy = Σ(Segments) = 100%
Construction Process
1
Organize Data
2
Calculate %
3
Assign Colors
4
Create Bars
5
Analyze
6
Verify
Visual Pattern Recognition
Similar patterns across bars = Independence
Different patterns across bars = Association
Directional changes = Ordered relationship
Segmented bars reveal proportional relationships!

Questions & Answers

Question: How do I choose between horizontal and vertical segmented bar graphs? What factors should I consider?

Answer: The choice depends on several factors:

  • Number of Categories: For 5+ categories, horizontal bars are usually better as they provide more space for labels
  • Label Length: If category names are long, horizontal orientation allows for full text
  • Readability: Horizontal bars make it easier to read individual segment percentages
  • Space Constraints: Vertical bars take less width but more height
  • Familiarity: Some audiences expect vertical bars, though horizontal is often more practical

As a general rule: use horizontal for many categories or long labels, vertical for few categories with short labels.

Question: How do I know if the differences I see in a segmented bar graph are statistically significant?

Answer: Segmented bar graphs show visual patterns, but to test statistical significance:

  • Chi-Square Test: Perform a chi-square test of independence on the original two-way table
  • Sample Size: Larger samples make smaller differences more likely to be significant
  • Effect Size: Consider both statistical significance and practical significance
  • Pattern Consistency: Look for systematic patterns rather than isolated differences

Visual inspection identifies potential associations; statistical tests confirm significance. The graph guides your analysis, but formal testing validates findings.

Question: What's the best way to choose colors for segmented bar graphs to maximize clarity?

Answer: Effective color coding follows these principles:

  • Contrast: Use colors that are clearly distinguishable from each other
  • Consistency: Same subcategory should use the same color across all bars
  • Meaning: For ordinal variables, use a gradient (e.g., light to dark green for positive progression)
  • Accessibility: