April 2023

NBA Draft – Probabilities

Now that you know the probabilities given to the fourteen teams and how the lottery system works, what are the chances that team number 1 gets the lottery?

Getting first

What is the probability of team number 1 (the team with the worst performance in the regular season) getting the lottery in the first draw?

P_1 = 140/1000 = 0.14

Getting second

What is the probability that Team 1 gets lucky in the second draw? Well, it is the joint probability that another team (i) obtains the first draw AND team 1 gets the second.

P_1(2) = P_i(1) * \frac{140}{1000-X} = \frac{X}{1000} *  \frac{140}{1000-X}

Notice X, the number of combinations allocated to team ‘i’ that won the first, will not be available for the second lot, and, therefore, you subtract from 1000. And remember, ‘i’ varies from 2 to 14 (all squads other than Team 1). So, you estimate the joint probability with each of them and add them up. Rearrange terms and sum it over ‘i’,

P_1(2) =\sum\limits_{i=2}^{14} \frac{140}{1000} * \frac{X}{1000-X} = \sum\limits_{i=2}^{14} P_1 \frac{P_i}{1-P_i} =  P_1 \sum\limits_{i=2}^{14} \frac{P_i}{1-P_i}

Let’s estimate the value using the R code:

prob_value <- c(0.14, 0.14, 0.14, 0.125, 0.105, 0.09, 0.075, 0.06, 0.045, 0.03, 0.02, 0.015, 0.01, 0.005)
prob.sum = 0
for(i in 2:14){
    current = prob_value[i]/(1-prob_value[i])
    prob.sum = prob.sum + current
}
prob.sum*prob_value[1]

The answer is 0.1341732. The probability of team 1 getting lucky in the first two draws = 0.14 + 0.1341732 = 27%

Getting third

Extending the same logic, the probability for Team 1 to get the third lot is

\\ P_1(3) = P_i(1) * P_j(2) * \frac{140}{1000-X-Y} = \frac{X}{1000} *  \frac{Y}{1000-X}  * \frac{140}{1000-X-Y}  \\ \\  P_1(3) = \mathop{\sum\sum} \frac{140}{1000} * \frac{X}{1000-X} * \frac{Y}{1000-X-Y} \\ \\  P_1(3) = \mathop{\sum\sum}\limits_{i\neq j \neq 1} P_1 * \frac{P_i}{1-P_i} * \frac{P_j}{1-P_i-P_j}

prob_value  <- c(0.14, 0.14, 0.14, 0.125, 0.105, 0.09, 0.075, 0.06, 0.045, 0.03, 0.02, 0.015, 0.01, 0.005)
prob.sum = 0
for(i in 2:14){
  for(j in 2:14){
    if(i != j){
          prob.sum =  prob.sum + prob_value[i]*prob_value[j]/ ((1-prob_value[i]) * (1-prob_value[i]-prob_value[j]))
      }
     }  
  }
prob.sum*prob_value[1]

0.1274865. So, for team 1 getting in the first three draws = 0.14 + 0.1341732 + 0.1274865 = 40 %

Getting fourth (final)

\\ P_1(4) = P_i(1) * P_j(2) * P_k(3) \frac{140}{1000-X-Y-Z} = \frac{X}{1000} *  \frac{Y}{1000-X}  * \frac{Z}{1000-X-Y}  * \frac{140}{1000-X-Y-Z}\\ \\ P_1(4) = \mathop{\sum\sum\sum}\limits_{i \neq j \neq k \neq 1} P_1 * \frac{P_i}{1-P_i} * \frac{P_j}{1-P_i-P_j} \frac{P_k}{1-P_i-P_j-P_k}

prob_value <- c(0.14, 0.14, 0.14, 0.125, 0.105, 0.09, 0.075, 0.06, 0.045, 0.03, 0.02, 0.015, 0.01, 0.005)
prob.sum = 0
for(i in 2:14){
  for(j in 2:14){
    for(k in 2:14){
          if(j != k){
            if(i != j){
              if(i != k){
    current = (prob_value[i]/(1-prob_value[i])) * (prob_value[j]/(1-prob_value[i]-prob_value[j])) * (prob_value[k]/(1-prob_value[i]-prob_value[j]-prob_value[k]))
    prob.sum = prob.sum + current              
              }
  
          }
    }
      }  
  }
}
prob.sum*prob_value[1]

0.1197205. So, for team 1 getting one of the lotteries = 0.14 + 0.1341732 + 0.1274865 + 0.1197205 = 52.1 %

NBA Draft – Probabilities Read More »

NBA Draft – The Lottery

Now, the lottery. Fourteen ping pong balls – numbered 1 through 14 – are placed in a glass drum and well mixed for 20 seconds. Four balls are collected from the mix at ten second-intervals. So why 14 balls? The clue: it is not related to the 14 teams that are participating in the draw! But it has to do with statistics – Four balls, picked randomly from fourteen balls, gives a total combination of about 1000.

_{14}C_4 = \frac{14!}{4! 10!} = \frac{14 * 13 * 12 * 11}{4*3*2} = 77 * 13 = 1001

Each team gets a list of four-ball combinations (the look-up table) based on their assigned probability, as seen in the earlier post. E.g., Pistons, Rockets and Spurs get 140 numbers, the Hornets receive 125, Pelicans 5 etc.

Here is the list of the first 140 numbers generated by the R command, combinations(14,4)[1:140,]. It is just an illustration, and I am not sure if NBA assigns numbers in this order.

Once the team that qualified for the first draft is determined, the lottery is repeated. If a combination corresponding to the already selected team comes up in the draw again, the machine will be reset for another try.

References

2022 NBA Draft Lottery Presented By State Farm: NBA
The room where it happens: Behind the scenes at the NBA Draft lottery: The Athletic
How NBA Draft Lottery Probabilities Are Constructed: Squared Statistics
Nervous energy, phone withdrawal and a waiting period: Inside the 2022 NBA Draft Lottery drawing room

NBA Draft – The Lottery Read More »

NBA Draft

Each year, the NBA teams recruit the best available talents – from colleges in the US or from overseas – through a process known as the draft. A draft order determines which team can choose first, second etc. Let’s divide the recruitment process into four stages.

Order teams

The 30 teams in the NBA are ordered in the reverse order of regular season record – the worst takes place 1, and the best gets place 30.

Draft Lottery

The top 14 of the previous list (remember: the worst 14 of the regular season) are eligible for the draft lottery. These 14 teams are the ones who miss out on the playoffs, i.e., 30 total – 16 playoffs = 14 remaining. The lottery is only to determine the top 4 picks. The 14 teams get probabilities of winning the lotteries based on where in the list they are.

Team Probability
1 (the last) 14.0%
214.0%
314.0%
412.5%
510.5%
6 9.0%
77.5%
86.0%
94.5%
103.0%
112.0%
121.5%
131.0%
140.5%

For example, here is the list for 2023 with the names and their respective probabilities.

Team WinProbability
Pistons.20714.0%
Rockets.26814.0%
Spurs.26814.0%
Hornets.32912.5%
Trailblazers.40210.5%
Magic.415 9.0%
Pacers.4276.8%
Wizards.4276.7%
Jazz.4514.5%
Mavs.4633.0%
Bulls.4881.8%
OKC.4881.7%
Raptors.5001.0%
Pelicans.5120.5%

You may notice a slight variation in the chances. That happens whenever two or more teams tie (same win%); the probabilities are added and divided equally (if the sum is odd, the division hands a slight advantage to one of the teams).

Picks 5 – 14 and 15-30

The 11 teams that missed out on the four lottery picks will get to pick players as per their order in the list. It means the No. 1 team on the list, if that misses all four lots, is guaranteed the No. 5 spot. The same goes for the 16 playoff teams – they get to choose 16 candidates (as No. 15-30). This concludes round 1.

Picks 31-60

The entire second round (No. 31-60), is determined by reverse order of regular season record.

The statistics of the lottery is in the next post

References

  1. How NBA Draft Lottery Probabilities Are Constructed: Squared Statistics
  2. NBA draft lottery: Wiki
  3. NBA Draft Lottery: Odds, history and how it works: NBA
  4. Tanking Won’t Die in the New NBA Draft Lottery System. It Will Only Evolve: The Ringer

NBA Draft Read More »

Republican Bayes

Let’s answer this question. In the Pew Research Center poll results published in 2010, 53% of Republicans, 14% of Democrats and 31% of Independents answered NO to the question, is there solid evidence that the earth is warming?
If a respondent answered no, what is the probability that she is a Republican? Note that on this survey on Oct 13-18, 2010, 25% of the participants were Republicans, 31% were Democrats, and 40% were Independent.

Let’s use the general formula of Bayes’ theorem here:

\\ P(j|N) = \frac{P(N|j)*P(j)}{\sum\limits_{i = 1}^{n} P(N|i)*P(i)}

Here, j represents Republican, and ‘i‘ represents a Republican, Democrat or Independent. So the required probability that a person is a Republican, given that she answered NO, is:

P(R|N) =  \frac{P(N|R)*P(R)}{P(N|R)*P(R) + P(N|D)*P(D) + P(N|I)*P(I)} \\\\ \frac{0.53*0.25}{0.53*0.25 + 0.14*0.31 + 0.31*0.4} = 0.44

So, there is a 44% chance that the random person is a Republican: no better than flipping a coin!

Increasing Partisan Divide on Energy Policies: Pew Research

Republican Bayes Read More »

Three-parent baby

