BM 4&5
DATA ANALYSIS - AVERAGES AND MEASURES OF DISPERSION
Lecture Overview
- Course: BM & EBL Year 2
- Instructor: Kelebogile Kenalemang
OUTLINE
- Basic summary measures
- Measures of Location
- The nature of variation
- Measuring variation
- Interpreting the measures
Measures of Location / Measures of Central Tendency
- A measure of central tendency refers to a value that represents the typical or "average" value in a data set.
- The purpose of central tendency measures is to identify the location at the center of a data set.
- There are three common measures of Central Tendency:
- Mean
- Median
- Mode
Mean
- The mean (also called the average) is calculated as follows:
- The mean is the sum of all data values divided by the number of values in the data set.
- Formula for Sample Mean:
where: - = sample mean
- = sum of all values
- = number of values in the sample
- Formula for Population Mean:
where: - = population mean
- = sum of all values in the population
- = number of values in the population
Example 1: Product Demand
- Data Set: 3, 12, 7, 17, 3, 14, 9, 6, 11, 10, 1, 4, 19, 7, 15, 6, 9, 12, 12, 8
- Task: Calculate the sample mean for this data set.
Example 2: Employee Salaries (Basic Calculation)
- Salaries (in thousands): 8, 12, 15, 10, 9, 18, 14, 11, 13, 10, 12, 16
- Task: Calculate the sample mean salary for these employees.
- Follow-up Question: Should the mean be used as a basis for salary raises? Why or why not?
Example 3: Exam Scores (Interpreting Outliers)
- Scores: 45, 55, 60, 50, 72, 75, 80, 48, 55, 60, 65, 58, 50, 100, 52
- Task: Calculate the sample mean test score.
Follow-up Questions:
- How does the high score (100) affect the mean?
- What would be a better measure of typical performance without the impact of extremes?
Example 4: Real Estate Prices (Skewed Data)
- Prices (in millions of Pula): 1.5, 2.0, 1.8, 1.2, 1.7, 2.2, 2.0, 1.9, 3.5, 1.6, 2.1, 10.5
- Task: Calculate the sample mean selling price.
- Follow-up Challenge: Given the outlier (10.5M Pula), should the mean or another measure be used? Why?
Calculating the Arithmetic Mean for a Frequency Distribution
- The arithmetic mean for a frequency distribution is calculated using:
- Formula:
where: - = frequency
- = respective data values
- Formula:
Example: Ungrouped Frequency Table
- Data: Daily sales of a double-glazing company
| No. of Sales | Frequency | |
|---|---|---|
| 2 | 3 | |
| 3 | 7 | |
| 4 | 9 | |
| 5 | 6 | |
| 6 | 5 | |
| 7 | 2 | |
| 8 | 1 | |
Class Activity Example 1: Restaurant Orders Analysis |
- Task: Calculate the mean number of orders placed per hour.
- Data:
| Orders/hour (x) | Frequency (f) |
|-----------------|---------------|
| 5 | 3 |
| 10 | 6 |
| 15 | 8 |
| 20 | 5 |
| 25 | 4 |
- Data:
Task: Calculating the Arithmetic Mean for a Grouped Frequency Table
- Daily Demand Frequency:
| Class Intervals | Frequency | |
|---|---|---|
| 0-4 | 4 | |
| 5-9 | 8 | |
| 10-14 | 6 | |
| 15-20 | 2 | |
Class Activity: Delivery Delays Impact on Customer Satisfaction |
- Task: Calculate the mean delivery delay time.
- Data:
| Delay Time (Hours) | Frequency (f) |
|--------------------|---------------|
| 0 | 10 |
| 1 | 15 |
| 2 | 12 |
| 3 | 8 |
| 4 | 5 |
- Data:
Class Activity: Employee Working Hours Analysis
- Data (Class Intervals):
| Weekly Working Hours | Frequency (f) | |
|---|---|---|
| 30 – 34 | 4 | |
| 35 – 39 | 6 | |
| 40 – 44 | 10 | |
| 45 – 49 | 8 | |
| 50 – 54 | 3 | |
Median |
- The median provides a better central measure than the mean in presence of outliers.
- To find the median:
- Arrange data in ascending order and select the middle value.
- Example: Find the median for:
- Data Set: 3, 12, 7, 17, 3, 14, 9, 6, 11, 10, 1, 4, 19, 7, 15, 6, 9, 12, 12, 8
Class Activity Example 1: Exam Scores Analysis
- Scores: 48, 55, 62, 45, 71, 85, 90, 60, 77, 52, 68, 50, 81, 49, 66
- Task: Find the median score for this data set.
- Follow-up Interpretations:
- Why might the median serve as a better measure of performance than the mean?
- If the highest score (90) increased to 100, how would this impact the median and mean?
Class Activity Example 2: Median for Grouped Data (Class Intervals)
- Scenario: Income Distribution
Class Intervals:
| Salary (Pula) | Frequency (f) | |
|---|---|---|
| 2500 – 2999 | 5 | |
| 3000 – 3499 | 7 | |
| 3500 – 3999 | 12 | |
| 4000 – 4499 | 8 | |
| 4500 – 4999 | 4 | |
Mode |
- The mode is the value that appears most frequently in a data set.
- Applicability: Can be used for both categorical and numerical data.
Mode of Coffee Orders Example
- Coffee Orders Data:
| Coffee Type | Number of Orders | |
|---|---|---|
| Cappuccino | 25 | |
| Latte | 40 | |
| Espresso | 18 | |
| Mocha | 35 | |
| Americano | 40 | |
Example: Travel to Work Survey Mode |
- Travel Modes and Frequencies:
| Mode of Travel | Frequency | |
|---|---|---|
| Car | 9 | |
| Bus | 4 | |
| Cycle | 3 | |
| Walk | 2 | |
| Train | 2 | |
Class Activity Scenario: Best-Selling Shoe Size |
- Shoe Sizes Data:
- Sizes recorded from 30 customers.
- Task: Determine the mode(s) of shoe sizes.
- Interpretation:
- Which sizes should be prioritized for stock?
- Which sizes might be least discounted during promotions?
Measures of Dispersion / Spread / Variability
- Purpose of Measure of Dispersion: Provides insights into the spread or distribution of values in the data set.
- A high dispersion indicates widely scattered values, while low dispersion indicates values are closely packed.
Main Measures of Dispersion
- The Range
- Quartiles and Semi-Interquartile Range
- Mean Deviation
- Variance and Standard Deviation
- Coefficient of Variation
The Range
- The Range is calculated as:
- Formula:
- Formula:
- Example: Calculate the range:
- Data Set: 4, 8, 7, 3, 5, 16, 24, 5, 6, 4, 3
Range in Exam Scores Scenario: Comparing Classes
- Scores for Class A: 45, 50, 52, 49, 60, 55, 47, 51, 53, 56
- Scores for Class B: 30, 85, 55, 40, 90, 70, 65, 50, 75, 80
- Tasks:
- Calculate the range for both classes.
- Determine which class has more spread-out scores and the implications of consistency in student performance.
Quartiles and Semi-Interquartile Range
- Definition: Quartiles divide a data set into four equal sized groups.
- Key Quartiles:
- Lower Quartile (Q1): Value below which 25% of data falls.
- Median (Q2): Middle value of data set.
- Upper Quartile (Q3): Value above which 25% of data falls.
Example: Calculate Quartiles
- Data Set: 4, 8, 7, 3, 5, 16, 24, 5, 6, 4, 3
- Calculation of Quartiles:
Mean Deviation
- Definition: Mean deviation measures the average of differences between values in distribution and the arithmetic mean.
- Formula:
Class Exercise: Overtime Worked by Employees
- Data: Hours worked in a quarter by 60 employees:
| Hours | Frequency | |
|---|---|---|
| 0-10 | 3 | |
| 10-20 | 6 | |
| 20-30 | 11 | |
| 30-40 | 15 | |
| 40-50 | 12 | |
| 50-60 | 7 | |
| 60-70 | 6 | |
Variance |
- The variance quantifies the degree to which each number in the data set differs from the mean.
- Calculations:
- For Ungrouped Data:
- For Grouped Data:
- For Ungrouped Data:
Class Exercise: Calculate Variance and Standard Deviation
- Task: Calculate variance and standard deviation for the frequency distribution of hours (as per earlier exercises).
Coefficient of Variation
- Definition: A normalized measure of the dispersion of a probability distribution, comparing the standard deviation to the mean.
- Formula:
- A higher CV indicates greater variability.
Example: Comparing Data Sets A and B
- Data Set A:
- Mean = 120, Standard Deviation = 50
- Data Set B:
- Mean = 125, Standard Deviation = 51
- Task: Calculate CV and provide a comparison of variability.
Class Exercise: Hospital Waiting Times
- Scenario: Comparing waiting times for two operations:
- Bypass Surgery: Mean = 17 weeks, SD = 6 weeks
- Hip Replacement: Mean = 11 months, SD = 1 month
- Task: Determine which operation has the highest variability.