Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the following R code. The argument is constructed correctly. How would I figure out how many outcomes of the 4000 tries are above 6

For the following R code. The argument is constructed correctly. How would I figure out how many outcomes of the 4000 tries are above 6 minutes?

for (i in 1:4000) {

rainTime = runif(n = 1, min = 1, max = 2)

rainFlag = rbern(n = 1, prob = 0.3)

rainX = (rainTime * rainFlag)

wash = runif(n = 1, min = 2, max = 3)

prewash = runif(n = 1, min = 1, max = 2)

totalTime = (wash + prewash + rainX)

}

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_2

Step: 3

blur-text-image_3

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

Making Hard Decisions with decision tools

Authors: Robert Clemen, Terence Reilly

3rd edition

538797576, 978-0538797573

More Books

Students also viewed these Mathematics questions