The Denver Nuggets landed second in a three-way coin flip with the Sacramento Kings and the Milwaukee Bucks on Friday, a coin flip that has significant implications for the Raptors.

The Raptors are owed a first-round pick from the New York Knicks from the Andrea Bargnani trade, but the Nuggets have the right to swap those picks, so the Raptors will get the lesser of the two picks.

But the Raptors draft fate isn’t quite as simple as assuming the Nuggets’ odds of each draft position. Because the Nuggets can swap after the lottery, we have to account for which of the two picks jumps to which spot, and the conditional probabilities that follow. It gets messy, but what you need to know is this:

The Knicks finished 7th-last. The Nuggets finished in a three-way tie for 8th-last, which means they’ll split the ping-pong balls for the Nos. 8, 9, and 10 spots, with the Nuggets landing an extra ball from the flip. What’s important from the flip, though, is that the Nuggets slot 9th, not 8th, which impacts Toronto’s most likely landing spot.

Based on the Knicks and Nuggets finishing 7th and T-8th=9th, the Raptors will have a 0.1687-percent chance of landing the No. 2 pick, or roughly a 1-in-593 chance. They will most likely pick ninth but could conceivably pick at Nos. 2, 3, 8, 9, 10, 11, or 12.

The Raptors will also select 27th with their own pick. They convey their 2nd-round pick to Memphis to complete the 2009 Hedo Turkoglu trade.

You can read a little more about this here and here. The reason it’s not as simple as “Raptors assume Denver’s lottery odds” is explained in more detail within.