Saturday, June 21, 2008

Fantasy Football Defense (Part 1, Methodology)

expr:id='"post-" + data:post.id' >

Blogsquatch and the Dozer aren't the only nerds in town, you know. I'm a bit of a nerd myself, which manifests itself in two ways--playing fantasy football, and being way too serious about numbers when playing fantasy football. This will be the first of a series of posts going inside the numbers, hopefully for your edification. As team defense is often an overlooked position, and I've done a lot of looking over it already this year, I figured it was a good place to start.

Something to keep in mind while reading this is that fantasy defenses score points just like any other fantasy position. And how many points they score will undoubtedly be affected by what offense they face. So when I talk about "defense points scored" and "offense points allowed", do not be alarmed. If it's really that confusing for you, just imagine everything in this post flipped upside down and describing real-life offenses scoring points against real-life defenses instead of fantasy defenses scoring points against fantasy offenses.

My first step was researching each team's predicted fantasy points this year. I went to a couple different websites and averaged my results, making sure all the inputs were based off of my league's point value. Our scoring system for defense is as follows:



So all the calculations are based off that.

From there, I took the total projected points and divided by 16, to get a projected points per game. But a defense won't score the same amount of points every week; offenses faced contributes mightily to defensive success. Because I was unable to find "projected points scored for a defense facing this particular offense" anywhere, I made my own using last year's numbers. For some of the numbers, you can get away with taking a straight average to find the prediction for each week, because counting stats are counting stats. I multiplied turnovers by two, sacks by one, and all the rest of it, but 'points scored' posed a bit more of a problem. If an offense averages, say, 22 points a game, simply punched in the average value, would mean you'd end up predicting defenses will score 0 points against them every time. Likewise, if you have a defense that scores 27 points a game, the defense will get 0 in that category. Obviously, that doesn't make sense, as an offense that scores 22 points a game will (often) score 17 or so points in games and (less often) 31 or so points in games, while a 27 point averaging team will score 31 points more often than it scores 17. So I figured out each team's average points per game and standard deviation from last year. I plugged those figures in an online normal distribution calculator that I cannot currently find, and determined the probability of any particular offense scoring between 0 and 6 points a game, 7 and 13, and so on. I admit I fudged it a bit, as I didn't want to grind through 256 online trials (32 teams, 8 different point ranges), so I picked about 10 different categories (14-15 points per game, STD 8-10) and put each team in a category. I had a chart that looked like this:



I then multiplied each probability by the points received to determine average points per week attributable to "points allowed". (This is the step shown in the screenshot. New England has a 20% chance of scoring between 28 and 34 points in a game, and if a defense allowed that, they'd be docked one point.) When coupled with the counting stats, I determined how many points each offense was expected to score each week. (I know that football scores are not normally distributed, and I screwed up a bit counting the number in each range--I set ranges at 0 to 6, 7 to 13, and so on, so all fractions between ranges were lumped into the 0 points set. I think, because it replaces extreme scores with scores of 0 points, it will have some normalizing--not in the same 'normal' sense, I'm afraid--effect, but it won't be the last time we see something like that.) Imperfect, I know, but the best I could do.

At this point, I had "defense projected points per week" and "offense projected points per week". I wanted to determined how many points would be expected when any particular offense played any particular defense, but this was easier said than done. You can't simply average these numbers, as that would pull extremes towards the center much too much. (Just as I promised!) Say you have an offense that is so dominant, they only let the average fantasy defense score two points a week. But an average fantasy defense, against an average offense, might score eight points a week. By averaging them, in the end you'd have an offense that's supposed to be only allowing 2 points a week allowing 5 points a week. I couldn't think of a better way to bridge the gap, though, so I settled on a compromise. I averaged the two numbers, then multiplied the averaged numbers by the percentage that the new total fell short of what the total should be, for both offenses and defenses. I did it again, and I got total numbers very close to what they should be, so I was happy with that. At this point, my excel sheet looked something like this:



I've included another image in case that one is hard to read, although you can simply click on it to enlarge. This one's only the top left corner of the original.



In each one, though, you can see the offenses down the left side--arranged by predicted points allowed per game--and the defenses accross the top, arraged alphabetically. So, when the New England offense--which is fantastic--faces the Cardinals defense--which is pretty good, Arizona can be expected to bank 2.0 points, slightly above the New England average of 1.6, and way below the Arizona average of 8.0.

I took all these potential match-ups--1024 in all--and put them on the real schedule. In Week 4, Arizona faces the slightly above average Buffalo offense, and can therefore be predicted to score a slightly below average 7.9 points. But the problem with simply converting matchup chart into a 16 week schedule is the total projected--through the use of individual matchups--points generated by the 16 teams on the slate will not necessarily equal the total projected points I started with for each defense. Arizona's overall sched is so easy, by simply plugging in each projected matchup, I ended up with a total about 7% higher than it should've been. So I took each team's individually-generated result and multiplied it by the inverse of the percentage it was off the original projection, and did that for each game. As it turned out, Arizona should only be projected to score 7.4 points against Buffalo. Hopefully, this step cancelled out the averaging issues I had on the per-game basis, because the outside generated numbers were complied with strength of schedule in mind, so this throws it back into the equation.

So now I can predict how many points every team will score in every week of the season, based on their past results, current professional projections, and future matchups. Now came a (relatively) simple step of matching every team up with every other team, and saying 'if I had both these defenses on my roster, and I could always play the one projected to score more points, how many total points could I score?' Unsurprisingly, two average defenses, when managed well, can outscore an excellent defense. More posts on this will follow, including all my results, but I just wanted to get my methology out there. It took almost as long to type up as it did to generate, and it's much more unclear in this format, so if you have any questions, hit me up in the comments. I can't necessarily justify anything I did mathematically--I don't have that kind of training--but I have an intutive sense of how things should go and should fit together, and I think my results make sense on some level. There's no way you're still reading this, so I'm just going to take this opportunity to say the Doctor touches babies.

2 comments:

goneb4sunrise23 said...

SOBDD -

You're diligence never ceases to amaze me. Well done, sir. I can't wait to steal and use this information for our upcoming draft.

Yours,
The Doctor

Anonymous said...

Great work.