๐Ÿ“Š Pre-Lab: Descriptive Statistics

Master the fundamentals before your lab session

MSTA112 Medical Biostatistics โ€” Week 4

๐ŸŽฏ Why This Matters

Imagine a clinic where the mean HbA1c is 7.5% โ€” looks controlled. But half the patients are at 5.5% (great) and half at 9.5% (danger). The average hid the problem.

๐Ÿ“Œ The center is only half the story. You must also measure the spread.

๐Ÿ“ˆ Central Tendency โ€” Finding the Center

Mean (Average)

Mean = ฮฃx / n

Sum all values, divide by count. Uses every data point โ€” powerful but easily pulled by outliers.

โœ… Use when: data is Normal
โš ๏ธ Sensitive to outliers

Median (Middle Value)

Middle value when ordered

The 50th percentile. Not affected by extreme values. Represents the "typical" patient.

โœ… Use when: data is Skewed

Mode (Most Frequent)

Value with highest frequency

The only measure that works for categorical data (blood type, gender).

โœ… Use when: data is Categorical

๐Ÿ”€ Distribution Shapes

The relationship between mean and median reveals the shape:

Mean = Median = Mode โˆ’1 SD +1 SD โˆ’2 SD +2 SD 68% 95%

Normal (Symmetric)

Mean = Median = Mode

Bell-shaped. All measures align at center. Example: height in a population.

Positive Skew (Right Tail)

Mode < Median < Mean

Mean pulled right by high values. Example: income, BMI, length of stay.

Negative Skew (Left Tail)

Mean < Median < Mode

Mean pulled left by low values. Example: easy exam scores.

๐Ÿ’ก Shortcut: Skew is named for the TAIL direction, not the peak. If mean โ‰  median โ†’ data is skewed.

๐Ÿ“ Dispersion โ€” Measuring the Spread

Range

Range = Max โˆ’ Min

Quick snapshot but uses only 2 values. One outlier ruins it.

Use for: quick glance only

IQR (Interquartile Range)

IQR = Q3 โˆ’ Q1

Spread of the middle 50%. Robust to outliers โ€” like the median.

โœ… Use when: data is Skewed

Standard Deviation (SD)

SD = โˆš[ฮฃ(xโˆ’xฬ„)ยฒ / (nโˆ’1)]

Average distance from the mean. Foundation of the 68-95-99.7 rule.

โœ… Use when: data is Normal

Coefficient of Variation (CV)

CV = (SD / Mean) ร— 100%

Compares variability across different units. Essential for lab quality control.

Use for: comparing different measurements

๐Ÿ”— The Golden Pairing Rules

These measures are always reported together. Mixing them is a mistake.

Mean + SD
โœ… For Normal Data
Median + IQR
โœ… For Skewed Data
Mean + IQR
โŒ Wrong combination
Median + SD
โŒ Wrong combination

๐Ÿ“Š The 68-95-99.7 Rule

For normally distributed data:

68%
of data falls within Mean ยฑ 1 SD โ€” the typical range
95%
of data falls within Mean ยฑ 2 SD โ€” the "normal" reference range
99.7%
of data falls within Mean ยฑ 3 SD โ€” beyond this โ†’ investigate

Example: Mean BP = 130 mmHg, SD = 15. Normal range (ยฑ2 SD) = 100โ€“160 mmHg.

๐Ÿ” Detecting Outliers

IQR Method (Box Plot)

Below Q1 โˆ’ 1.5ร—IQR
Above Q3 + 1.5ร—IQR

Values outside the fences are flagged as outliers on box plots.

SD Method

Beyond Mean ยฑ 3 SD

Only 0.3% of normal data falls here. Very rare = likely unusual.

โš ๏ธ Never delete outliers without investigation!

A cholesterol of 15 mmol/L could be a lab error OR familial hypercholesterolemia โ€” a real disease. Investigate first. Always.

๐ŸŒณ Decision Tree: Which Measure Should I Use?

โ“ Is your data categorical (blood type, gender, diagnosis)?
โ†’ Use Mode. It's the only measure that works for categories.
โ“ Is your data numeric but skewed or has outliers?
โ†’ Use Median + IQR. They resist extreme values.
โ“ Is your data numeric and normally distributed?
โ†’ Use Mean + SD. Maximum information, mathematically powerful.

