Homework 6

  1. A bag contains 5 green and 7 red jellybeans. How many ways can 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2?

We need to withdraw 5 jellybean total where only 1 or 0 of them are from the 5 green jellybeans:

Choose 1 out of 5 green and then 4 out of 7 red plus 0 out of 5 green and 5 out of 7 red.

ans <-choose(5,1) * choose(7,4) + choose(5,0) * choose(7,5)

Answer: 196 ways to withdraw 5 jellybeans so that there will be less than 2 green ones

  1. A certain congressional committee consists of 14 senators and 13 representatives. How many ways can a subcommittee of 5 be formed if at least 4 of the members must be representatives?

We need 4 or more out of 5 to be representatives. so either 4 reps or 5 reps

ans <-choose(13,4) * choose(14,1) + choose(13,5) * choose(14,0)

Answer: 11297 ways to select 5 members of congress with at least 4 representatives

  1. If a coin is tossed 5 times, and then a standard six-sided die is rolled 2 times, and finally a group of three cards are drawn from a standard deck of 52 cards without replacement, how many different outcomes are possible?

5 outcomes from a 2 sided options and then 2 outcomes from a 6 sided options and then 52 options then 51 options then 50 options

ans <- 2^5 *  6^2 * 52 * 51 * 50

Answer: 152755200 outcomes

  1. 3 cards are drawn from a standard deck without replacement. What is the probability that at least one of the cards drawn is a 3? Express your answer as a fraction or a decimal number rounded to four decimal places.

there at 4 “3” cards in a deck so we just check the probability that we draw 3 cards of which none are a 3 and then subtract that from 1

not_three <- (48/52)*(47/52)*(46/52)
ans <- round(1-not_three,digits = 4)

Answer: 0.2619 probability there is at least one three in three cards picked from a standard deck without replacement

  1. Lorenzo is picking out some movies to rent, and he is primarily interested in documentaries and mysteries. He has narrowed down his selections to 17 documentaries and 14 mysteries. Step 1. How many different combinations of 5 movies can he rent?

there are 31 movies and he wants to choose 5 of them

ans <- choose(31,5)

Answer: 169911 ways to rent 5 movies from 31

Step 2. How many different combinations of 5 movies can he rent if he wants at least one mystery?

He needs to pick either 1, 2, 3, 4, or 5 mystery movies to ensure at least one mystery

ans <- choose(14,1)*choose(17,4) + choose(14,2)*choose(17,3) + choose(14,3)*choose(17,2) + choose(14,4)*choose(17,1) + choose(14,5)*choose(17,0)

Answer: 163723 ways to rent 5 movies from 31 with at least one mystery (out of 14)

  1. In choosing what music to play at a charity fund raising event, Cory needs to have an equal number of symphonies from Brahms, Haydn, and Mendelssohn. If he is setting up a schedule of the 9 symphonies to be played, and he has 4 Brahms, 104 Haydn, and 17 Mendelssohn symphonies from which to choose, how many different schedules are possible? Express your answer in scientific notation rounding to the hundredths place.

9 outcomes choosing 3 from 4, 3 from 104, and 3 from 17, assuming no duplicates would be:

ans <- format(4*3*2*104*103*102*17*16*15,scientific = TRUE)

Answer: 1.069897e+11 ways to organize an equal number of 9 symphonies from Brahs, Haydn, and Mendelsson picking 4,104, and 17 respectively.

  1. An English teacher needs to pick 13 books to put on his reading list for the next school year, and he needs to plan the order in which they should be read. He has narrowed down his choices to 6 novels, 6 plays, 7 poetry books, and 5 nonfiction books. Step 1. If he wants to include no more than 4 nonfiction books, how many different reading schedules are possible? Express your answer in scientific notation rounding to the hundredths place.

pick 13 books with at most 4 out of 5 nonfiction (0-4) and 9-13 out of 19

ans <- format(choose(5,0)*choose(19,13) + choose(5,1)*choose(19,12) + choose(5,2)*choose(19,11) + choose(5,3)*choose(19,10) + choose(5,4)*choose(19,9), scientific = TRUE)

Answer: 2.420562e+06 ways to pick 13 books with no more than 4 non fiction books

Step 2. If he wants to include all 6 plays, how many different reading schedules are possible? Express your answer in scientific notation rounding to the hundredths place.

pick 6 out of 6 plays and then any combination of the remaining 18

ans <- format(6*5*4*3*2*1*18*17*16*15*14*13*12, scientific = TRUE)

Answer: 1.154829e+11 ways to pick 13 books with 6 plays

  1. Zane is planting trees along his driveway, and he has 5 sycamores and 5 cypress trees to plant in one row. What is the probability that he randomly plants the trees so that all 5 sycamores are next to each other and all 5 cypress trees are next to each other? Express your answer as a fraction or a decimal number rounded to four decimal places.

There are only two ways for this to occur -> all sycamore then all cypress or all cypress then all sycamore

total <- 10
sycamore <- 5
ans <- round(2/(factorial(total)/(factorial(sycamore)^2)),4)

Answer: 0.0079 chance of planting all the same trees in a row

  1. If you draw a queen or lower from a standard deck of cards, I will pay you $4. If not, you pay me $16. (Aces are considered the highest card in the deck.) Step 1. Find the expected value of the proposition. Round your answer to two decimal places. Losses must be expressed as negative values.

expected value is probability * gain + probability * loss

pq_l <- 44/52
pk_or_a <- 8/52
win <- 4
lose <- -16
ev <-  pq_l * win + pk_or_a * lose

Answer: 0.923076923076923 expected value

Step 2. If you played this game 833 times how much would you expect to win or lose? Round your answer to two decimal places. Losses must be expressed as negative values.

It was be expected value times number of games

ans <- round(833 * ev, digits =2)

Answer: 768.92 expected wins