Question

1 Building a model with Probability (7 marks)

What this question is checking? This question is intended to test your ability to construct

stochastic models in matlab. Creating mathematical models from descriptions of the system

given in sentences/words is a learned skill and will get easier the more you do it!

Now to the question... In the game of tennis, a ball is thwacked back and forward across a net,

until one player fails to hit it, at which point the other player gets a point. A game of tennis will

continue so long as either both players have less than four points OR the two players are within one

point of one anothers' score (hence, if the score is 5:5, 3:0 or 11:12 the game will will continue. If the

scores are 5:3, 7:9 or 4:0 the game will end.)

For this question, we will model tennis using matlab. Because this question is NOT intended to

test your tennis ability, please feel free to ask any clarifying questions you wish about the game of

tennis.

a) Suppose we have two variables At and B₁, representing the scores of player A and player B.

Assuming our two players are equally skilled, write (in plain language) the stochastic process you

would use to describe a tennis game.

HINT: describe where At and Bt start, how they will change with each time step, and when the

process will end.

b) Take the stochastic process you have described above, and implement it as a Matlab script. Have

matlab plot a graph of the two players scores.

HINT: in matlab, && denotes the AND operator and I denotes the OR operator.

c) Simulate a large collection of tennis games, and record the total number of points at the end of

each game, T. What is the expected number of points in a game of tennis, E(T)?

d) Plot a histogram of T. What do you notice? Can you explain what you see?

Question image 1