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?
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?
# case reps = 4
reps_4 <- choose(13, 4) * choose(14, 1)
# case reps = 5
reps_5 <- choose(13, 5)
paste0("There are ", reps_4 + reps_5, " ways of creating subcommittee of 5 with at least 4 representatives.")## [1] "There are 11297 ways of creating subcommittee of 5 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?
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.
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?
## [1] "There are 169911 combinations of 5 movies he can rent"
Step 2. How many different combinations of 5 movies can he rent if he wants at least one mystery?
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.
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.
# case nonfiction = 0
a <- choose(5, 0) * choose(19, 13)
# case nonfiction = 1
b <- choose(5, 1) * choose(19, 12)
# case nonfiction = 2
c <- choose(5, 2) * choose(19, 11)
# case nonfiction = 3
d <- choose(5, 3) * choose(19, 10)
# case nonfiction = 4
e <- choose(5, 4) * choose(19, 9)
all <- a + b + c + d + e
format(all, scientific = TRUE, digits = 3)## [1] "2.42e+06"
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
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
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.
# 52 deck
queen_low <- (44/52) * 4
king_high <- (8/52) * -16
expected_val <- round(queen_low + king_high, 2)
paste0("The expected value of this proposition is $", expected_val)## [1] "The expected value of this proposition is $0.92"
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.
# simulate this scenario
set.seed(123)
n_games <- 833
win_amount <- 4
lose_amout <- -16
result <- replicate(n_games, {
drawn_card <- sample(1:52, 1) # create 52 deck and choose 1 card
if (drawn_card%%13 <= 11) {
# mod 13 cuz a set of each suit is 13 cards, multiples of 13 are the
# Aces
win_amount
} else {
lose_amout
}
})
sum_winning_losses <- (sum(result))
expected_value <- round(sum_winning_losses/n_games, 2)
paste0("After ", n_games, " games, we expect to win/loss $", expected_value)## [1] "After 833 games, we expect to win/loss $2.25"