Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Deck .csv is the following face,suit 2,H 3,H 4,H 5,H 6,H 7,H 8,H 9,H 10,H J,H Q,H K,H A,H 2,S 3,S 4,S 5,S 6,S 7,S

image text in transcribed

Deck .csv is the following

"face","suit"

"2","H"

"3","H"

"4","H"

"5","H"

"6","H"

"7","H"

"8","H"

"9","H"

"10","H"

"J","H"

"Q","H"

"K","H"

"A","H"

"2","S"

"3","S"

"4","S"

"5","S"

"6","S"

"7","S"

"8","S"

"9","S"

"10","S"

"J","S"

"Q","S"

"K","S"

"A","S"

"2","C"

"3","C"

"4","C"

"5","C"

"6","C"

"7","C"

"8","C"

"9","C"

"10","C"

"J","C"

"Q","C"

"K","C"

"A","C"

"2","D"

"3","D"

"4","D"

"5","D"

"6","D"

"7","D"

"8","D"

"9","D"

"10","D"

"J","D"

"Q","D"

"K","D"

"A","D"

3. Read in the file "deck.csv", which we will use to simulate drawing cards from a deck. (check the demonstration file for a related erample) (a) Simulate drawing two cards (without replacement) 5 times and print out the hand each (b) Simulate drawing a hand of twords 100,000 times to estimate the probability of drawing a pair (two cards with the same face) (c) Simulate drawing a hand of five cards (without replacement) 100,000 times to estimate the probability of drawing a flush (all suits are the same to measure the number of different suits in hand). (Hint: use length(unique (handSsuit))

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

More Books

Students also viewed these Databases questions

Question

5. Identify three characteristics of the dialectical approach.

Answered: 1 week ago

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago