Find the chance that the 5th card is the queen of spades

Assignment Help Basic Computer Science
Reference no: EM132110069

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. 

Reference no: EM132110069

Questions Cloud

Explain some changes that we may see in emergency management : Explain some changes that we may see in Emergency Management in the future in your words?
Discuss the potential benefits to using these technology : There are multiple ways to use technology to help develop a healthy lifestyle. For children, it might be in the form of incorporating games into the existing
List and describe five fundamental principles : FNSACC608 Evaluate Organisation's Financial Performance - FNS60217 Advanced Diploma of Accounting - What is a cost-benefit analysis (CBA)?
Write a short story about a childs journey from birth to age : Write a short story about a child's journey from birth to age 1. This can be a fictional child, or can be based on a real child.
Find the chance that the 5th card is the queen of spades : (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
What is the standard deviation : One of the values in a normal distribution is 43 and its z-score is 1.65. If the mean of the distribution is 40, what is the standard deviation?
Is the magnetic field created by a current loop uniform : Is the magnetic field created by a current loop uniform? Explain. Does a wire connected to the terminals of abattery emit electromagnetic waves? Explain.
Find the probability that a car battery lasts : Assuming that the car battery useful life has a normal distribution, find the probability that a car battery lasts less than 2.3 years.
What is the range of the projectile : A projectile is fired with speed (V0) at an angle theta) from the horizontal as shown in the figure. What is the range of the projectile?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Has the landscape artist met the homeowner''s requirements

The diagram shows the plans made by a landscape artist for a homeowner's 16-meter by 16-meter backyard. The homeowner has requested that the rosebushes, fountain, and garden bench be placed so that they are no more than 14 meters apart.

  Determine the friction force at a

The 45-kg disk rests on the surface for which the coefficient of static friction is µA = 0.15 If M = 50 N. m determine the friction force at A.

  Environmental analysis for proposed new division

Conduct an internal and external environmental analysis for your proposed new division and its business model.

  Purgable hydrogen sulfide monitors

A company that manufactures purgable hydrogen sulfide monitors will make deposits such that each one is 5% larger than the preceding one.

  Importance of training and support after software

Write a three page that explains the importance of training and support after software is implemented.

  Write a do while loop to validate

1. Write a Do While loop to validate that the user enters a nonzero integer into an input box for a variable named int Denominator

  Meet the cost-effectiveness criterion

Show that a uniform standard of pollution reduction will not meet the cost-effectiveness criterion

  Object oriented design patterns

Identify the design patterns that are implemented into the system you chosen for your project. Identify the quality attributes associated to the design patterns. Did you experience these quality when you used the system?

  Build linear models to represent relation advertising-brand

Build linear models to represent the relation between advertising and brand preference for these two groups. What preferences would the models predict for advertising of $60 million?

  What is bigdata

What is BigData? How does it help make the best use of all the historic data that we have?

  Calculate her optimal consumption basket

Calculate her optimal consumption basket when the price of tea is $2 per unit.

  Mean for the countless hardware manufacturers

What do you think the advantages and disadvantages are? What does this mean for the countless hardware manufacturers?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd