In: Statistics and Probability
2. You are designing a puzzle video game that requires fast reaction skills. Note that games such as this can be used in medical settings as methods of psychological and mental assessment, and do not only have uses for entertainment.
You are creating a game where players are supposed to do a simple task, but the simple task changes when the background colour of the game changes, which happens unpredictably. There are four possible background colours, where players are told that each one is associated with a specific described task for them to complete. One round of the game consists of each background colour appearing once in a random order (for example, red, green, blue, yellow). The length of time that a background colour lasts before it changes has an Exponential distribution with parameter λ, but you have not decided on the value of λ yet. If Ti is the length of time that the ith background colour lasts, then Ti ∼ Exp(λ).
(a) Recall that one ‘round’ of the game consists of all four background colours appearing once each. First, define a new random variable for the length of time that a round lasts, and express it in terms of the Ti random variables. Second, state the distribution of the new random variable in terms of λ. Third, suggest a value for λ such that the expected length of time for a single round would be 12 seconds.
(b) If this game was being used in a medical setting to assess mental attentiveness or reaction time, then there might be worry that a single round of the game would be a poor assessment of the desired trait in the patient. Collecting more information would be better, and it might also be better to vary the order that the coloured backgrounds appear. You decide that the game will have multiple rounds, and there will be one round for every single possible order that the four colours can appear in (i.e., there will be one ‘red, green, blue, yellow’ round, one ‘green, red, yellow, blue’ round, etc.). In between each round, there will be 2 seconds of black screen time to offer a moment for the patient to gather themselves. Calculate the expected length of a whole game from start to finish, using your suggested λ from Part (a). Do not include any black screen time before the first round or after the last round.
Let seconds be the length of time that the ith background color lasts. Since there are 4 possible background colors, i=1,2,3,4 and 4 possible times seconds
Each of these 4 possible time are exponentially distributed with parameter
or we say that
a) There are 4 background colors, each lasting seconds respectively.
Let Y be the total time of a single round. Y is the sum of the length of time each of the 4 backgrounds lasts. That is
We know that the sum of n exponential random variables has a gamma distribution with parameters n, (where n is the shape parameter and is the rate parameter). We also call this an Erlang distribution with parameters n, (where n is the shape parameter and is the rate parameter).
Here n=4. Hence Y has an Erlang distribution with parameters 4,.
The expected value of Y is
We want the the expected length of time for a single round be 12 seconds. That is we want E(Y)=12
Hence
ans:
b) Total number of combinations of colors that can be displayed out of 4 colors is 4*3*2*1 = 24. (without having the colors repeated)
that means we need to have 24 rounds. Each round would take seconds to complete, plus the 2 seconds of black screen in between the rounds , where i=1,2,...,24. There would be a black screen after Y1,Y2,...,Y23, but not after Y24.
Hence there would be 23 black screens of fixed duration of 2 seconds each (this is not a random variable). That is the total time taken up by the 23 black screens is 23*2=46 seconds.
Hence the total time taken by the game is
the expected value of this total time is
ans: the expected length of a whole game from start to finish is 334 seconds