Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In R, write code to simulate the answers to both parts a) and b) of problem B4 based on 100,000 replications. (Note that R won't

In R, write code to simulate the answers to both parts a) and b) of problem B4 based on 100,000 replications. (Note that R won't work if you leave the comma in a large number.) Suggestions: First write a line of code that will simulate drawing 5 cards from a "deck" with box model where the queen of spades has the value 1 and the other 51 cards have the value 0, then replicate that line 100,000 times using the replicate() function. The rep() function might be useful in constructing the "deck." Assign the output of the 100,000 replications to something, it should be a vector of length 100,000.If it's taking a long time (10 seconds or so) you can test with 1000 replications while you're trying things out, then do 100,000 after you are confident that you have the right idea. After you do that you can sum up the results and divide by 100,000. You have the answer in the back of the book, so you can compare the results of the simulation to the true value, they should be fairly close.

You can submit the code (probably 2 lines though you could do it in one line if you want) written in with your HW.

B4. Five cards are dealt off the top of a well-shuffled deck.

  • (a)Find the chance that the 5th card is the queen of spades.
  • (b)Find the chance that the 5th card is the queen of spades, given that the first
  • 4 cards are hearts.

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

Probability and Random Processes With Applications to Signal Processing and Communications

Authors: Scott Miller, Donald Childers

2nd edition

123869811, 978-0121726515, 121726517, 978-0130200716, 978-0123869814

More Books

Students also viewed these Mathematics questions

Question

Define Consumerism.

Answered: 1 week ago

Question

Name the system that includes heart, blood vessels and blood?

Answered: 1 week ago

Question

1. Electrochemical reaction?

Answered: 1 week ago