This is all the sum of all the ways to choose 4 red and 1 green and all the ways to choose 5 red and 0 green.
choose(5,1)*choose(7,4)+choose(7,5)
## [1] 196
\[ \frac{5!}{1!(4)!} \cdot \frac{7!}{4!(3)!} + \frac{7!}{5!(2)!}\\ 5 \cdot \frac{(7)(6)(5)}{6} + \frac{(7)(6)}{(2)}\\ (25)(7)+21\\ 196\\ \]
The total number of ways is the sum of all the ways if 4 members are representatives and all the ways if 5 members are representatives. If 4 are representatives, 4 are chosen from 13 and 1 is chosen from 14. If 5 are representatives, 5 are chosen from 13.
choose(13,4)*choose(14,1)+choose(13,5)
## [1] 11297
\[ \frac{13!}{4!9!} \cdot \frac{14!}{1!13!} + \frac{13!}{5!8!}\\ \frac{(13)(12)(11)(10)(14)}{(4)(3)(2)} + \frac{(13)(12)(11)(10)(9)}{(5)(4)(3)(2)}\\ (13)(11)(5)(14) + (13)(11)(9)\\ (13)(11)(79)\\ 11297\\ \]
I am interpreting “outcomes” as outcomes in which order matters, for example, in which HHTTH is distinct from HHHTT. For the coin, there are five trials each with two outcomes. Then for the die, there are two trials each with six outcomes. Finally the cards represent choosing 3 cards out of 52, ie a permutation.
$$ 2^5 ^2 \
32 \ 152,755,200\ $$
(2**5)*(6**2)*52*51*50
## [1] 152755200
This probability can be found by subtracting the probability of getting no threes from 1.
\[ Probability = 1- (\frac{\frac{48!}{3!45!}} {\frac{52!}{3!49!}})\\ =1- (\frac{(48)(47)(46)}{6} \cdot \frac{6}{(52)(51)(50)})\\ =1- (\frac{103776}{132600})\\ =\frac{1201}{5525}\\ \approx 0.2174\\ \]
p_including_threes <- 1-(choose(48,3)/choose(52,3))
round(p_including_threes, digits = 4)
## [1] 0.2174
Step 1. How many different combinations of 5 movies can he rent?
Lorenzo can choose 5 movies from 31 total movies. \[ C(31, 5) = \frac{31!}{5!26!}\\ =\frac{(31)(30)(29)(28)(27)}{(5)(4)(3)(2)}\\ =(31)(29)(7)(27)\\ =169,911\\ \]
choose(31,5)
## [1] 169911
Step 2. How many different combinations of 5 movies can he rent if he wants at least one mystery?
We can subtract the number of combinations with no mysteries from the total number of combinations found in the last part. Number of ways to choose 5 movies from 17 documentaries (no mysteries): \[ C(17, 5) = \frac{17!}{5!12!}\\ =\frac{(17)(16)(15)(14)(13)}{(5)(4)(3)(2)}\\ =(17)(2)(14)(13)\\ =6,188\\ \] Number of ways to choose 5 movies with at least 1 mystery: \[ C(31, 5)-C(17, 5) = 169,911-6,188\\ = 163,723\\ \]
choose(31,5)-choose(17,5)
## [1] 163723
The number of different schedules can be found by finding the number of possible combinations fitting the criteria, and then multiplying by 9! to represent all the different ways of ordering those combinations. \[ 9! \cdot \frac{4!}{3!1!} \cdot \frac{104!}{3!101!} + \frac{17!}{3!14!}\\ (9!)(4)(104)(103)(17)(17)(8)(5)\\ \approx 1.80 \times 10^{14}\\ \]
symphony_schedules <- factorial(9)*(choose(4,3)*choose(104,3)*choose(17,3))
format(symphony_schedules, scientific = TRUE, digits = 3)
## [1] "1.8e+14"
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.
This can be found by finding the number of the combinations that include all five nonfiction books, subtracting from the total number of combinations, and then multiplying by 13! to represent all the ways to order those combinations. \[ 13! \cdot (\frac{24!}{13!11!} - \frac{19!}{8!11!}) \\ (13!) \cdot (\frac{(24)(23)(22)(21)(20)(19)(18)(17)(16)(15)(14)}{(11)(10)(9)(8)(7)(6)(5)(4)(3)(2)}-\frac{(19)(18)(17)(16)(15)(14)(13)(12)}{(8)(7)(6)(5)(4)(3)(2)})\\ (13!)\cdot ((23)(21)(19)(17)(16)-(19)(18)(17)(13))\\ (13!)\cdot (19)(17)((23)(21)(16)-(18)(13))\\ (13!)\cdot (19)(17)(7728-234)\\ (13!)(2420562)\\ \approx1.51 \times 10^{16}\\ \]
not_all_nonfiction <- factorial(13)*(choose(24,13)-(choose(19,8)))
format(not_all_nonfiction, scientific = TRUE, digits = 3)
## [1] "1.51e+16"
Step 2. 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.
There is one way to choose 6 plays from 6 plays. So the combinations are the ways to choose the remaining 7 books from the remaining 18 titles, then the number of schedules is found by multiplying those combinations by 13 factorial.
\[ 13! \cdot (\frac{18!}{7!11!}) \\ 13! \cdot (\frac{(18)(17)(16)(15)(14)(13)(12)}{(7)(6)(5)(4)(3)(2)})\\ 13! \cdot (18)(17)(4)(2)(13)\\ \approx 1.98 \times 10^{14}\\ \]
all_six_plays <- factorial(13)*choose(18,7)
format(all_six_plays, scientific = TRUE, digits = 3)
## [1] "1.98e+14"
There are two orders in which he could plant all 5 sycamores and all 5 cypress trees next to each other: all the sycamores on the left and all the cypress trees on the right, or the reverse. So we can calculate the probability of one of those and then double it. After the first tree is planted, for the next tree to be of the same type, it can be one of 4 out of the remaining 9, then 3 out of the remaining 8, 2 out of 7, and 1 out of 6. After those five are planted, the remaining five trees of the other type will be planted, but the outcome has already been set, so there is no further impact on the probability.
\[ Probability = 2 \cdot \frac{4}{9} \cdot \frac{3}{8} \cdot \frac{2}{7} \cdot \frac{1}{6} \\ =\frac{1}{63}\\ \approx 0.0159\\ \]
round(2*4/9*3/8*2/7*1/6, digits = 4)
## [1] 0.0159
9.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.
The expected value is the probability of winning times 4, minus the probability of losing times 16. The probability of choosing a queen or lower is 11/13, and of choosing higher than a queen is the complement 2/13.
\[ Expected \ value = \frac{11}{13} \cdot 4 - \frac{2}{13} \cdot 16\\ = \frac{12}{13}\\ =0.92\\ \]
exp_val <- 11/13*4-(2/13*16)
round(exp_val, digits = 2)
## [1] 0.92
The expected value is approximately $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.
round(833*exp_val, digits = 2)
## [1] 768.92
You could expect to win $768.92 over 833 games.