Math 1110 - Homework - Nicolas Fourrier

Then, using Markov Chains, the probability to win a game resulting from this ... this project will be a good start), any programming language (C, C++, C#, Java...).
43KB taille 6 téléchargements 358 vues
MATH 1110 - Section 001 Nicolas Fourrier

Spring 2012

Modelization of a Tennis game Direction: Form group of 2. The project is due on April, 30th at 11.59pm and must be submitted by email at [email protected]. Each hour of delay will result in the subtraction of 5 points from your project grade. Purpose: The goal of this project is to determine the probability of each player to win a match in progress. The only necessary assumption is the probability that for a player against its opponent to win one point. Then, using Markov Chains, the probability to win a game resulting from this probability to win one point will allow you to simulate multiple games with different opponents and tournaments. What to do: Let p be the probability to win one point, then d = 1 − p is the probability to loose the point. Using a tree diagram, and Markov chains determine the probability to win 1 game. After presenting the tree diagram and the transition matrix, explain in your own words how you obtain the tree diagram and the resulting matrix. Afterwards, modelize the probability to win one set using the probabilities to win 1 game. Similary, present the tree diagram as well as the transition matrix. Finally, modelize the probability to win the match (3 sets), using the probabilities to win 1 set. Again, present the tree diagram as well as the transition matrix. The work should be presented inside a report (one report per group). Rules: The rules used are exactly the official ones, except that there is no tie-break, it is necessary to have a difference of 2 games to win a set. (all the sets work like the 5th set. Grading: Out 100, your grade will be determined by: • The correctness of the tree diagrams and transition matrices • The quality of presentation of the tree diagrams and transition matrices • The quality of the justification.

To go further (... with extra points): With little programming skills, you should be able to write down the three transition matrices and create a program simulating a match and then a tournament by only assigning the probability p to win a point. Suggested software: Mathematica (the best to start with), Matlab (if you expect to do numericals in the future, this project will be a good start), any programming language (C, C++, C#, Java...).

Good luck !

Probability to win a game the probability to win a point 1 0.8 0.6 0.4 0.2 0 0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.7

0.8

0.9

0.7

0.8

0.9

Probability to win a set the probability to win a point 1 0.8 0.6 0.4 0.2 0 0.1

0.2

0.3

0.4

0.5

0.6

Probability to win a match the probability to win a point 1 0.8 0.6 0.4 0.2 0 0.1

0.2

0.3

0.4

0.5

0.6

1

f u n c t i o n q=game ( p )

2 3 4

%Probability to loose the point d=1−p ;

5 6 7

%Initialization of the stochastic matrix M= z e r o s (m, n ) ; %where m is the number of lines and n the number of columns

8 9 10 11

M( 1 , 2 ) = p ; M( 1 , 3 ) = d ;

12 13

%........... Fill in the stochastic matrix

14 15 16 17 18 19 20

%Solve %In order to solve the system, you must: % 1- find what you are looking for first, % 2- identify where it is in the system, % 3- observe certain properties about the stochastic matrix, % 4- solve

21 22 23 24 25 26 27 28 29 30 31 32

%var = M(3,4); % Select the column 2,3 and 4 from the matrix M0 = M( : , 2 : 4 ) ; % Build the identity matrix I = eye ( n ) ; % Build a vector with 1 everywhere oneVector = ones ( n , 1 ) ; % The function inv inverts a matrix (if the matrix is invertible) M2 = inv (M0 ) ; % Matrix multiplication b = M0∗ o n e V e c t o r ;

33 34 35

%Define the final solution as a vector with 2 entry q =[ pSet n b _ o f _ p o i n t s ] ;