Problem

Problem 1

  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?

\[ {7 \choose 4}{5 \choose 1} + {7 \choose 5}\]

choose(7,4)*choose(5,1) + choose(7,5)
## [1] 196

or

choose(5,0) * choose(7,5) + choose(5,1) * choose(7,4)
## [1] 196

Ans. There are 196 possible ways to withdrawn 5 jellybeans so that the number of green one left is less than 2.

Problem 2

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?

choose(13,4) *choose(14,1) + choose(13,5)
## [1] 11297

or

choose(13,4) * choose(14,1) + choose(13,5) * choose(14,0) + choose(14,5) * choose(13,0)/ choose(27,9)
## [1] 11297

\[ {13 \choose 4}{14 \choose 1} + {13 \choose 5}\]

Ans. They are 11,297 ways a subcommittee of 5 can be formed that have at least 4 members representatives.

Problem 3

  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?
2^5 * 6^2 * choose(52,3)
## [1] 25459200

\[ 2^5 \cdot 6^2 \cdot {52 \choose 3}\]

Ans. they are 25459200 possible outcomes.

Porblem 4

  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.
p_3 <- round(1- 48/52*47/51*46/50,4)
totals <- choose(52,3)
not_three <- choose(48,3)
p_three_drawn <- round(1-not_three/totals,4)

print(p_3)
## [1] 0.2174

Ans. The probability that at least one of the cards drawn a 3 is 0.2174.

Problem 5

  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?

\[ {14+17 \choose 5 } = {31 \choose 5} \]

choose(31,5)
## [1] 169911

Ans. There are 169911 combinations that 5 different movies can rent.

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

One way of calculating combinations of 5 movies can rent if at least one is mystery.

at_least_One <- choose(14,1) * choose(17,4) 
at_leat_two <- choose(14,2) * choose(17,3)
at_least_three <- choose(14,3) * choose(17,2)
at_least_four <- choose(14,4) * choose(17,1)
at_least_five <- choose(14,5) * choose(17,0)

All_combinations <- (at_least_One + at_leat_two + at_least_three + at_least_four + at_least_five)

print(All_combinations)
## [1] 163723

or

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)
## [1] 163723

\[ C(> 1) = {14 \choose 1 } * {17 \choose 4} + {14 \choose 2}*{17 \choose 3} + {14 \choose 3} * {17 \choose 2} + {14 \choose 4} * {17 \choose 1} + {14 \choose 5}*{17 \choose 0} \]

Another way to calculate different combinations that 5 movies can rent is take the compliment of no mystery choosing.

no_mystery <-choose(31,5)- (choose(14,0) * choose(17,5))

print(no_mystery)
## [1] 163723

Ans. There are 163723 ways that different combination of 5 movies can rent with at least one mystery.

\[ C(< 0) = {31 \choose 5 } - {14 \choose 0} * {17 \choose 5} \]

Problem 6

  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.
 q6 <- format(choose(4,3)*choose(104,3)*choose(17,3)*factorial(9), scientific = TRUE, digits = "2")

print(q6)
## [1] "1.8e+14"

\[ C(9) = {4 \choose 3} * {104 \choose 3} * {17 \choose 3} \] Ans.1.8e+14 different schedule are possible.

Problem 7

  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.

Zero_nonf <- choose(6+6+7,13)
one_nonf<- choose(5,1) * choose(6+6+7,12)
two_nonf <- choose(5,2) * choose(6+6+7+2,11)
three_nonf <- choose(5,3) * choose(6+6+7+3,10)
four_nonf <- choose(5,4) * choose(6+6+7,9)


step_1 <- format(sum(Zero_nonf,one_nonf,two_nonf,three_nonf,four_nonf), scientific = TRUE, digits = "2")

print(step_1)
## [1] "1.1e+07"

Ans.1.1e+07 different schedule are possible with no more than 4 nonfiction.

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.

allsix_plays <- choose(6+7+5,13-6)

step_2 <- format(allsix_plays, scientific = TRUE, digits = "2")

Ans.3.2e+04 different schedule are possible if he wants to include all 6 plays.

\[ C(==6) = {6 + 7 + 5 \choose 13 - 6} \]

Problem 8

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.

total_trees <- 10
possible_ways <- 2
syc <- 5
cyp <- 5

q8 <- round(2*factorial(5) / factorial(10),4)

print(q8)
## [1] 1e-04
q8_1 <- round(possible_ways/(factorial(total_trees)/(factorial(syc)^2)),4)

print(q8_1)
## [1] 0.0079

Ans. 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”

Problem 9

  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.

Queen_less <- 44/52
win <- 4
lose <- -16
notQueens_higher <- 8/52
Expected_Prop <- round(win * Queen_less + lose * notQueens_higher,2)

print(Expected_Prop)
## [1] 0.92

Ans. The expected value of the proportion 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.

Queen_less <- 44/52
win <- 4
lose <- -16
notQueens_higher <- 8/52
Expected_Prop <- round(win * Queen_less + lose * notQueens_higher,2)

q9step_2 <- (Expected_Prop * 833)

print(q9step_2)
## [1] 766.36

Ans. If I played this game 833 times I would expect to win $766.36