20 Metrics in 20 Days- Day 10: Median Age
Day 10 in our series of 20 consecutive post on HR metrics: Median Age
Median Age tells you the midpoint of the age distribution for your employees. By definition, half of the employees will fall above the median, half below.
Just as with the median time in role discussion, the average age may be preferred in some organizations and is perfectly acceptable although it may be substantially impacted by outliers. I would suggest calculating both and also plotting the entire distribution to get a sense of whether the median or the average (mean) makes the most sense. In practice, the difference is likely small.
When it comes to plotting I strongly suggest using histograms and boxplots like the following.
Note: The plots below are similar to the previous discussion about median time in role. I’m reproducing the same kind of analysis below for those who may not have read that previous post.
set.seed(42) exp <- rnorm(100, 27, 2) hist(exp, breaks = 20, border = F, col = 'red3', main = 'Sample Distribution of Age', xlab = 'Age') abline(v = median(exp),lwd =3) # adding line for median
library(ggplot2) set.seed(42) area <- c(rep('HR',100), rep('Sales', 100)) exp <- c(rnorm(100, mean = 26, sd = 1), rnorm(100, mean = 37, sd = 3) ) boxplot(exp ~ area, col = 'red3', main = 'Sample Age X Area')
To further illustrate the value of ploting your data, let’s take a look at a distribution with a median age of 29.5. We’ll show both a histogram and a density plot just to highlight the easy flexibility of R.
### Using the Base R plots set.seed(42) exp <- c(rnorm(100, mean = 26, sd = .5), rnorm(100, mean = 36, sd = 2)) hist(exp, border = F, col = 'red3', breaks = 20, xlab = 'Age', main = 'Histogram of Age') abline(v= median(exp), lwd= 3)
## Density plot of the same data using ggplot2 library(ggplot2) ggplot(as.data.frame(exp), aes(x = exp)) + geom_density(fill = 'red3') + xlab(label = 'Age')
In this case we see that we actually have two distinct age groups, groups that we would never detect if we looked at the median or mean alone.
The lesson here? Use plots to get a better feel for the data and make sure your summary measures like median are telling what you think they’re telling you.
Why You Should Care
The age of your workforce and the distribution of that age matters for your workforce planning.
Beyond that, there is a lot of talk about generational differences in workforce attitudes and behaviors.
Separating fact from fiction especially when it comes to millenials is beyond the scope of this series but I provided some readings below to help you think cleanly about what is and is not true about any generational differences.
- Be preprared for the impact of upcoming retirments if you have a substantial population approaching the zone.
- Be aware of the different careers development needs of younger employees who are just getting started
- Don’t make sweeping generalizations about generational differences
Read These Articles
- © 2023 HR Analytics 101