Playing with quantiles, part 2
It is common to look at best time at the Marathon. Or perhaps the distribution of the top100, as done by John Myles White on his blog here (data can be found there), as the graph below, with the density of the time for the first 100 men (in blue) and the first 100 women (in red).
Hence, men and women are different and men run faster than women. So what...?
A lot of people run those marathon. Almost 40,000 ran (and finished) the one in New York City. Instead of 100, shouldn't we keep more runners, e.g the top 5% ?
The other point is that it might be interesting to correct (or control) with the age. If men and women running the marathon do not have the same age, it might be an explanation for that difference.
Unfortunately, to run a quantile regression properly I need the entire dataset, with 40,000 runners. And on the website of the NY Marathon (here) it is possible to extract some information, but not the entire dataset (and my standard R robots did not work here). So I managed to extract the "worst" 10% runners in 2008, and run a quantile regression to get the 95% quantile regression curve, using the idea mentioned here.
I got the 95% quantile curve for men (in blue) and women (in red), and similarly for top runner, namely the 5% quantile curve.
For those willing to play, here is the code (it is dirty since my dataset was dirty)
On the graph above, the have a strong line for 2008 and a thin one for 1983, and again men in blue and women in red. It looks like fast runners run as fast as before, but since there are more and more runners, the quantiles are going up, And by that time, women who ran the marathon were performing extremely well compared with men.
Anyway, this is now really a statistical analysis, but more a "how to say something when you cannot access a database entirely". But I still hope someday I will...