Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

STAT 400University of Maryland Programming Language R Exam Practice

STAT 400University of Maryland Programming Language R Exam Practice

STAT 400University of Maryland Programming Language R Exam Practice

Question Description

# 1. Monty-Hall Three doors

Recall the Monty-Hall game with three doors, discussed in class. Run a simulation to check that the probablility of winning increases to 2/3 if we switch doors at step two.

Set up the experiment two functions “monty_3doors_noswitch” and “monty_3doors_switch” (these functions will have no input values):

“`{r}

monty_3doors_noswitch <- function(){

}

monty_3doors_switch <- function(){

}

“`

Use your two functions and the replicate function to compute the empirical probablility of winning for the two experiments.

Compare your answers with the actual theoretical predictions.

“`{r}

“`

# 2: Monty-Hall with Ten doors.

Repeat the Monty Hall experiment now with 10 doors. Recall the game is as follows:

Step 1: you choose one door at random.

Step 2: Monty opens 8 (out of 9 doors) that do not have the prize.

Step 3: you either switch or don’t switch.

Set up the experiment two functions “monty_10doors_noswitch” and “monty_10doors_switch” (these functions will have no input values):

“`{r}

monty_10doors_noswitch <- function(){

}

monty_10doors_switch <- function(){

}

“`

Use your two functions and the replicate function to compute the empirical probablility of winning for the two experiments.

Compare your answers with the actual theoretical predictions.

“`{r}

“`

# 3. Monty-Hall 10-doors (modified).

Consider the following modified Monty-Hall game with 10 doors.

Step 1: you choose one door at random.

Step 2: Monty opens 7 (out of 9 doors) that do not have the prize.

Step 3: you either stick with your original choice, or choose between one of the two unopened doors.

Set up the experiment two functions “monty_10doors_mod_noswitch” and “monty_10doors_mod_switch” (these functions will have no input values):

“`{r}

monty_10doors_mod_noswitch <- function(){

}

monty_10doors_mod_switch <- function(){

}

“`

Use your two functions and the replicate function to compute the empirical probablility of winning for the two experiments.

The computation of the theoretical probability in this case might not be completely obvious, however, use your empirical probability to make a guess.

“`{r}

“`

Not for submission: Play with this modified setup, for example Monty opens 6 doors at step 2 etc.

# 4. BONUS: Monty Hall with n-doors.

Repeat the Monty Hall experiment now with n doors. Recall the game is as follows:

Step 1: you choose one door at random.

Step 2: Monty opens n-2 (out of n-1 doors) that do not have the prize.

Step 3: you either switch or don’t switch.

Set up the experiment two functions “monty_10doors_noswitch” and “monty_10doors_switch” (these functions will have input value as n):

“`{r}

monty_ndoors_noswitch <- function(n){

}

monty_ndoors_switch <- function(n){

}

“`

Use your two functions and the replicate function to compute the empirical probablility of winning for the two experiments.

Compare your answers with the actual theoretical predictions.

“`{r}

“`

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20