Tennis

A simple model for a tennis match between two players, A and B, is easily described. We assume that the probability of A winning any point is π1 if A serves and π2 if B serves, and that the results of successive points are independent. These assumptions, plus the rules of tennis, constitute our model.

This model could be used to randomly generate a complete tennis match. For each successive point, a weighted coin with P(head) = π1 could be tossed when A is serving, and A would win the point if the coin showed a head. A different weighted coin with P(head) = pi1 would be used when B is serving. Repeating until one player wins gives a simulation of the match.

About pseudo-random numbers

Computers cannnot perform truely random tasks, so computer-based simulations are based on pseudo-random numbers. These are found with a deterministic algorithm (a mathematical formula) that would generate identical events if it was repeated. However a good enough algorithm generates a sequence of values that would be extremely difficult to distinguish from a sequence of truely random values.

About generating categorical values

Most simulations are based on a pseudo-random number generator that provides a sequence of values between 0 and 1 in which each value is equally likely. (Their distribution is, at least approximately, a rectangular distribution.) It is relatively easy to generate other types of random quantity, such as the categorical values 'win' and 'lose' that we need for the tennis simulation, from this type of pseudo-random number generator. For our tennis match simulation, the results are essentially equivalent to those obtained by tossing coins.

The diagram below shows how randomly generating points can simulate a complete women's tennis match with 3 sets.

Initially, both players are equally matched and have probability 0.75 of winning their serves. Click Simulate Next Point to play a single point of the match -- the computer randomly generates a result, based on the probability of the server winning the point. Click this button repeatedly to generate points until the match is completed.

Click Start New Match to perform another simulation. Note that the precise sequence of points is unlikely to be repeated exactly in different simulations, even when the probabilities are the same in successive matches. (Before performing further simulations, you may use the sliders to adjust the probabilities winning individual points for the two competitors.)


In practice, we would rarely be interested in displaying as much detail in a simulation (except perhaps when checking that we have programmed the rules of the match properly!). We are usually interested in only one or two characteristics of a match (e.g. the winner's name or the total number of sets played in the match) and only these summaries need be displayed.

We will use a different sport to show how simulations are used to find useful information.