choose(5,1) * choose(7,4) + choose(7,5)
## [1] 196
196
choose(13,4)*choose(14,1) + choose(13,5)
## [1] 11297
11,297
2**5*6**2*choose(52,3)
## [1] 25459200
24,459,200
round(((choose(4,1)*choose(48,2)+choose(4,3)+choose(4,2)*choose(48,1))/choose(52,3)),4)
## [1] 0.2174
0.2174 or 21.74%
#Step 1. How many different combinations of 5 movies can he rent?
choose(31,5)
## [1] 169911
169,911
#How many different combinations of 5 movies can he rent if he wants at least one mystery?
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)
## [1] 163723
163,723
format((choose(4,3)*choose(104,3)*choose(17,3)), scientific = TRUE, digits=2)
## [1] "5e+08"
#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.
format((choose(24,13)-choose(5,5)*choose(19,8)),scientific=TRUE,digits=2)
## [1] "2.4e+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.
format((choose(6,6)*choose(18,7)),scientific = TRUE, digits=2)
## [1] "3.2e+04"
#two possible ways either all sycamores first then all cypress or all cypress first then all sycamores, choosing 10 trees in total
round((2/choose(10,5)),4)
## [1] 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.
round((44/52*4)+(8/52*-16),2) #Probability of queen or lower is 44/52, 1-44/52 is probability of losing $16
## [1] 0.92
# 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.
round(833*((44/52*4)+(8/52*-16)),2)
## [1] 768.92