Question

In: Statistics and Probability

6.12. Use R to pick 5 cards from a deck of 52. Did you get a...

6.12.

Use R to pick 5 cards from a deck of 52. Did you get a pair or better? Repeat until you do. How long did it take?

6.9.

How much area is to the right of 1.5 for a normal (0,2)?

Solve using R software

Solutions

Expert Solution

Part 6.12

First we create a vector in R that resembles a deck of 52 cards.

R-code:

suits <- rep(c("Club", "Spade", "Diamond", "Hearts"),each=13)
value <- rep(c("Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"),times=4)
cards <- paste(value,"of",suits)

An example value of 'cards' vector is "Queen of Hearts"

Now we will use the 'sample' function in R to simulate a sample draw. We say it is a pair, when two same value come up in the sample. We use the sample function without replacement option.

R-code:

sample(cards, size = 5,replace = FALSE)

For my simulation it took 2 tries for me to get a pair.

Part 6.9:

Let us say X is a random variable, such that

Area to the right of 1.5 means, we have to find

Using 'pnorm' function of R, we get

R-Code:

pnorm(1.5, mean=0, sd=2,lower.tail=F)

So the area to right of 1.5 for a N(0,2) is 0.2266274.


Related Solutions

Pick two cards at random from a well-shuffled deck of 52 cards (pick them simultaneously so...
Pick two cards at random from a well-shuffled deck of 52 cards (pick them simultaneously so they are not the same card). There are 12 cards considered face cards. There are 4 cards with the value 10. Let X be the number of face cards in your hand. Let Y be the number of 10's in your hand. Explain why X and Y are dependent.
You pick cards one at a time without replacement from an ordinary deck of 52 playing...
You pick cards one at a time without replacement from an ordinary deck of 52 playing cards. What is the minimum number of cards you must pick in order to guarantee that you get a) three of a kind, and b) three Kings. Use the binomial theorem to expand (2x + y)^6. You must illustrate use of the binomial theorem.
You pick two cards, with replacement, from a standard 52 card deck. The probability that both...
You pick two cards, with replacement, from a standard 52 card deck. The probability that both are red 7's is approximately: Question options: .0001 .0027 .0015 .0004
Assume that 5 cards are dealt at random from a standard deck of 52 cards (there...
Assume that 5 cards are dealt at random from a standard deck of 52 cards (there are 4 suits in the deck and 13 different values (ranks) per each suit). We refer to these 5 cards as a hand in the rest of this problem. Calculate the probability of each of the following events when dealing a 5-card hand at random. (a) Exactly one pair: This occurs when the cards have numeric values a, a, b, c, d, where a,...
Suppose you are dealt 5 random cards from a standard deck of 52 cards, where all...
Suppose you are dealt 5 random cards from a standard deck of 52 cards, where all cards are equally likely to appear. (a) What is your outcome space? (b) What is the probability that you receive the ace of hearts? (c) Let AH be the event that you receive the ace of hearts, AC the event that you receive the ace of clubs, AD the event that you receive the ace of diamonds, and AS the event that you receive...
10. How many ways are there to choose 5 cards from 52 deck of cards to...
10. How many ways are there to choose 5 cards from 52 deck of cards to obtain (a) a full house? That is, of the from aaabb with a and b distinct denominations. (b) a three of a kind? That is, of the form aaabc where a, b, c are have distinct denominations? Ans: (a) 3,744; (b) 54,912
10. How many ways are there to choose 5 cards from 52 deck of cards to...
10. How many ways are there to choose 5 cards from 52 deck of cards to obtain a three of a kind?
Suppose we draw 5 cards at random, without replacement, from a deck of 52 cards (such...
Suppose we draw 5 cards at random, without replacement, from a deck of 52 cards (such a deck includes 4 Queens). Let X denote the number of Queens drawn. Define some indicator random variables X1,..., X5 so that X = X1+:::+X5. Then use the random variables you created to find E(X). Also calculate the E[X] if this time 5 cards are drawn with replacement.
From the 52-card deck, 5 cards are selected. Without replace the cards, find the probability of...
From the 52-card deck, 5 cards are selected. Without replace the cards, find the probability of select first a spade, the second card is another spade, the third card is a red card, the fourth card is a club and the last card is another red card.
A poker hand consists of 5 cards dealt from an ordinary deck of 52 playing cards....
A poker hand consists of 5 cards dealt from an ordinary deck of 52 playing cards. How many different hands are there consisting of four cards of one suit and one card of another​ suit?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT