Each season the NBA holds a lottery to determine the order of the first 14 picks of its draft. The lottery is held in mid-May, 5 weeks before the resulting NBA Draft. The lottery process works as follows:
Each of the 14 teams in the lottery receives a ball corresponding to their default position based on their regular season record. For instance, the Minnesota Timberwolves, who achieved the league's worst record (17-65) are represented by ball #1, the Cleveland Cavaliers, the league's second worst team (19-63) are represented by ball #2 and so on.
Four balls are chosen at random with the order disregarded. This process results in 1,001 combinations. For simplicities' sake, one combination (11, 12, 13, 14) is disregarded, leaving 1,000 combinations. (It should be noted that 11, 12, 13, 14 has never been pulled.) For organizational purposes, consider the combinations where the four chosen balls are sorted from smallest to largest. In other words, if the four choices go 4, 9, 2, 12, the result is (2, 4, 9, 12).
Again, depending on their regular season records, teams are given a prescribed chance of winning the lottery. When two teams have the same record, they combine the number of combinations the two teams receive and then share them equally. In this year's lottery, there was only one tie- between Sacramento and New Jersey (who's pick goes to Utah in the Deron Williams trade). Instead of the 5th team getting an 8.8% chance and the 6th place team getting a 6.3% chance, they two teams each get a 7.5% chance, and a coin flip determines which team gets the remaining .1%. This year, Sacramento won the coin toss, so they'll receive 7.6% to Utah's 7.5%. These probabilities are shown below:
Using these probabilities, the league assigns the 1,000 possible combinations to the teams. Minnesota gets the first 250 combinations, then Cleveland gets the next 199, then Toronto gets the next 156, and so on until Houston gets the final 5 combinations. The combinations are shown below:
Four balls are chosen and the resulting combination determines the first pick. Then the balls are replaced and the process is completed to determine the second pick. The balls are replaced again and the process is completed a third time to determine the third pick. The remaining 11 picks are determined by the reverse order of finish (the default order shown above).
To run your own mock lottery, simply go to http://www.randomizer.org/form.htm, then enter 5, 4, 1, 14, Yes, Yes: Least to Greatest, Place Markers Off. This will give you 5 sets of 4 numbers from 1-14, which are sorted from least to greatest. If two of your first three sets correspond to the same team, disregard the repeat and use the fourth set. If it happens again, disregard the repeat and use the fifth set, and so on.
Good luck, have fun, and be sure to watch the 2011 NBA Draft Lottery at 8:30 ET on ESPN.