\[ {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.
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.
2^5 * 6^2 * choose(52,3)
## [1] 25459200
\[ 2^5 \cdot 6^2 \cdot {52 \choose 3}\]
Ans. they are 25459200 possible outcomes.
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.
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} \]
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.
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} \]
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”
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