Question

In: Statistics and Probability

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 day (new = 0.9 × orginal).

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 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.

Solutions

Expert Solution

1)

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

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)....
Using R Studio/R programming... Usually, we will use a random sample to estimate the statistics of...
Using R Studio/R programming... Usually, we will use a random sample to estimate the statistics of the underlying population. If we assume a given population is a standard normal distribution and we want to estimate its mean, which is the better technique to estimate that mean from a sample: Use the mean of one random sample of size 500 Use the mean of 300 random samples of size 10 Run your own experiment and use your results as a supporting...
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?
Please use R studio, Thank you. 2. The probability of a student passing statistics is known...
Please use R studio, Thank you. 2. The probability of a student passing statistics is known to be 0.41; and the probability of a student passing chemistry is known to be 0.55. If the probability of passing both is known to be 0.35, calculate: (a) the probability of passing at least one of statistics and chemistry (b) the probability of a student passing chemistry, given that they passed statistics (c) Are passing chemistry and statistics independent? Justify (d) (harder) a...
imagine that you are a Manager in an international company. After Covid-19, it is finally time...
imagine that you are a Manager in an international company. After Covid-19, it is finally time to reopen your doors. What kind of strategies you will develop to make business communication more effective in new circumstances? Choose diversity challenge (age, gender, nonverbal body language communication) and team communication to explain your answer.
Imagine that you are a government advisor during the COVID-19 crisis when there is a large...
Imagine that you are a government advisor during the COVID-19 crisis when there is a large recessionary gap. You are working on the governments fiscal stabilization policy that will be implemented as the crisis subsides. What are the government’s options in terms of government spending G? What are the pros and cons of each option? (Hint: consider whether you expect private aggregate demand to rebound quickly after restrictions are lifted.)
Given you are constrained to your house due to Covid-19 you have decided to try and...
Given you are constrained to your house due to Covid-19 you have decided to try and launch your own small business. Required (200 words): a. Design a small business and document 1 key product. Name your business and product. List a maximum of 10 costs that will be involved in selling your product and explain why they are either a variable or fixed cost. b. Estimate a reasonable selling price per unit for your product and estimate a value for...
Given you are constrained to your house due to Covid-19 you have decided to try and...
Given you are constrained to your house due to Covid-19 you have decided to try and launch your own small business. Required (200 words): c.Workout your Breakeven point, showing all calculations. d.Assume you require a profit of $25,000, calculate your new breakeven point, showing all calculations. e. Define and calculate the ‘Margin of Safety’, in both units and dollars, assuming you sell 75,000 units. Ensure you include all calculations.
How have you interacted with your elders during the COVID 19 pandemic? How have you maintained...
How have you interacted with your elders during the COVID 19 pandemic? How have you maintained respectful communication while using facemasks and other PPE? What behavior modifications can you suggest that has been successful to you in your practice? Please share any approaches that may help all of us.
Please Use R studio to answer the question. This is the Statistics section of Comparing Groups....
Please Use R studio to answer the question. This is the Statistics section of Comparing Groups. One month before the election, a poll of 630 randomly selected votes showed 54% planning to vote for a certain candidate. A week later, it became known that he had had an extramarital affair, and a new poll showed only 51% of 1010 voters supporting him. Do these results indicate a decrease in voter support fo his candidacy? a) Test an appropriate hypothesis as...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT