Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with setting up simulation in R markdown. Any suggestions greatly appreciated Congratulations! You have inherited an ice cream truck for the summer of

Need help with setting up simulation in R markdown. Any suggestions greatly appreciated

Congratulations! You have inherited an ice cream truck for the summer of 2022. You will be selling ice cream from the truck every day that summer: 101 days in total, from Memorial Day weekend until Labor Day weekend. This problem will step you through projecting how much ice cream you expect to sell (as well as how much revenue you expect to make) during the summer.

a) Ice cream sales are known to be very dependent on weather. Suppose that for any particular day, the weather is either rainy or sunny; on average, one-third of the days are rainy and two-thirds of the days are sunny. Compute the expected number of sunny days in Summer 2022 and the probability of there being more rainy days than sunny days in Summer 2022. You may assume that the weather is independent between days.

b) It is more realistic to think that tomorrow's weather depends on today's weather (for all days throughout the summer). Suppose that if it is sunny today, there is an 80% chance that tomorrow will also be sunny; however, if it is rainy today, there is only a 30% chance that tomorrow will be sunny. Additionally, suppose that the weather on 'Day 0' (i.e., the day before your ice cream truck opens) is known to be sunny.

**Based on a simulation with 10,000 replicates, estimate the probability of there being more rainy days than sunny days in Summer 2022. Write a brief paragraph outlining the logic of the simulation and clearly comment your code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Algebra Functions & Authentic Applications

Authors: Jay Lehmann

5th Edition

0321923464, 9780321923462

More Books

Students also viewed these Mathematics questions

Question

Evaluate 1.) x4 - 2x3 + 3x -x+3 dx 2 x - 2x + 3x

Answered: 1 week ago

Question

Personal role: This consists of service to family and friends.

Answered: 1 week ago

Question

The role of life: It consists of your own service to yourself.

Answered: 1 week ago