Saturday, January 25, 2014

Fantasy Basketball Manifesto Part II: Rarity Scoring

Ranking fantasy basketball players, and determining how valuable the players are in general, is not as easy as it seems due to the number of categories head-to-head and rotisserie leagues compete in. As I discussed in part I, Standard Scoring is the mainstream method used by big players in fantasy sports such as ESPN and Yahoo sports. Rarity scoring is a simpler method of ranking players, giving value to stats based on how rare they are. As I will discuss in part III, this is a much superior method than Standard Scoring.

Rarity Scoring Basics


The premise is simple - every category matters as much as another. If there are 1,000 points scored and 500 rebounds total, then each rebound will be twice as valuable as each point. As an illustrative example, I'll look at Yahoo's current (January 25th) top 12 players over this season's average stats.

The "population" of our league has 12 players. The most common statistic is points scored, so we will put all the other statistics in terms of points scored. Since no category is more important than another, we normalize each category so the total "fantasy points" are equal.


We just have to divide total points scored (286.5) by the total amounts of the rest of the categories and then we get a coefficient we can use to normalize all the categories. In this example, the coefficients are in the "value" column at the bottom. For blocks, the value coefficient is roughly 30 points. This means it is just as valuable for your player to score 1 block as it is to score 30 points.

Now we will use these coefficients to see how we rank and value the 12 players in our population. The coefficients and ranks won't work in any league with more than 12 players and 6 categories, but the concepts are the same.

(click image to expand)

Normalizing Percentages


Free throw and field goal percentages should be equally important as the other categories in fantasy basketball. In part I of this series, I went over FTOP and FGOP - my method of turning percentages into simple countable statistics. But even after making field goal percentage and free throw percentage countable, normalizing FGOP and FTOP is more difficult than the other categories, since half the scores are negative.

To account for how much more the worst shooters affect your team than the best shooters, I only normalize the positive shooting to points scored. The statistics FTOP and FGOP already ensure that there is equal value above and below the average shooter. The total effect of FGOP and FTOP coefficients is the same as the other categories, even though half of the effect is negative.

Ranking Players with Rarity Scoring


1. Determine the size of your league (your population).
2. Nominally rank all NBA players - we will have to re-rank players over and over again, so the way we rank them the first time doesn't matter. It helps to use a logical ranking so it takes fewer iterations though.
3. Assign nominal coefficients to all of the categories in your league. Again, the more logical your starting point the faster the process finds your solution.
4. Find the sums of all the countable statistics of players that would be owned in your league (a 13 player, 10 team league you would sum the top 130 players - your "population"), then determine the coefficients to normalize those scores back to points.
5. Using the new coefficients you just calculated, find the total fantasy production of each player in the NBA, then re-rank the players.

Since every time you re-rank your players, it will change the totals of all the players in your population, you have to re-calculate the coefficients and total values over and over again. Usually by 5 iterations, the ranks will have already stabilized and you have results. Please note that this whole process is a lot of work in excel, so before you try this make sure you have some time to invest. The last installment of this series will have a downloadable spreadsheet to calculate stats for your league if you want me to do the work for you!

Using average statistics for generating ranks and coefficients gives a lot better results - the number of games played or games missed will greatly affect results. In order to be more accurate, calculate the averages yourself using total stats and total games played - a spreadsheet carries a lot more decimal places than websites designed to be easy to read.

How to Use Rarity Scoring Coefficients


I am not posting results for most of the categories here because there is so much more to the Fantasy Basketball Manifesto that I haven't covered yet, but here are the coefficients. FTOP and FGOP are more difficult than posting a coefficient due to things we will discuss in part IV. Using these coefficients is easy - multiply a box score line by the coefficient below to see how valuable it is for fantasy.

Points: 1
Rebounds: 2.5
Assist: 4.5
3PM: 15
Steal: 10
Block: 20

These are rough estimates of the values using pure rarity scoring. A 30 point, 5 rebound game with no treys, blocks, steals, or assists doesn't help very much compared to a 12 points, 2 treys, 5 assist, 3 steal, and 1 block line, even though the first one has a better chance of getting you on SportsCenter!

Armed with this I hope you have better luck in your leagues trying to pick up new players or ripping off your friends in blockbuster trades! Keep looking here for the rest of the StatDance.com Fantasy Basketball Manifesto!

Monday, January 20, 2014

How do ESPN and Yahoo Rank Fantasy Basketball Players?


Every fantasy basketball player tries to rank players on their own. There are many ways to figure out what players give you a better chance of winning. The best way is to watch a lot of basketball and judge who is performing well, and anticipate who will get better, come back from injury, or get more playing time. Obviously, most fantasy basketball players aren't going to be doing this as a full-time job, so that isn't going to cut it. Reading a lot about the NBA helps a lot, gaining knowledge from the people that follow the NBA professionally (or semi-professionally at least). But the way most fantasy players add players and make trades is by looking at box scores then trying to compare them, combined with following the league a bit.

A great tool to use is the in-game player ranks – it’s not telling you how a player will perform in the future, but it is supposed to tell you how much players contributed to fantasy teams over the specified time period in the past.

How do they come up with these ranks? To many players, it is a magic black box that comes up with a number that doesn't always make sense. But often, they do - Kevin Love is putting up his usual monster numbers, and sure enough, he’s ranked in the top 5. 

They aren't hiding how they do the ranks though - Yahoo, Basketball Monster, and ESPN all rank their players using “Standard Scoring” (also referred to as a Z-Score). Basketball Monster links to the same Wikipedia page I do and posts the individual Standard Scores for each player. ESPN at least lists the score of each category. If you use the same time periods, league size, and categories, Basketball Monster will give you very similar ranks to Yahoo and ESPN. 

There are slight differences, indicating added minor wrinkles, but the ranks are almost never more than a few ranks different. Yahoo appears to use a population of 130 (standard yahoo league size) and Basketball Monster as a default uses a population of 156 - 12 teams of 13 players, but is very flexible. ESPN's player rater seems to use different population sizes for different statistics. But, the results for all three websites are based on Standard Scoring.

How to Properly Weigh Percentages 


In order to compare percentages properly with each other, they have to be a countable stat, like blocks or rebounds. Obviously shooting 9 of 10 is better than 2 of 2 - but shooting 100% is better than 90%. Instead, you should calculate the number of made shots above your opponents field goal percentage.

If your opponent shoots 50%, we count how much each player helps us beat that percentage. If Durant shoots 9 of 20, then he is one field goal short of the goal percentage (50%). Conversely, if LeBron shoots 12 of 16 then he is four field goals above 50% for the night. 

Free throw percentage is calculated the same way. This creates new, countable stats that we can substitute in for the percentages. I call these stats "FGOP" and "FTOP" (pronounced "Ef-Gop" and "Ef-Top") - Field Goals Over Percentage and Free Throws Over Percentage. These are countable stats just like treys and blocks. In the above example, Durant scored -1 FGOP and LeBron had +4 FGOP. 

Obviously, everyone's opponent has different shooting percentages, so we have to use average field goal percentage (or free throw percentage) - which is, on average, what everyone's opponent shoots. I have been using this method for years, but as I researched this article, I found that Basketball Monster and ESPN do as well. Given how similar the ranks are, I believe Yahoo does too. But most importantly, this method makes logical sense to me.

Your opponents, on average, will shoot the league average. Lets say this week your opponent shoots exactly the league average. Going into the last night of the matchup, your team has scored cumulatively -1 FGOP. If on the last night, your team scores greater than +1 FGOP, then your team will win the matchup by scoring a positive number of baskets above your opponents percentage.

The player who amasses the most FGOP or FTOP will almost always win the matchup. If there is a large difference in attempts, then it is more likely the player scoring fewer FGOP will win. On the extreme side, if your team made its only free throw, you would win that category despite only having approximately .25 FTOP.

FGOP and FTOP would always predict the winner of a matchup if you based the statistic on your opponents percentages (a positive sum would mean you win, negative you lose) - but using average percentages is a great way compare a player's overall contribution to field goal and free throw percentage across all teams. 

The Ranking Process


Using the Standard Scoring method is simple in theory, but gets complicated to actually do. The general process has to be iterative in order to get the averages of only the top players.

1. Rank all the NBA players in descending value. How you rank the players is not really important.
2. Determine the population size – the size of your league. Our example will be a 13-player, 10-team – a population of 130.
3. Find the average production in each category of the “own-able” players – in our example, the top 130.
4. Find the standard deviation of each category in our population.
5. Calculate the Standard Score of each player – all players in the NBA. Each player gets 1 point for each standard deviation he is from the average of our own-able population. If the average player in the top 130 scores 10 points per game and the standard deviation is 5 points, and you score 5 points per game, your score is -1. Conversely, if you score 15 points per game, your score is +1.
6. Re-rank all of the players by the resulting sums of Standard Scores of each category your league competes in.
7. Repeat steps 3-6 until the ranks no longer change.

If computing standard scores isn't clear, and Wikipedia did not help you, I have a fun example to possibly help explain it.

Seven NBA stars have a sock contest at the All-Star game. They go to their luggage and count the pairs of socks of each color they have with them. The winner is the player with the highest Standard Score for their contest’s three categories – Red, Blue, and Black. I'm sure Cliff Paul would have won had he been invited.




(And yes, those are actually approximations of Points, Assists, and Steals)

As an aside, ESPN’s player rater and Yahoo’s in-game ranks do not change based on your league’s settings (Yahoo uses 9 categories including turnovers, ESPN uses 8 categories). Every custom league that has changed the categories and uses the in-game ranks to evaluate trades and waiver-wire pickups is using numbers that don’t actually apply to their league. To determine the Standard Scores for your league’s settings, I recommend using Basketball Monster’s tools.