Lap Raptor explained: Retention, gain and loss ratings
Lap Raptor offers two types of retention report: cumulative and per 100 laps. Let's address the columns in chunks, discuss what each stat is useful for and how we can develop a better retention metric that may have predicted the 2020 Champion.
Lap Based
Stats: Gain Laps, Loss Laps. Retain Laps
This group is fairly simple. Gain Laps is the number of laps a driver has gained position on; Loss Laps is the number of laps a driver has lost position on; and Retain Laps is the number of laps where the driver has either gained position or seen their position unchanged (in other words, the number of laps where they did not lose position). The percentages on the Retention per 100 Laps page represent the number of laps gained / lost / retained per 100 laps. For example, when you see Chase Elliott had a retention rate of over 92% on road courses in 2020, it means that in the average 100 lap span he would have at least retained his position on 92 of the laps (which is very good).
Position Based
Stats: Pos. Gained, Pos. Lost, Net Gained
"Pos." is short for position. This works the same way as the lap based stats, but instead of tracking laps, it tracks net positions gained or lost. Note the "net" in that sentence. That means if a driver gains four spots then loses two, the driver would score two positions gained for that lap. That lap-based tracking of positions here means this is not actually a passing stat. It's just a positions gained and lost stat. Net Gained is the result of totalling up all those per lap net gains and losses.
It's at this point that you should check out the cumulative and per 100 lap retention numbers for 2020. Look at who the leaders and losers are. You can see Ricky Stenhouse Jr., Christopher Bell, and Erik Jones were the top three in gain laps per 100. See that the drivers who lost the fewest positions per 100 were the guys consistently riding at the back. Ryan Preece was the net gainer of positions all season. Champion Chase Elliott was in the bottom half. These stats do not describe talent or car quality in a helpful way. They mostly reveals some things we all know but perhaps didn't connect to the numbers. Guys at the back tend not to lose position, probably because all the fast guys are up front - and there's nobody behind to pass them! They also tend to get spaced out, where they'll be running on different laps relative to the leader (hence, they also have low gain numbers). Running in the 20s with week to week inconsistency gets you highly variable ratings, like you see with Bubba Wallace, Ryan Preece, and more. How can we make these retention numbers more representative of talent and success?
Position-Weighted
Stats: Gain Rating, Loss Rating, Net Rating, Rating Ratio
We can weight position based stats by the position being gained. This allows us to credit drivers and teams for passing the tough competition up front, while also acknowledging that there's very little opportunity to gain spots if you're running in second, for example (there's only one guy you can pass). It also allows us to penalize drivers for getting passed by weak competition. For gainers, Rrel does this by crediting drivers with the number of positions gained divided by their position at the start of the lap. For example, if at the beginning of the lap the driver was in fourth, and they finished in second, they gain (4-2)/4 = 0.5
points to their gain rating. For losers, we flip it. Drivers are docked the number of positions lost divided by the number of cars behind them. If a driver begins a lap in 15th and ends in 20th, in a 40 car field, they have (20-15)/(40-15) = 0.2
points added to their loss rating. So as to ensure the credits and deductions are never too small to matter, the denominators are capped at 20 (meaning the smallest credit available in a positive lap is 0.05, and the smallest deduction for a negative lap is -0.05). Net rating is the difference between total gain score and total loss score. Rating ratio is the ratio between the two (gain divided by loss). As with the position based numbers, it's important to remember this is not a passing stat. It's a position retention stat. The driver in the first example, who in one lap went from fourth to second does not gain credit when he passes for third and then another credit for gaining second. He only gets the credit based on the difference of his positions at the start and end of the lap. NASCAR's public data doesn't provide any more detail.
For proof of this rating's efficacy, look to the 2020 playoffs. Chase Elliott had a negative unweighted net gain rating (-0.350), but led the field in Rrel's weighted stat. In the regular season, it was Hamlin in first and Harvick in second.
Pseudo-formulae:
Gain Rating = (lap start position - lap end position) / min(lap start position, 20)
Loss Rating = (lap end position - lap start position) / min(cars in fields - lap start position, 20)
Net Rating = Gain Rating - Loss Rating
Rating Ratio = Gain Rating / Loss Rating