We have seen Mitochondrial DNA (mtDNA) as a valuable tracer to follow maternal ancestry. To take a step back: the majority of human DNAs reside inside the cell nucleus, and a few are inside another structure inside the cell, the mitochondrion. During reproduction (fusion of egg and sperm), nuclear DNA undergoes recombination with material from both parents participating, whereas mtDNA we possess entirely comes from the mother’s ovum. It happens due to the faster degradation of mitochondria from the sperm during fertilisation.

Leigh syndrome

Leigh syndrome is a fatal disorder, and its genes reside in the DNA of the mitochondria. If the mother has the disease, it’s sure to reach the offspring, jeopardising its health. In 2016 John Zhang’s team at the New Hope Fertility Center in New York City found a solution. They ‘swapped’ the mitochondria of the mother with a healthy donor.

The technique was to take a healthy donor egg, remove the (cell) nucleus and replace it with that from the mother. Scientists then fertilised the egg with the father’s sperm and implanted it into the mother’s womb. While the majority of the genetic material is from the mother and father, those from the mitochondria are from the donor, thus making her the ‘third parent’.

World’s first baby born with New “3-parent” Technique: New Scientist
The three-parent baby technique could create babies at risk of severe disease: MIT Technology Review

Three-parent baby Read More »

Post Season Begins

So, the NBA postseason 2023 starts in a couple of days. Let’s look at how the teams performed in the regular season.

n_data <- read.csv("./nba23.csv")

Most and least win

win_data <- n_data[order(-n_data$W),c(1,3)]
as_tibble(win_data)

Here are the top 10 and bottom ten

Most and least points per game

win_data_top <- n_data[order(-n_data$PTS),c(1,7)]
as_tibble(win_data_top)

win_data_bot <- n_data[order(n_data$PTS),c(1,7)]
as_tibble(win_data_bot)

Post Season Begins Read More »

Accuracy and Asymmetry

Let’s develop a simple prediction technique to identify the sex of a person based on height. Here is data from 1050 participants and has the following form.

The first step is to plot them and check their distributions.

A naive way to set up the prediction is to assign everyone with height > 64 inches as male.

y_hat <- ifelse(heights$height > 64, "Male", "Female") 
mean(heights$sex == y_hat)

The answer is an impressive 83%

But how well did it predict individually?

mean(yy[heights$sex == "Male"] == y_hat[heights$sex == "Male"])
mean(yy[heights$sex == "Female"] == y_hat[heights$sex == "Female"])

For males, the accuracy is about 94% and for females, it’s only 44%. The discrepancy prompts us to look at the respective number of samples in the set.

length(heights$sex[heights$sex == "Female"])
length(heights$sex[heights$sex == "Male"])
Females are 238, and males are 812.

Accuracy and Asymmetry Read More »

Focal Point

Remember the battle of the sexes? It had two pure strategy Nash equilibria – football-football and dance-dance. And in the absence of communication, the couple could end up with those bad outcomes. So how do we prevent such results?

A focal point is a pure strategy Nash equilibrium that all the players select because of some salient feature. An example is the heads or tails game, in which two players guess, and if both pick the same, they win prizes. Results from some experiments show an overwhelming preference for heads over tails. The reason can be that it was the first choice.

In the split money game, two parties can guess any number between 0 and 100. If the sum is lower than 100, both get their respective choices. If it is greater than 100, both get nothing. The majority selects 50.

Focal Point Read More »

Keynesian Beauty Contest

Beauty Contest was the metaphor used by John Maynard Keynes in his famous 1936 work, The General Theory of Employment, Interest, and Money, to describe prices of assets in the market. Kaynes likes investment choices to a contest in a newspaper that shows 100 pictures, and the reader needs to choose six prettiest faces. The winner is the one whose preference matches the popular choice of the overall competitors.

Levels of thinking

How will a player play this game? One approach is to assign six random photos and hope it somehow connects with the average choice. It is zero-level thinking. The first-level thinker selects the pictures she likes. The rational player knows that it is not those she likes that win prizes but the ones the others like (second-level thinking). So she wants to pick what she thinks the others would select. If you go one level up, you choose the one that others think is others’ choice.

We have seen a similar contest in an earlier post describing Richard Thaler’s experiment in the Financial Times (1997). The competition was to choose a number between 0 to 100, and the person whose choice is two-thirds of the average guess gets the prize. A first-level thinker assumes that others pick numbers at random. The average of such a collection is 50, and 2/3 of 50 is 33. The second leveller knows the other participants are rational first-levellers and would guess 33. So she will choose 2/3 x 33 = 22. Following this iterative reasoning, one will end up at the Nash Equilibrium, which is zero!

The prices

In this viewpoint, Keynes hypothesises that the market prices stocks not based on their fundamentals but on what the participants (buyers and sellers) decide.

References

Keynes, John Maynard (1936). The General Theory of Employment, Interest and Money

Keynes’s ‘beauty contest’: FT

Results from experiments

Keynesian beauty contest: Wiki

Keynesian Beauty Contest Read More »