๐Ÿงฎ Step-by-Step Practice

Work through these problems before checking answers. Grab a pen!

Problem 1: Saudi BMI Data

BMI values (kg/mยฒ) for 5 patients: 26, 28, 29, 31, 33

1
Order the data
Already ordered: 26, 28, 29, 31, 33
2
Mean = (26+28+29+31+33)/5 = 147/5 = 29.4 kg/mยฒ
Falls in "Overweight" (WHO: 25โ€“29.9)
3
Median = 3rd value = 29
Mean (29.4) โ‰ˆ Median (29) โ†’ approximately symmetric โœ“
4
Mode = No mode (all values appear once)
5
Range = 33 โˆ’ 26 = 7

Problem 2: Hospital Length of Stay

Days in hospital: 2, 3, 3, 4, 150

โš ๏ธ Notice the outlier: 150 days
1
Mean = (2+3+3+4+150)/5 = 32.4 days โ† misleading!
2
Median = 3rd value = 3 days โ† represents the typical patient
3
Mode = 3 (appears twice)
๐Ÿ’ก
Conclusion: Mean (32.4) >> Median (3) โ†’ Highly right-skewed
โ†’ Report as: Median = 3 days (IQR), NOT Mean ยฑ SD

๐Ÿงฉ Problem 3: Your Turn!

Patient group: 4, 4, 7, 2, 8

Try calculating mean, median, and mode, then check your answer:

1
Ordered: 2, 4, 4, 7, 8
2
Mode: 4 (appears twice)
3
Median: 4 (middle of 5 values)
4
Mean: 25/5 = 5
๐Ÿ’ก
Mean (5) > Median (4) โ†’ slightly right-skewed. The values 7 and 8 pull the mean upward.

๐Ÿ“Š Outlier Impact Simulator

Drag the slider to add an outlier to this BMI dataset. Watch how Mean shifts dramatically while Median barely moves.

Mean
Median
-
Mean
-
Median
-
Mode
-
Range
-
SD
-
IQR
Outlier BMI: 30 kg/mยฒ
20Normal range200

๐ŸŽฏ Drag & Match

Drag concepts on the left to their correct match on the right.

Match each concept โ†’ correct statistical measure or description. Green = correct!
Score: 0/5

๐Ÿ“ˆ Distribution Shape Explorer

See how Mean, Median, and Mode shift across different distribution shapes.

Mean
Median
Mode
Normal distribution: Mean = Median = Mode at the center. Common for height, BP, and HbA1c in healthy populations.

๐ŸŽฎ Simulate tab features contributed by Mistral Large โ€” integrated by Endoglin ๐Ÿงฌ

๐Ÿ“Š Descriptive Statistics Calculator

Enter your data and get instant analysis with visualizations and interpretation.

๐Ÿ’ก Try example datasets:

๐Ÿ“ˆ Central Tendency

n (Sample Size)-
Mean-
Median-
Mode-

๐Ÿ“ Dispersion

Range-
IQR-
Std Deviation (SD)-
CV-

๐ŸŽฏ Five-Number Summary

Minimum-
Q1 (25th)-
Q3 (75th)-
Maximum-

๐Ÿ“Š Distribution

๐Ÿ” Outlier Detection

โœ… Pre-Lab Quiz

Test your understanding before the lab session.

1. Hospital length of stay: [2, 3, 3, 4, 150]. Mean = 32.4 days. Which measure better represents the typical patient?
2. In a right-skewed distribution, what is the relationship between mean and median?
3. Which pair should be reported together for skewed data?
4. What is the only measure of central tendency that works for categorical data?
5. Mean BP = 130 mmHg, SD = 15. Using the 68-95-99.7 rule, what range contains ~95% of patients?
6. You find cholesterol of 15 mmol/L โ€” a statistical outlier. What should you do?
7. CV for adult BP = 7.7%, CV for infant weight = 14.3%. Which is more variable relative to its mean?
8. A histogram shows two distinct peaks. This distribution is called: