How to split teams when playing basketball (or any team sports!)

I play a lot of basketball games in neighbourhoods. Be it with friends or strangers, we tend to play 6 or 8 players in a half court. Since we want to split the teams into two as unbiased as possible (or we do not want to hurt anyone’s ego), we tend to play “black and white” in order to split the teams.

A player selects “black” by having his palms face down and a player selects “white” by having his palms face up. In a 6-player game for example, if there are 3 (and only 3) players who select either colour, we are done. However, this process can take a while and this results in a waste of time.

There was an instance when an uncle suggested playing rock paper scissors. Instead of playing black and white, a player can select rock, paper and scissors instead. For a 6-player for example, as long as we form any 3 of the same pattern, we get a “success”. True enough, when playing rock-paper-scissors, we get a success immediately. This may not be intuitive as there are

1) many more total cases compared to black and white (for 3v3, there are 64 cases for black-and-white and 729 cases for rock-paper-scissors and

2) there are also more ways (3 instead of 2) to possibly split the team.

Approaching the problem

The problem is probabilistic in nature so it makes sense to use probability to solve the problem. Our objective is to find the probability of splitting a group of n people into 2. We define k to be choice a player makes. (where k is Black/White or Rock/Paper/Scissors). We set up the following conditions:

1) n has to be even.

2) A player will choose each k with equal probability

3) As long as k = n/2, we end the game.

Lets examine this probability for 4 players and 6 players and n number of players playing black and white.

Splitting 4 people into 2:

\[\frac{\binom{4}{2}}{16} = 37.5%\]

Splitting 6 people into 2:

 
\[\frac{\binom{6}{3}}{64} = 31.25%\]

Splitting n people into 2:

\[\frac{\binom{n}{\frac{n}{2}}}{2^{n}}\]

The probability problem gets harder

While solving black-and-white is almost trivial, for rock-paper-scissors, there are a number of cases to consider. For n = 6 and k = 3, the number of combinations are:

\[3[C(RRR PPS) + C(RRR PSS) \\ + C(RRRPPP) + C(RRRSSS) \\ + C(SSSPPPP)] \\ = 3(\frac{6!}{2! \, 3!} + \frac{6!}{2! \, 3!}) + 3[\frac{6!}{3! \, 3!}]] \\ = 420\]

where R, P, S refers to rock paper and scissors respectively and C refers to the number of ways you can arrange a particular set of permutations. Since the total sample space is 729, the probability is calculated to be 57.6%.

We have now established in a 6-player game, the probability for black-and-white is 31.25% and the probability for rock-paper-scissors is 57.6%.

As we increase k, it is difficult to find a general formula for all n and k due to the increasing complexity of the cases we have to consider.

This motivates the question: Is this true for all n? And ultimately, how do I know if my answer is right? We therefore use the Monte Carlo method to check the answer. The idea is to rely on repeated random sampling to form teams and simulate the game multiple times through randomness. We then determine from a large sample size the percentage of a success.

I’ll be using Python and the random package to simulate the player selecting k. This package generates pseudo-random numbers through a deterministic algorithm since it is much easier to produce and it serves the purpose. The numbers are being generated by a systematic approach but these numbers obey statistical randomness.

We first set up a game whereby we create an empty list team and every index represents the choice the player makes. generate_blackorwhite will generate either a 1 or 2 (for black-and-white) and generate_rockpaperscissors will generate either a 1, 2 or 3 (for rock-paper-scissors).

An example of an output of generate_blackorwhite(6) will be: [1,2,1,1,1,2]

An example of an output of generate_rockpaperscissors(6) is: [1,2,3,3,3,2]

Calling the same function will change the values in the list. For example, if we run generate_blackorwhite(6) again, we may get: [2,2,2,1,1,1]

We then create two functions with the following inputs:
total refers to the total number of simulations (the number of games played) and n refers to the number of players on the court. We define another variable counter = 0. Every time we have a “success”, we add 1 to the counter. We then write a simple loop whereby using the function defined earlier to create a game, we create x number of games. For each game, we check if any k forms n/2. If this is the case, we have a success and add 1 to a. The output will be a percentage of success over the total number of trials.

Indeed, the results from the Monte Carlo method converge to our theoretical findings. As we increase the total number of games played, the percentage of outcomes will converge towards the theoretical percentage. This allows us to have the results for arbitrary n without working on the mathematics =p

 

The results seem to be more obvious when we reduce the number of players to 2. The probability of a success for 2 players is the probability of both players not selecting the same k.

For black-and-white, there is a 50% chance since the second player has a 50% of selecting the same one. However, for rock-paper-scissors, the second player have the option to pick more k’s and has a 66% of selecting the different one.

Interestingly, the percentage of black-and-white becomes higher than the percentage of rock-paper-scissors when there are 20 or more players playing the game.

More fun ways to split teams

Apart from playing black-and-white or rock-paper-scissors, here are a few other ways to split teams:

1) Draft
Get two players to be captains and they will take turns to select one player

2) Apple orange
This method works well if you have pairs of players that are clearly evenly skilled. Every pair decides among themselves anonymously who is apple and who is orange and all the apples and oranges will form a team respectively.

3) Jump
Every player will stand in one line vertically facing the same direction. On the count of 3, everyone either jumps to the left or right. The probability is actually the same as black-and-white but it adds more randomness to the problem at least initially (as said earlier, players have a tendency to pick black or white)

Do share with me if you have any other creative ways to split teams!