Question

In: Statistics and Probability

Imagine that you and your friend have caught COVID-19 while jogging without social distancing. Your case...

Imagine that you and your friend have caught COVID-19 while jogging without social distancing. Your case is more severe than your friend’s at the beginning: there are 400 millions of coronavirus in you, and only 120 million in your friend. However, your immune system is more effective. In your body, the number coronavirus decreases by 20 percent each day (new = 0.8 × original), while in your friend it decreases by 10 percent each day (new = 0.9 × original).

  1. Write a for-loop to compute the number of coronavirus in your body and your friend’s over the next 14 days.

  2. Plot the number of coronavirus in your and your friend’s body from day 1 to day 14 (time series plot). Make sure to plot two time series in one figure.

  3. Find the day that the number of coronavirus in your friend’s body begins to surpass that in yours.

PLEASE USE R CODE TO ANSWER THE PROBLEM.

Solutions

Expert Solution

1)

#RCode  :for-loop to compute the number of coronavirus in your body and your friend’s over the next 14 days.

Your_orginal=400
friend_orginal=120
Your_coronavirus =numeric()
Friend_coronavirus =numeric()

Day=numeric()

for( i in 1:14){
Your_new = 0.8*Your_orginal
friend_new = 1.1*friend_orginal
Your_coronavirus =append(Your_coronavirus , Your_new)
Friend_coronavirus =append(Friend_coronavirus ,friend_new)
Day=append(Day,i)
Your_orginal=Your_new
friend_orginal=friend_new
}
Data=data.frame(Day,Your_coronavirus,Friend_coronavirus)
plot(Day,Your_coronavirus,type="l",col="Green")
lines(Day,Friend_coronavirus,col="Blue")

=======================

2)

Green represent =Your_coronavirus

Blue represent =Friend_coronavirus

3) Day = 4

4th day that the number of coronavirus in your friend’s body begins to surpass that in yours.

===================================================

If you have any doubt please let me know through comment
Please give positive vote if you find this solution helpful. Thank you!


Related Solutions

R - STUDIO R PROGRAMMING STATISTICS Imagine that you and your friend have catched COVID-19 while...
R - STUDIO R PROGRAMMING STATISTICS Imagine that you and your friend have catched COVID-19 while jogging without social distancing. Your case is more severe than your friend’s at the beginning: there are 400 millions of coronavirus in you, and only 120 millions in your friend. However, your immune system is more effective. In your body the number coronavirus decrease by 20 percent each day (new = 0.8 × orginal), while in your friend it increases by 10 percent each...
How has Covid-19 impacted Zoom's staffing due to Covid-19 social distancing rules and so on?
How has Covid-19 impacted Zoom's staffing due to Covid-19 social distancing rules and so on?
The world post Covid 19 has created the concept of social distancing which will impact on...
The world post Covid 19 has created the concept of social distancing which will impact on the way we do business. Online purchasing is expected to increase because it will reduce human interaction and contribute to the reduction of Covid 19 related illnesses. However, online purchases have created contemporary legal issues which may be a novel for most legal systems in several Caribbean Countries. You are required to critically discuss the concept of online purchases and the various methods used...
The world post Covid 19 has created the concept of social distancing which will impact on...
The world post Covid 19 has created the concept of social distancing which will impact on the way we do business. Online purchasing is expected to increase because it will reduce human interaction and contribute to the reduction of Covid 19 related illnesses. However, online purchases have created contemporary legal issues which may be a novel for most legal systems in several Caribbean Countries. You are required to critically discuss the concept of online purchases and the various methods used...
The world post Covid 19 has created the concept of social distancing which will impact on...
The world post Covid 19 has created the concept of social distancing which will impact on the way we do business. Online purchasing is expected to increase because it will reduce human interaction and contribute to the reduction of Covid 19 related illnesses. However, online purchases have created contemporary legal issues which may be a novel for most legal systems in several Caribbean Countries. You are required to critically discuss the concept of online purchases and the various methods used...
The world post Covid 19 has created the concept of social distancing which will impact on...
The world post Covid 19 has created the concept of social distancing which will impact on the way we do business. Online purchasing is expected to increase because it will reduce human interaction and contribute to the reduction of Covid 19 related illnesses. However, online purchases have created contemporary legal issues which may be a novel for most legal systems in several Caribbean Countries. You are required to critically discuss the concept of online purchases and the various methods used...
The COVID-19 pandemic and the need to control the spread of virus through social distancing has...
The COVID-19 pandemic and the need to control the spread of virus through social distancing has lowered the productivity of delivering non-tradable local services in all countries. This is unlikely to be a short-term phenomenon because even if a vaccine or herd immunity for the COVID-19 is developed, concerns about other deadly viruses that may emerge in the future may prompt people to exercise social distancing indefinitely. The extent and significance of such practices will vary among countries due to...
Question 1 The world post Covid 19 has created the concept of social distancing which will...
Question 1 The world post Covid 19 has created the concept of social distancing which will impact on the way we do business. Online purchasing is expected to increase because it will reduce human interaction and contribute to the reduction of Covid 19 related illnesses. However, online purchases have created contemporary legal issues which may be a novel for most legal systems in several Caribbean Countries. You are required to critically discuss the concept of online purchases and the various...
3. Imagine you are talking with your friend while drinking water. All of a sudden, you...
3. Imagine you are talking with your friend while drinking water. All of a sudden, you start coughing uncontrollably because water has just gone down the “wrong pipe.” Explain why this happened. What structure prevents this? Explain the inside of the lungs (the branching systems) and why they do not like for liquid to be in the lungs. What happens when the lungs fill with liquid?
Imagine that you have a friend who has a social phobia associated with speaking in public....
Imagine that you have a friend who has a social phobia associated with speaking in public. They absolutely hate public speaking and have panic reactions anytime they are forced to do so. They do everything they can to avoid it, including dropping classes that require it. Imagine that they have a catastrophizing mindset that raises their anxiety. What might they be saying to themselves? (be creative- there can be many things that go wrong in a presentation). What practices might...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT