Question

In: Statistics and Probability

A computer is shared by 2 users who send tasks to a computer remotely and work...

A computer is shared by 2 users who send tasks to a computer remotely and work independently. At any minute, any connected user may disconnect with probability 0.5, and any disconnected user may connect with a new task with probability 0.2. Let X(t) be the number of concurrent users at time t (in minutes). This is a Markov chain with 3 states: 0, 1, and 2. The probability transition matrix can be calculated and it is Generate 10000 transitions of the Markov chain. What percent of times do you find your generated Markov chain in each of its 3 states? Write using R code.

Solutions

Expert Solution

The transition probability from state 0 to 0 is 0.8 * 0.8 = 0.64 ((both disconnected stays connected )

The transition probability from state 0 to 1 is 0.2 * 0.8 + 0.8 * 0.2 = 0.32 ((A disconnected user connect and another one stays disconnected and vice-versa)

The transition probability from state 0 to 2 is 0.2 * 0.2 = 0.04 ((both disconnected user now connected)

The transition probability from state 1 to 0 is 0.5 * 0.8 = 0.4 ((A connected user disconnect and disconnected user stay disconnect)

The transition probability from state 1 to 1 is 0.5 * 0.2 + 0.5 * 0.8 = 0.5 (A connected user disconnect and disconnected user connects or A connected user stay connected and disconnected user stay disconnected)

The transition probability from state 1 to 2 is 0.5 * 0.2 = 0.1 ((A connected user stay connected and disconnected user connects)

The transition probability from state 2 to 0 is 0.5 * 0.5 = 0.25 ((both connected user disconnects)

The transition probability from state 2 to 1 is 0.5 * 0.5 + 0.5 * 0.5 = 0.5 ((A connected user disconnect and another one connected and vice-versa)

The transition probability from state 2 to 2 is 0.5 * 0.5 = 0.25 ((both stay connected)

The transition probability matrix is,

R code :

p = matrix(data = c(0.64,0.4,0.25,0.32,0.5,0.5,0.04,0.1,0.25), nrow = 3)
all.states = c(0,1,2)
state = 0 #initial state
transitions = c()
for (i in 1:10000) {
if(state == 0) {
state = sample(all.states, 1, prob = c(0.64,0.32,0.04)) #Get next state transitioning from state 0
}
if(state == 1) {
state = sample(all.states, 1, prob = c(0.4,0.5,0.1)) #Get next state transitioning from state 0
}
if(state == 2) {
state = sample(all.states, 1, prob = c(0.25,0.5,0.25)) #Get next state transitioning from state 0
}
transitions = c(transitions, state) #Append states
}
sum(transitions == 0)/10000
sum(transitions == 1)/10000
sum(transitions == 2)/10000

After running the R code, we get the output as,

> sum(transitions == 0)/10000
[1] 0.6482

> sum(transitions == 1)/10000
[1] 0.3227

> sum(transitions == 2)/10000
[1] 0.0291

Thus, percent of times the generated Markov chain is in each of its 3 states are 64.82%, 32.27% and 2.91%


Related Solutions

1. Why a computer can perform some tasks for us? 2. What computer device could Fetch...
1. Why a computer can perform some tasks for us? 2. What computer device could Fetch instructions, follow the instructions, and produce some results? 3. What is the function of computer memory (RAM)? What is used to translate each source code instruction into the appropriate machine language instruction? 4. What is the correct sequence in the process of translating a source file into an executable file? 5. The step that will uncover any syntax errors in your program is ________________....
A research company is interested in determining the true proportion of Americans that work remotely. In...
A research company is interested in determining the true proportion of Americans that work remotely. In a random sample of 200 individuals, 4.5% of them work remotely. Find a 90% confidence interval for the true proportion of Americans that work remotely.
1. What is the accounting equation? 2. Who are the internal users of a company’s financial...
1. What is the accounting equation? 2. Who are the internal users of a company’s financial information? What kind of decisions do they need to make using financial information? 3. What are the four major financial statements of a corporation? 4. GAAP principles and concepts 5. What are the requirements of the Sarbanes-Oxley Act? 6. What is IASB? 7. What are assets? What are prepaid expenses? Examples? 8. What is a liability? What is an unearned revenue? Examples? 9. What...
1.   Define accounting. Who are the major users of accounting information? 2.   What are the three...
1.   Define accounting. Who are the major users of accounting information? 2.   What are the three major business activities in which accountants play a major role? Give an example of each. 3.   What does the term GAAP mean? Briefly explain the roles of the Financial Accounting Standards Board and the Securities and Exchange Commission. 4.   What is double-entry bookkeeping? Give a brief example. 5.   List the four major financial statements. Which financial statements are permanent and which are temporary?
Who is ultimately responsible for shared prescribing decisions and why?
Who is ultimately responsible for shared prescribing decisions and why?What options do doctors have in responding to patients’ requests for particular medication?
A sociologist sampled 200 people who work in computer related jobs, and found that 42 of...
A sociologist sampled 200 people who work in computer related jobs, and found that 42 of them have changed jobs in the past 6 months. Construct a 85% confidence interval for the proportion of those who work in computer-related jobs who have changed jobs in the past six months
Consider an employee using their computer to send and retrieve email at their workplace. Only Ethernet...
Consider an employee using their computer to send and retrieve email at their workplace. Only Ethernet networks are used for physical connectivity, but the mail server is located on a separate network. The employee’s network and the mail server’s network are connected by a single router which also has a connection to the Internet via the workplace’s ISP. Explain how the employees email client sends and receives emails using the email server, indicating any protocols involved and where any encapsulation/decapsulation...
Write a Pseudo Code to send an Array of 20 elements from 8051 to the computer...
Write a Pseudo Code to send an Array of 20 elements from 8051 to the computer via serial port at maximum baud rate possible with XTAL=11.0592MHz.
Work specialization allow managers to break complex tasks into smaller, more precise tasks that individual employees...
Work specialization allow managers to break complex tasks into smaller, more precise tasks that individual employees can complete. Briefly explain the evolution of specialisation and outline the reasons for specialisation of work.
Suppose a network access link of 1 Mbps capacity is being shared among 10 users through...
Suppose a network access link of 1 Mbps capacity is being shared among 10 users through packet-switching and each user has 20% probability of using the link at any time. Assuming the link bandwidth is shared equally among its active users, what is the probability (in %) that each user is experiencing a bandwidth equal to or above 300 Kbps (Kilobits per second)?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT