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?
\[ = \begin{pmatrix}5\\ 0\end{pmatrix} * \begin{pmatrix}7\\ 5\end{pmatrix} + \begin{pmatrix}5\\ 1\end{pmatrix} * \begin{pmatrix}7\\ 4\end{pmatrix}\]
(choose(5,0) * choose(7,5)) + (choose(5,1) * choose(7,4))
## [1] 196
There are a 196 ways to get 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2
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?
\[ = \begin{pmatrix}13\\ 4\end{pmatrix} * \begin{pmatrix}14\\ 1\end{pmatrix} + \begin{pmatrix}13\\ 5\end{pmatrix} * \begin{pmatrix}14\\ 0\end{pmatrix}\]
(choose(13,4) * choose(14,1)) + (choose(13,5) * choose(14,0))
## [1] 11297
There are a 11,297 ways to make a 5 member sub-committee with at least 4 representatives
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?
cointoss <- 2 ** 5
dieroll <- 6 ** 2
threecards <- choose(52, 3)
cointoss * dieroll * threecards
## [1] 25459200
There are 25,459,200 different 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.
We can use the compliment of finding no 3’s in 3 draws
# first draw
d1 <- 48/52
d2 <- 47/51
d3 <- 46/50
# probability of 0 threes
d1 * d2 * d3
## [1] 0.7826244
# probability of at least 1 3
round(1 - (d1 * d2 * d3), 4)
## [1] 0.2174
# Alternative way
no_threes <- choose(48,3)
total_combinations = choose(52,3)
# Take the compliment of probability of no threes
round(1 - (no_threes / total_combinations), 4)
## [1] 0.2174
The probability of drawing at least 1 3 from a draw of 3 cards is approximately 0.2174 or 21.74%
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.
combos_of_five <- choose(31,5)
combos_of_five
## [1] 169911
The number of combinations of 5 movies from 14 mysteries and 17 documentaries that Lorenzo can have is 169,911 combinations of 14 mysteries and 17 documentaries
no_mysteries <- choose(14,0) * choose(17, 5)
# if we subtract the amount of choosing no mysteries from the total we are left with all the combinations that have at least 1 mystery
combos_of_five - no_mysteries
## [1] 163723
# We can also break it down into adding all the options of choosing at least 1 mystery
mysteries_one_plus <- choose(14,5) * choose(17, 0) +
choose(14,4) * choose(17, 1) +
choose(14,3) * choose(17, 2) +
choose(14,2) * choose(17, 3) +
choose(14,1) * choose(17, 4)
mysteries_one_plus
## [1] 163723
If Lorenzo wants at least one mystery The number of combinations that Lorenzo can have is 163723 combinations of 5 movies from 14 mysteries and 17 documentaries
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.
We are looking to find all the permutations where there is an equal number form each composer
Brahms = \(_4P_3\) Haydn = \(_{104}P_3\) Mendelssohn = \(_{17}P_3\)
brahms = factorial(4)
haydn = factorial(104) / factorial(101)
mendelssohn = factorial(17) / factorial(14)
brahms * haydn * mendelssohn
## [1] 106989742080
The number of different schedules possible are 1.069897e+11
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.
total_permutations <- factorial(24) / factorial(11)
# If we use all 5 non fiction books that leave us with 8 permutations of the remaining 19 books
remaining_permutations <- factorial(19) / factorial(11)
# For all remaining permutations each one has 120 ways of arranging the 5 non fiction books
all_five_nonfiction <- factorial(5) * remaining_permutations
# Find all the combinations where 4 or less non fiction books are used we can subtract
total_permutations - all_five_nonfiction
## [1] 1.554317e+16
The number of possible reading schedules with no more than 4 nonfiction books is 1.554317e+16
total_permutations <- factorial(24) / factorial(11)
# Let's find the permutations If we use all 6 plays that leave us with 8 permutations of the remaining 19 books
remaining_permutations <- factorial(18) / factorial(11)
# For all remaining permutations each one has 120 ways of arranging the 5 non fiction books
all_six_plays <- factorial(6) * remaining_permutations
# Find all the combinations where 4 or less non fiction books are used we can subtract
total_permutations
## [1] 1.554354e+16
all_six_plays
## [1] 115482931200
The number of possible reading schedules with all 6 plays is 1.154829e+11
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.
We are looking to find how many permutations of 5 sycamores and 5 cypress out of the total amount of permutations
sycamore_permutations <- factorial(5)
cypress_permutations <- factorial(5)
total_permutations <- factorial(10)
# Multiply by 2 since we can also have the cypress trees first and then the sycamore trees and the events are independent
round((2 * sycamore_permutations * cypress_permutations) / total_permutations, 5)
## [1] 0.00794
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 is 0.0079 or .79%
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.)
prob_win <- round(44/52,2)
prob_loss <- round(8/52,2)
The expected probability that you will win is 0.85
wins_expected <- 833 * prob_win
losses_expected <- 833 * prob_loss
wins_expected
## [1] 708.05
losses_expected
## [1] 124.95
# Expected amount of money
gains <- wins_expected * 4
losses <- losses_expected * -16
The expected winnings equals 2832.2
The expected losses equals -1999.2
The expected net winnings equals 833