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?

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\\ \]

  1. 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?

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\\ \]

  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?

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

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

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

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"
  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.

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"
  1. 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.

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.