Chapter 2 #1-7, 10, 12, 15-18.

#1 Two dice are rolled.

What is the probability that the sum of the dice is at least 10?

  • 6/36 = 1/6

What is the probability that the sum of the dice is exactly 10, given that it is at least 10?

  • 3/6 = 1/2

#2 A hat contains six slips of paper with the numbers 1 through 6 written on them. Two slips of paper are drawn from the hat (without replacing), and the sum of the numbers is computed.

What is the probability that the sum of the numbers is exactly 10?

  • (1/6 * 1/5) + (1/6 * 1/5) = 2/30 = 1/15

What is the probability that the sum of the numbers is at least 10?

  • (1/6 * 2/5) + (1/6 * 1/5) + (1/6 * 1/5) = 4/20 = 2/15

What is the probability that the sum of the numbers is exactly 10, given that it is at least 10?

  • 1/2

#3 Roll two dice, one white and one red. Consider these events:

A: The sum is 7

B: The white die is odd

C: The red die has a larger number showing than the white

D: The dice match (doubles)

Which pair(s) of events are disjoint?

  • A and D
  • C and D

Which pair(s) are independent?

  • B and D

Which pair(s) are neither disjoing nor independent?

  • A and B
  • A and C
  • B and C

#4 When rolling two dice, what is the probability that one die is twice the other?

  • 1/6

#5 Consider an experiment where you roll two dice, and subtract the smaller value from the larger value (getting 0 in case of a tie).

What is the probability of getting 0? * 1/6

What is the probability of getting 4? * 4/36 = 1/9

#6 Estimate the probability that exactly 3 Heads are obtained when 7 coins are tossed.

  • 35/128

#7 Estimate the probability that a 10 is obtained when two dice are rolled.

  • 3/36 = 1/12

#10 In a room of 200 people (including you), estimate the probability that at least one other person will be born on the same day as you.

x <- replicate(100000, anyDuplicated(sample(1:365, 200, replace = TRUE)))
100 - length(x[x == 0])
## [1] 100

#12 Suppose a die is tossed repeatedly, and the cumulative sum of all tosses seen is maintained. Estimate the probability that the cumulative sum ever is exactly 20. (Hint: the function cumsum computes the cumulative sums of a vector.)

mean(replicate(100000, {dieroll <- sum(sample(1:6, 10, replace = TRUE)) == 20}))
## [1] 0.00134

#15 A standard deck of cards has 52 cards, four each of 2,3,4,5,6,7,8,9,10,J,Q,K,A. In blackjack, a player gets two cards and adds their values. Cards count as their usual numbers, except Aces are 11 (or 1), while K, Q, J are all 10.

How many two card hands are possible?

choose(52,2)
## [1] 1326

“Blackjack” means getting an Ace and a value ten card. What is probability of getting a blackjack?

deck <- rep(c(2:10,rep(10,3),11),4)
x <- (replicate(100000, sum(sample(deck,2))))
length(x[x==21])/100000
## [1] 0.04759

What is probability of getting 19? (The probability that the sum of your cards is 19, using Ace as 11)

deck <- rep(c(2:10,rep(10,3),11),4)
x <- (replicate(100000, sum(sample(deck,2))))
length(x[x==19])/100000
## [1] 0.06043

#16 Assuming that there are no leapday babies and that all birthdays are equally likely, estimate the probability that no three people have the same birthday in a group of 50 people.

y <- replicate(10000, length(duplicated(sample(1:365, 50, replace = TRUE))[duplicated(sample(1:365, 50, replace = TRUE))==TRUE]) > 2)
length(y[y==FALSE])/10000
## [1] 0.3598

#17 Ultimate frisbee players are so poor they don’t own coins. So, team captains decide which team will play offense first by flipping frisbees before the start of the game. Rather than flip one frisbee and call a side, each team captain flips a frisbee and one captain calls whether the two frisbees will land on the same side, or on different sides. Presumably, they do this instead of just flipping one frisbee because a frisbee is not obviously a fair coin - the probability of one side seems likely to be different from the probability of the other side.

Suppose you flip two fair coins. What is the probability they show different sides? * 1/2 Suppose two captains flip frisbees. Assume the probability that a frisbee lands convex side up is p. Compute the probability that the two frisbees match.

  • p^2 + (1-p)^2 Make a graph of the probability of a match in terms of p
func = function(p){p^2+(1-p)^2}
plot(func, from  = 0, to = 1)

One reddit user flipped a frisbee 800 times and found that in practice, the convex side lands up 45% of the time. When captains flip, what is the probability of “same”? What is the probability of “different”?

  • Same = 0.505
  • Different = 0.495

What advice would you give to an ultimate frisbee team captain?

  • Pick Same

Is the two frisbee flip better than a single frisbee flip for deciding the offense?

  • Yes, 0.505 to 0.495 is better than 0.45 to 0.55

#18 Suppose you have two coins (or Frisbees) that land with Heads facing up with probability p where 0 < p < 1. One coin is red and the other is white. You toss both coins. Find the probability that the red coin is Heads, given that the red coin and the white coin are different.

  • a = Probability red coin is heads. b = Probability coins are different. P(a and b) = p x (1-p). P(b) = 2((1-p)p). P(a|b) = (p(1-p))/(2(p(1-p))) = 1/2