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?
G = green jellybean R = red jellybean
5G + 7R = 12 jellybeans total
If you want to know the number of ways that you can pick 5 jellybeans with less than 2 being green, that means the number of ways in which you can choose 0 or 1 green jellybean among 5 jellybeans picked.
For 0 green jellybeans: There are \(7 \choose 5\) ways to pick only red jellybeans.
For 1 green jellybean: There are \(7 \choose 4\) ways of picking 4 red jellybeans and \(5 \choose 1\) ways of picking a green jellybean.
n_green <- 5
n_red <- 7
no_green <- choose(n_green, 0) * choose(n_red, 5)
one_green <- choose(n_green, 1) * choose(n_red, 4)
no_green + one_green## [1] 196
There are 196 ways in which you can choose 5 jellybeans with less than 2 being green.
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?
S = # of senators = 14 R = # of representatives = 13
14S + 13R = 27 committee members
At least 4 must be representatives, so the subcommittee must consist of 4 or 5 representatives.
Similar to the above, there are \(13 \choose 5\) ways to choose all representatives and \(13 \choose 4\) * \(14 \choose 1\) ways to choose 4 representatives and 1 senator.
n_senators <- 14
n_reps <- 13
all_reps <- choose(n_reps, 5)
one_sen <- choose(n_reps, 4) * choose(n_senators, 1)
all_reps + one_sen## [1] 11297
There are 11,297 ways of choosing a subcommittee with these requirements.
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?
A coin has 2 sides and therefore 2 possible outcomes: Heads or Tails. If you toss the coin 5x, with two possible outcomes each time, there are \(2^{5}\) possible outcomes.
A die has six sides and therefore 6 possible outcomes: 1, 2, 3, 4, 5, or 6. If you roll the die twice, there are \(6^{2}\) possible outcomes.
## [1] 25459200
There are 25459200 possible outcomes.
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.
The probability of at least one of the cards being a 3 is the same as the probability of all three cards being 3 plus the probability of two of the cards being a 3 plus the probability of only one card being a 3. Rather than computing all three of these probabilities, we can take 1 minus the probability that none of the cards drawn are a 3. Since we are working without replacement, this would be \({48 \over 52} * {47 \over 51} * {46 \over 50}\)
## [1] 0.2174
p_3_heads_heads <- 4/52 * (51-3)/51 * (50-3)/50
p_heads_3_heads <- (52-4)/52 * 4/51 * (50-3)/50
p_heads_heads_3 <- (52-4)/52 * (51-4)/51 * 4/50
p_3_heads_heads_2 <- 4/52 * 3/51 * (50-2)/50
p_heads_3_heads_2 <- (52-4)/52 * 4/51 * 3/50
p_3_heads_3 <- 4/52 * (51-3)/51 * 3/50
p_3_heads_heads_3 <- 4/52 * 3/51 * 2/50
sum(
p_3_heads_heads,
p_heads_3_heads,
p_heads_heads_3,
p_3_heads_heads_2,
p_heads_3_heads_2,
p_3_heads_3,
p_3_heads_heads_3
)## [1] 0.2173756
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.
How many different combinations of 5 movies can he rent?
## [1] 169911
How many different combinations of 5 movies can he rent if he wants at least one mystery?
one_myst <- choose(n_myst, 1) * choose(n_docs, 4)
two_myst <- choose(n_myst, 2) * choose(n_docs, 3)
three_myst <- choose(n_myst, 3) * choose(n_docs, 2)
four_myst <- choose(n_myst, 4) * choose(n_docs, 1)
five_myst <- choose(n_myst, 5)
sum(one_myst, two_myst, three_myst, four_myst, five_myst)## [1] 163723
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.
4B + 104H + 17M = 125 symphonies
There are 125 symphonies to choose 9 from. He needs an equal number from each composer so he needs 3 from each composer.
If Cory were simply choosing songs to listen to and the order didn’t matter, the answer would be that there are \(4 \choose 3\) ways to choose from Brahms, \(104 \choose 3\) ways to choose from Haydn, and \(17 \choose 3\) ways to choose from Mendelssohn.
Here, however, Cory is setting up a schedule, so the order in which he places the songs also matters.
brahms <- choose(4,3)
haydn <- choose(104,3)
mendelssohn <- choose(17,3)
(choices <- brahms*haydn*mendelssohn)## [1] 495322880
There are \(4.95 \times 10^{8}\) ways to choose the songs.
Then there are \(9!\) ways in which to order the songs:
## [1] 1.797428e+14
There are \(1.80 \times 10^{14}\) ways to make the schedule.
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.
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.
n_other <- n_novels + n_plays + n_poems
reading_schedule1 <- sum(
choose(n_nonfict, 4) * choose(n_other, 13 - 4) * factorial(13),
choose(n_nonfict, 3) * choose(n_other, 13 - 3) * factorial(13),
choose(n_nonfict, 2) * choose(n_other, 13 - 2) * factorial(13),
choose(n_nonfict, 1) * choose(n_other, 13 - 1) * factorial(13),
choose(n_other, 13) * factorial(13)
)
formatC(reading_schedule1, format="e", digits=2)## [1] "1.51e+16"
There are \(1.51 \times 10^{16}\) ways to order the books if he wants at most 4 nonfiction.
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.
If he wants to include all 6 plays then he will have 18 books left from which to choose an additional 7.
## [1] 1.981687e+14
There are \(1.98 \times 10^{14}\) ways from in which he can order 13 books if he wants to include all 6 plays. ***
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.
5S + 5C
To do this you need to find out the probability that the first 5 in the row are all the same of one type. By definition, the last 5 in the row will be all the same of the other type, as that is then the only type to choose from.
The type of the first tree doesn’t matter. Once you have that one, you then calculate the probability that the next 4 trees match the first one.
## [1] 0.007936508
The probability that all 5 sycamores are planted nest to each other and all 5 cypress are planted next to each other is 0.0079 (0.40%).
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.)
Find the expected value of the proposition. Round your answer to two decimal places. Losses must be expressed as negative values.
The expected value is \(4*{44 \over 52} - 16*{8 \over 52}\).
## [1] 0.92