Question

In: Statistics and Probability

Suppose n different cards are contained in a bag. You pick at card at random, observe...

Suppose n different cards are contained in a bag. You pick at card at random, observe which one you picked, and place it in the bag. This procedure is repeated until you draw a card that you drew previously: let X be the total number of times you pick a card. Using R (or an R function) estimate, via simulation, P(X > 10) for the case where n = 30. Need the R code for this without using monte carlo but basic r functions.

Solutions

Expert Solution

OUTPUT:

HERE ACTUAL PROBABILITY IS GIVEN BY THE EVENT >

TO GET 10 DIFFERENT CARD IN FIRST 10 DRAWS i.e

solving this gives 0.1846

and simulating it over   sample ans of required probability is obtained as 0.1851

R CODE:

a<-c(1:30)
b<-c(21:30)
b<-b/30
print(prod(b))
count<-0
num<-100000
for (i in 1:num)
{
d<-sample(a,10,replace =TRUE)
d<-sort(d)
e<-c(0,d)
e<-e[-11]
if(sum((d-e)==0)>0)
count<-count+1
}
print(1-count/num)

#OVER

PLEASE RATE THE ANSWER BY THUMBS UP IF YOU LIKED THE SOLUTION.

THANKS for asking the problem


Related Solutions

Cards: Suppose you draw one card from a single deck of cards. (a) What is the...
Cards: Suppose you draw one card from a single deck of cards. (a) What is the probability that you draw an queen? Round your answer to 3 significant digits*. (b) What is the probability that you draw a heart? Round your answer to 3 significant digits*. (c) What is the probability that you draw the queen of hearts? Round your answer to 3 significant digits*. ............................................... *Significant Digits: Here are some probabilities expressed to 3 significant digits. You start counting...
Suppose that six cards are selected at random from a standard 52-card deck, what is the...
Suppose that six cards are selected at random from a standard 52-card deck, what is the probability that two of the selected cards are less than 5 and neither of them is black and two cards are greater than 10 neither of them is red, and the last two cards are any cards?
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
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.
Consider a standard deck of 52 cards. You select one card at random and do not...
Consider a standard deck of 52 cards. You select one card at random and do not replace it. You shuffle the deck and then pick another card. If you are trying to find the probability that you pick a Red card first (denoted by R) and then a King card (denoted by K), which of the following probability statements is applicable for finding the probability? P(R )P(K|R) n(R AND K)/n(S) P(R|K )P(K|R) P(R )+P(K)-P(R n K)
A card is drawn at random from a deck of cards so that the chance of...
A card is drawn at random from a deck of cards so that the chance of getting any card is equally likely. Given that the card was either an A; 2; 3; 4; 5 or 6, what is the chance that either the card was red or that the card was a number card (2-10)?
A card is drawn at random from a deck of cards. What is the probability that...
A card is drawn at random from a deck of cards. What is the probability that (a) it is a heart, given that it is red? (b) it is higher than a 10, given that it is a heart? (Interpret J, Q, K, A as 11, 12, 13, 14.) (c) it is a jack, given that it is red?
A bag contains n blue and m red marbles. You randomly pick a marble from the...
A bag contains n blue and m red marbles. You randomly pick a marble from the bag, write down its color, and then put the marble back in the bag. This process is repeated until you pick either two consecutive blue or two consecutive red marbles. Given that the process stopped because you picked two consecutive blue marbles, what is the probability that the first marble you picked was blue? Please note that the question asks you to derive the...
A card is drawn at random from a deck of 52 cards. Find the probability that...
A card is drawn at random from a deck of 52 cards. Find the probability that the card is a seven or a spade. A bag contains 7 green marbles, 5 blue marbles, and 3 yellow marbles. If a marble is randomly picked from the bag, find the probability that it is not blue. Ten balls labeled with the numbers 1, 2, ..., 10 are in a bin. What is the probability that the numbers 8, 7, and 2 are...
A single card is chosen at random from a deck of 52 cards, the probability that...
A single card is chosen at random from a deck of 52 cards, the probability that a club card is selected is 1/4. Does this probability mean that, if you choose a card at random 8 times, a club will appear twice? If not, what does it mean? Probability?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT