Sunday, May 22, 2011

F1 2011 Spain Race - Driver Comparisons

Here's a handful of laptime comparisons between drivers displayed using a QQplot. These plots are generated by ranking each drivers laptime, then pltting the first ranked time of one driver against the first ranked time of the second driver, the second ranked time against the second ranked time, and so on.

The line in the plot is x=y. If the trace falls below this line, it shows the driver on the y-axis has a faster time. Conversely, if the plots are above the line, the driver on the x-axis was faster on those rank-ordered laps.

Here's how Hamilton and Button compare:



We see how the Hamilton's laps, ordered in terms of duration, are considerably faster than Button's ordered laptimes. But, as I suggest below, this sort of laptime comparison may be misleading...

How about Vettel and Hamilton, given the race was closely fought between these two drivers?



If we look closely at this it seems that for many of the early laps, the marks are below the line, which is to say, Hamilton has the upperhand in terms of speed? Again, this may be misleading...

Nevertheless, let's zoom in on this, and omit the pitstops;



Hamilton definitely appears to have faster faster laps (sic) than Vettel. But - and here is the but that I hinted at before that maybe renders the above charts a bit misleading - maybe the fuel weight penalty is affecting things?

For example, when the ranking is calculated, the Nth ranked lap for Vettel may be from lap 4 of the race, compared to lap 44 for Hamilton. If we instead look at fuel corrected laptimes, then we're ranking laps based on "pure speed", with the fuel weight penalty affect on laptime accounted form (essentially, I'm trying to "normalise" the laptimes so that lap order doesn't play a role). What happens to the QQplot then? Here's a plot of ranked fuel corrected laptimes for Hamilton and Vettel:



Here, we see that the very fastest fuel corrected lap times go to Vettel, but then there are a few highly ranked fuel corrected times from Hamitlon. Does a change of symbol type help us see things and more clearly?



For times under about 86.5s, I think Hamilton has it? But in general, I'm not sure (form these charts) that we can say whether or not Hamilton of Vettel was generally faster? (See also the fuel corrected laptime comparison by lap).

Here's a really badly laid out scatterplot showing their fuel corrected laptimes compare:




Note: here are some R cribs for generating these charts:

VET<-subset(esp_2011stintLapTimes, car==1) //define a subset of the original CSV data
HAM<-subset(esp_2011stintLapTimes, car==3)
qqplot(VET$fuelCorrectedLaptime,HAM$fuelCorrectedLaptime,main="Driver comparison chart: VET and HAM",xlab="VET (ranked fuel corrected laptimes(s))",ylab="HAM (ranked fuel corrected laptimes(s))")
abline(0,1) //plots the x=y line
VET<-subset(esp_2011stintLapTimes, car==1 & lapTime<95) //a clunky way fo doing the zoom in to the data
HAM<-subset(esp_2011stintLapTimes, car==3 & lapTime<95)
qqplot(VET$fuelCorrectedLaptime,HAM$fuelCorrectedLaptime,main="Driver comparison chart: VET and HAM",xlab="VET (ranked fuel corrected laptimes(s))",ylab="HAM (ranked fuel corrected laptimes(s))",pch=3) //pch= sets the symbol type
abline(0,1)

1 comment:

  1. It was a very nice comparison about different F1 race drivers data, really good one for race lovers...

    ReplyDelete

There seem to be a few issues with posting comments. I think you need to preview your comment before you can submit it... Any problems, send me a message on twitter: @psychemedia