MATPMD4
Assignment 1 (Stochastic Processes)
Lecturer: Anthony O’Hare (4B113)
Please follow these instructions carefully; marks will be lost for submission that do not
follow these instructions.
Submit a single pdf file called MATPMD4 Assignment1 XXXX.pdf for marking,
where XXXX is your student id. You may submit a number of other files as evidence
of your calculations but everything you wish to be marked MUST appear in the
named file (for example, DO NOT refer to other files for parts of questions, i.e. see
file xxx for part (ii), it will not be marked).
You may wish to do your assignment in a jupyter notebook, if you do so you must
convert it to a pdf for submission, you may wish to also submit your .ipynb file.
Completed assignments should be uploaded to canvas by the due date.
Date of Issue: January 31st 2022
Report Due by: 16:00 March 7th 2022
1. Successive generations of a particular flower have different coloured stamen (red,
violet, blue and yellow). It is noted that
the probabilities of having red, violet, and blue stamens are 24%, 32%, 26% in
the next gene
ration if the current one is red,
31% 26%, 24% of having a red, violet, or yellow flower if the current generation
is violet.
if the current generation is blue the chance of the next being violet, red, and
yellow are 25%, 20%, 25%
if the current generation is yellow, the probabilities of observing red, violet,
blue and yellow are 0.18 0.23 0.27 0.32
(a) Draw the state space diagram of this system
(b) What are the 3 and 7 step transition matrices (you may use python to calcu-
late this but you need to show the code snippet, I would also suggest that you
arrange your transition matrix in the order red, violet, blue, and yellow)
1
2(c) Assuming, in a garden of flowers, the distribution of colours is red (33%), violet
(24%), blue (3%), and yellow (40%), calculate the distribution of colours after
6 generations (you may use python to calculate this but you need to show
the code snippet)
(d) What colour distribution will I get in the long term (you may use python to
do the calculations but you need to show the code snippet)
[20]
2. For the transition probability matrix
P =