5CCE2NMS: Numerical and Statistical Methods
Coursework 2
1. In a factory quality control process, two machines are responsible for producing parts. Ma- chine 1, represented by the random variable X, produces parts with quality scores ranging from 3 to 6, depending on various factors like precision and material used. Machine 2, represented by the random variable Y, produces parts with quality scores ranging from 3 to 5. These quality scores are crucial for maintaining the overall quality of the production line, as poor scores from either machine can lead to defects or product failures.
Your task is to model the joint distribution of the quality scores for these two machines, considering both their individual performance and their relationship to each other. This model can be used to understand how one machine’s performance affects the other and to predict outcomes in different conditions.
Let X and Y be two discrete random variables, where X has the possible outcomes {3, 4, 5, 6} (the quality scores of Machine 1) and Y has the possible outcomes {3, 4, 5} (the quality scores of Machine 2).
a. Construct a bivariate probability mass function pX,Y : {3, 4, 5, 6} × {3, 4, 5} → R that satisfies both of the following conditions: [15 marks]
(i) The expected quality score of Machine 1 is E[X] = 4.5.
(This represents the average performance of Machine 1, giving an idea of how it performs over time.)
(ii) The expected quality score of Machine 2, given that Machine 1’s score is 4, is E[Y | X = 4] = 4.6, i.e., the conditional expectation of Y given that x = 4.
(This showshow Machine 2 performs when Machine 1 produces apart with a score of 4. It reveals any dependencies between the machines.)
b. Calculate the covariance and correlation for your chosen distribution constructed for part (a).
(These measures show whether and how the performance of Machine 1 and Machine
2 are related, and how strong that relationship is.) [10 marks]
[TOTAL: 25 marks]
2. Imagine you are a data analyst working on a project for a logistics company that manages deliveries across multiple regions. Each day, the company collects data on various aspects of the delivery process to optimise efficiency and reduce costs. Three key random variables, X , Y and Z, represent different metrics:
• X represents the number of successful deliveries made out of 10 attempts on a particular route, where each delivery has a 50% chance of success. This follows a binomial distribution.
• Y represents the number of delivery attempts needed before the first successful delivery occurs on a challenging route, where each attempt has a 40% chance of success. This follows a geometric distribution.
• Z represents the total number of customer orders received in a specific region on a given day, with an average of 4 orders per day. This follows a Poisson distribution.
Let X , Y , and Z be independent random variables whose distributions are given by: X ~ Bin(10, 0.5), Y ~ Geo(0.4), Z ~ Po(4).
a. Plot the probability mass functions (PMFs) of the distributions for X , Y and Z in ONE figure with three subplots, using the same x-axis range for all subplots.
(This helps you visualise the behaviour of the three different metrics and compare their likelihoods.) [3 marks]
b. Find a combination of X , Y and Z whose expectation equals √e (where e is Euler’s number) and whose variance is π 2 .
(This could be useful for modelling a new metric that meets specific statistical require- ments for predicting future deliveries.) [10 marks]
c. Find a combination of X , Y and Z whose expectation is equal to its variance.
(This helps identify cases where the variability matches the average performance for indicating consistency. For instance, in a delivery system, if the expectation equals the variance, it suggests the process is stable and predictable. A balanced route with steady deliveries means fewer fluctuations that make the system easier to manage and less prone to disruptions.)) [5 marks]
d. Compute the covariance of the resulting variable in part (c) with Z.
(This allows you to understand how the new metric from part (c) relates to the number of customer orders Z. It gives insight into how deliveries depend on demand.)
[7 marks] [TOTAL: 25 marks]
3. A company operates a customer service system where a customer request is handled by four different departments: A (Initial Support), B (Technical Team), C (Billing), and D (Man- ager Escalation). The probabilities of a customer issue being handled by these departments stabilise over time and the long-term behaviour is described by the following probabilities:
p∞ (A → A) = 0.1, p∞ (A → B) = 0.4, p∞ (A → C) = 0.2, p∞ (A → D) = 0.3.
This scenario can be modelled using a Markov chain, where the customer request moves between departments according to a set of transition probabilities. You are tasked with constructing and analysing this Markov chain.
a. Construct a Markov chain with four states {A,B,C, D} representing the departments, such that the long-term transition probabilities from state A match those given above. Present the transition matrix and draw the diagram of the resulting Markov chain. In the transition matrix, the value in Column i and Row j represents the probability of transitioning from state si to state sj .
(The transition matrix should show the probabilities of a customer request being han- dled by each department, and the diagram will help visualise how the request moves through the system.) [13 marks]
b. What is(are) the most likely path(s) for a customer request to move from Initial Support (A) to Billing (C) within 4 time steps or fewer in your proposed Markov chain?
(This analysis helps determine the most probable route the request will take through the departments within a limited number of steps.) [4 marks]
c. Modify the Markov chain by introducing a fifth state E to represent an external consul- tant that sometimes handles customer requests. In this case, the long-term behaviour is such that p∞ (E → E) = 0, but at any given time step k > 0, the probability of staying in state E is non-zero: pk (E → E) 0. Draw the updated diagram of the Markov chain.
(This addition reflects situations where a request is temporarily passed to an external consultant but will eventually return to the internal team.) [8 marks]
[TOTAL: 25 marks]
4. a. In a board game, success may depend on rolling a specific number on a die multiple times. You are rolling a fair six-sided die and need to determine how many trials it will take to roll the number ‘1’ exactly s times, with the restriction that the first roll is not a ‘1’ . What is the probability that it takes exactly n rolls to achieve this outcome?
(This scenario helps analyse the likelihood of reaching a specific number of successes in a game with the consideration of a restriction on the first trial.) [15 marks]
b. In a network management setting, server reliability is crucial. Suppose a server has a probability of going down once every 10 days, modelled by a Poisson distribution, with the probability of a single downtime being 0.1. What is the probability that the server will experience exactly 5 downtimes in a 365-day period?
(This situation models server reliability over time, helping plan for maintenance sched- ules and system downtime management.)
[10 marks] [TOTAL: 25 marks]