Problem 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?

There are 2 scenarios where we have less than 2 green jelly beans:

  1. 5 red 0 green

  2. 4 red 1 green

For the first one we can find the number of ways by calculating \(\binom{5}{0} * \binom{7}{5}=21\)

For the second one: \(\binom{5}{1} * \binom{7}{4} = 175\)

Then to get the total ways less than 2 green = \(21+175=196\)

zeroGreen <- choose(5,0) *choose(7,5)
print(zeroGreen)
## [1] 21
oneGreen <- choose(5,1) * choose(7,4)
print(oneGreen)
## [1] 175
lessThan2 <- zeroGreen+oneGreen
print(lessThan2)
## [1] 196

Problem 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?

This means we can have 4 reps and 1 senator or we can have 5 reps and 0 senators

For the 4 reps 1 senator we get: \(\binom{13}{4}*\binom{14}{1}=10010\)

Then for 5 reps 0 sens we get: \(\binom{13}{5} * \binom{14}{0}=1287\)

Then for at least 4 reps we get : \(10010+1287=11297\)

oneSen <- choose(13,4) * choose(14,1)
print(oneSen)
## [1] 10010
zeroSen <- choose(13,5) * choose(14,0)
print(zeroSen)
## [1] 1287
atLeast4Reps <- oneSen+zeroSen
print(atLeast4Reps)
## [1] 11297

Problem 3

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?

There are 3 independent events so we can calculate the number of outcomes for each and multiply them.

  1. Coin tossed 5 times \(=2^5\)

  2. Die rolled 2 times \(=6^2\)

  3. 3 Cards drawn from 52 without replacement= \(\binom{52}{3}\)

To get all outcomes \(=2^5*6^2*\binom{52}{3}=25459200\) outcomes

allOutcomes <- 2^5 * 6^2 * choose(52,3)
print(allOutcomes)
## [1] 25459200

Problem 4

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 need to find the probability that at least one card drawn is a 3. There are 4 3’s in a deck of cards.

This probability is equal to 1- the probability of 0 3’s

To find the total number of outcomes we can do: \(Total=\binom{52}{3}=22100\)

Then to find number of ways to get 0 3’s we do: \(\binom{48}{3}*\binom{4}{0}=17296\)

So then the probability 0 3’s = \(17296/22100=0.7826244\)

Then the probability at least 1 3 = \(1 - 0.7826244=0.2173756\)

zero3s <- choose(48,3) * choose(4,0)
print(zero3s)
## [1] 17296
totalOutcomes <- choose(52,3)
print(totalOutcomes)
## [1] 22100
pZero3s <- zero3s/totalOutcomes
print(pZero3s)
## [1] 0.7826244
pAtLeastOneThree <- 1 - pZero3s
print(pAtLeastOneThree)
## [1] 0.2173756

Problem 5

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?

To find the total number of combinations we take the 17 docs + 14 Mysteries to get 31 total and then we are choosing 5.

This is equal to: \(\binom{31}{5}=169911\)

totalMovies <- choose(31,5)
print(totalMovies)
## [1] 169911

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

Then for part 2 we can find the number of ways that we get 0 mysteries and subtract that from the total outcomes to get the number of at least one mystery

To find 0 mysteries: \(\binom{17}{5}*\binom{14}{0}=6188\)

So then at least 1 mystery = \(169911-6188=163723\)

zeroMysteries <- choose(17,5) * choose(14,0)
print(zeroMysteries)
## [1] 6188
atLeastOneMystery <- totalMovies - zeroMysteries
print(atLeastOneMystery)
## [1] 163723

Problem 6

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.

To find all possible music we need to find the number of ways for each to choose 3 since we need an equal number of each composer.

This means we need to choose 3 from Brahms, 3 from Haydn and 3 from Mendelssohn

This comes out to \(Total= \binom{4}{3}*\binom{104}{3}*\binom{17}{3}=4.95e+08\)

totalMusic <- choose(4,3) * choose(104,3) * choose(17,3)
print(format(totalMusic, scientific = TRUE,digits=3))
## [1] "4.95e+08"

Problem 7

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.

To find the number of ways for 4 or less non fiction we need to calculate:

\(\binom{5}{0}*\binom{19}{13}+\binom{5}{1}*\binom{19}{12}+\binom{5}{2}*\binom{19}{11}+\binom{5}{3}*\binom{19}{10}+\binom{5}{4}*\binom{19}{9}=2420562\)

Then we since the order matters we need to multiply that by \(13!=6227020800\)

So to get the total number of ways less than 4 non fiction= \(2420562*6227020800=1.51e+16\)

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

To find the total ways to include all 6 plays we will need to find: \(\binom{6}{6}*\binom{18}{7}=31824\)

Then we need to multiply that to get all the orders which we found in step 1: \(31824*13!=1.98e+14\)

lessThan4Nonfiction <- 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)
print(lessThan4Nonfiction)
## [1] 2420562
totalOrders <- factorial(13)
print(totalOrders)
## [1] 6227020800
totalWaysLessThan4 <- lessThan4Nonfiction*totalOrders

print(format(totalWaysLessThan4,scientific=TRUE,digits=3))
## [1] "1.51e+16"
all6Plays <- choose(6,6)*choose(18,7)
print(all6Plays)
## [1] 31824
totalWays6Plays <- all6Plays*totalOrders
print(format(totalWays6Plays,scientific = TRUE,digits = 3))
## [1] "1.98e+14"

Problem 8

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.

To find the probability that the 5 sycamores and 5 cypress trees are all next to each other we first need to find the total number of ways to order the trees which is equal to: \(10!\). This will be the denominator of the probability.

The numerator is going to be equal to \(5!*5!*2!\) because we have 5 Cypress and 5 Sycamores and then there are only 2 ways to order them such that the cypress and sycamores are all next to each other.

So the probability is equal to: \(\frac{5!*5!*2!}{10!}=0.007936508\)

probablilityNextToEachother<- (factorial(5)*factorial(5)*factorial(2))/(factorial(10))
print(probablilityNextToEachother)
## [1] 0.007936508

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.

If we consider all the cards Queen or lower we have Queen, Jack, 10, 9, 8, 7, 6, 5, 4, 3, 2. that’s \(11*4=44\) cards Queen or lower

Then we have 52 cards in the deck so \(P(win)=44/52\)

Then \(P(lose)=8/52\)

Then to find the Expected Value: \(P(win)*4+P(lose)*-16=0.92\)

This means you are expected to win 92 cents.

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.

To find this we just need to multiply the expected value by 833: $0.9230769*833=768.92

expectedValue <- (44/52)*4+(8/52)*-16
print(round(expectedValue,2))
## [1] 0.92
print(round(expectedValue*833,2))
## [1] 768.92