MATLAB Exercises 1. Suppose that we toss a fair coin (the probability of getting His 5) many times. At any point in time
Posted: Wed May 11, 2022 11:16 am
MATLAB Exercises 1. Suppose that we toss a fair coin (the probability of getting His 5) many times. At any point in time, we look at the outcome of the previous two tosses. There are four possibilities: 1 HH, HT, TH, TT where H represents heads and T represents tails. These possibilities determine four states: Si is HH, S2 is HT. Sy is TH, and S4 is TT. Now consider the probability of going from one state to another in one toss. For example, the probability of going from S, to Sin one toss is 5, while the probability of going from Sy to S, in one toss is 0. It is possible to go from Sto S. a. Find the stochastic matrix for this problem. b. Is it regular? c. Find a steady-state vector.
a 2. A bank has a single teller with a queue that holds a maximum of n customers. In a unit of time, the teller will handle at most one customer, and at most one customer will attempt to join the queue. Let p be the probability that there is an arrival in a unit of time, and let q = 1 - p. Letr be the probability that the teller finishes with a customer in a unit of time, and let s = 1-r. Let state S, indicate that the total number of people either in the queue or being served is i. thus there are n + 1 states, So...., S,. The probability of a move from S, to Si+1 for 0<i<n is the probability that there is a new arrival and that the teller is not finished with the previous customer; this probability is ps. The probability of a move from Sto S-1 is the probability that there is no new arrival and the teller finishes; that probability is gr. Suppose that n = 10, p = 2, and r = .4. a. Find the stochastic matrix for this chain. b. Show that the matrix is regular. c. Find the steady-state vector. The entries in the steady-state vector can be interpreted as the long range probabilities of being in the various states. d. What is the probability that there is no one in the queue and the teller is napping? e. What is the probability that there is one person in the queue? f. What is the probability that there are less than 8 people in the queue?
a 2. A bank has a single teller with a queue that holds a maximum of n customers. In a unit of time, the teller will handle at most one customer, and at most one customer will attempt to join the queue. Let p be the probability that there is an arrival in a unit of time, and let q = 1 - p. Letr be the probability that the teller finishes with a customer in a unit of time, and let s = 1-r. Let state S, indicate that the total number of people either in the queue or being served is i. thus there are n + 1 states, So...., S,. The probability of a move from S, to Si+1 for 0<i<n is the probability that there is a new arrival and that the teller is not finished with the previous customer; this probability is ps. The probability of a move from Sto S-1 is the probability that there is no new arrival and the teller finishes; that probability is gr. Suppose that n = 10, p = 2, and r = .4. a. Find the stochastic matrix for this chain. b. Show that the matrix is regular. c. Find the steady-state vector. The entries in the steady-state vector can be interpreted as the long range probabilities of being in the various states. d. What is the probability that there is no one in the queue and the teller is napping? e. What is the probability that there is one person in the queue? f. What is the probability that there are less than 8 people in the queue?