Great question! The choice between using the median or mean to summarize repeated measurements for an individual depends on the distribution of your data and the goals of your analysis. Here’s a step-by-step guide to help you decide:
1. Check the distribution of your data
- If the data is normally distributed (symmetric, bell-shaped):
Use the mean (it’s the most efficient summary).
- Example: You’re measuring stride length, and most values cluster symmetrically around a central value.
- If the data is skewed (asymmetric) or has outliers:
Use the median (it’s robust to extreme values).
- Example: You’re measuring reaction time, and a few trials have unusually long pauses.
How to check distribution:
- Plot histograms or boxplots of the repeated measurements for each individual.
- Use statistical tests for normality (e.g., Shapiro-Wilk test in R), but note that these tests can be unreliable with small sample sizes.
2. Consider the nature of your variable
- Interval/ratio data (e.g., time, angles, velocities):
- If symmetric → mean.
- If skewed → median.
- Ordinal data (e.g., subjective ratings like "pain scores"):
Always use the median.
3. Think about outliers
- If some trials have unusually high or low values (e.g., due to measurement errors or rare events), the median is safer.
- Example: Gait analysis with a few "spikes" in joint angles caused by a slip.
- If outliers are meaningful (e.g., they represent true variability), the mean might still be useful.
4. What are you trying to capture?
- Central tendency:
- Use the mean if you care about the average value.
- Use the median if you care about the "typical" value (ignoring extremes).
- Consistency of performance:
- If you want to know the "middle" value an individual tends to hit, use the median.
5. Example Workflow
Suppose you’re analyzing jump height measurements for an individual across 10 trials:
- Plot the data:
# In R:
hist(individual_A$jump_height) # Check for symmetry
boxplot(individual_A$jump_height) # Check for outliers
- Decide based on the plot:
- If the histogram is symmetric and boxplot has no outliers → mean.
- If skewed or outliers → median.
6. Special Cases
- Small sample sizes (e.g., 3–5 trials per individual):
The median is often more reliable because a single outlier can distort the mean.
- Non-technical audiences:
The mean is more intuitive (e.g., "average jump height").
When in Doubt...
- Use both and compare results. If they lead to the same conclusion, either is fine.
- If results differ, investigate why (e.g., outliers driving the mean).
Example in Code (R)
# Simulate data: 10 trials for one individual
set.seed(123)
trials <- c(rnorm(8, mean=50, sd=5), 100, 110) # Two outliers
# Compare mean vs. median
mean(trials) # 58.8 (skewed by outliers)
median(trials) # 52.5 (robust to outliers)
Final Decision Flowchart:
Data normally distributed?
├───Yes → Use mean.
└───No → Use median.
Let me know if you’d like help analyzing your specific dataset! 😊