Notes on Median and Mean Calculation from Frequency Table

Overview of Data Analysis

  • Objective: Calculate the median and mean of commuting distances from a frequency table.

Data Collection Steps

  • Data Summary: Collect and interpret frequencies from a frequency table.
  • Columns Breakdown:
    • First Column: Data values (miles commuted).
    • Second Column: Frequency (how many times each value appears).

Steps to Construct the Dataset

  • Create List X: Populate the dataset based on frequencies.
    • 5 miles: 1 time → List: [5]
    • 10 miles: 4 times → List: [10, 10, 10, 10]
    • 15 miles: 3 times → List: [15, 15, 15]
    • 20 miles: 2 times → List: [20, 20]
    • 25 miles: 3 times → List: [25, 25, 25]
    • 30 miles: 5 times → List: [30, 30, 30, 30, 30]
    • 45 miles: 1 time → List: [45]
    • 50 miles: 1 time → List: [50]
    • Note: Distances of 35 and 40 are excluded as their frequency is 0.

Calculating Median

  • Definition: The median is the middle value in a sorted dataset.
  • Using the Quantile Function:
    • Set probability to 0.50 for the median.
  • Result: Median = 22.5 miles.

Calculating Mean

  • Definition: The mean (average) is computed from all data points.
  • Steps:
    1. Count Data Points: Sum the frequencies for total counts.
    2. Automate Calculation: Use a computer to avoid manual errors when summing.
    3. Formula for Mean:
      [ \text{Mean (X-bar)} = \frac{\text{Sum of all } X}{\text{Total number of values}} ]
  • Result: Mean = 22.5 miles.

Conclusion

  • Significance: In this particular case, both the median and mean are equal (22.5 miles), which is an uncommon occurrence but can happen in specific datasets.