1. A bag contains 6 green and 9 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 4?

3 Greens: 6C3 X 9C2 2 Greens: 6C2 X 9C3 1 Green : 6C1 X 9C4 No Greens: 6C0 X 9C5

choose(6,3)*choose(9,2)+
  choose(6,2)*choose(9,3)+
  choose(6,1)*choose(9,4)+
  choose(6,0)*choose(9,5)
## [1] 2862
  1. A certain congressional committee consists of 14 senators and 13 representatives. How many ways can a subcommittee of 7 be formed if at least 4 of the members must be senators?

4 Senators: 14C4 X 13C3 5 Senators: 14C5 x 13C2 6 Senators: 14C6 x 13C1 7 Senators: 14C7 X13C0

choose(14,4)*choose(13,3)+
  choose(14,5)*choose(13,2)+
  choose(14,6)*choose(13,1)+
  choose(14,7)*choose(13,0)
## [1] 484913
  1. If a coin is tossed 2 times, and then a standard six-sided die is rolled 4 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^2 x 6^4 x 52 x 51 x 50

(2^2)*(6^4)*(52*51*50)
## [1] 687398400
  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 heart? Express your answer as a fraction or a decimal number rounded to four decimal places.

1- P(no hearts)

Total hands = 52C3

No hearts = 39C3

1-(39C3)/(52C3)

1-(choose(39,3)/choose(52,3))
## [1] 0.5864706
  1. Leanne is picking out some movies to rent, and she is primarily interested in children’s movies and comedies. She has narrowed down her selections to 18 children’s movies and 7 comedies.

Step 1. How many different combinations of 3 movies can she rent? Answer: _______________

25C3

choose(25,3)
## [1] 2300

Step 2. How many different combinations of 3 movies can she rent if she wants at least one comedy? Answer:

1 comedy: 7C1 x 18C2 2 comedies: 7C2 x 18C1 3 comedies: 7C3 x 18C0

choose(7,1)*choose(18,2)+
  choose(7,2)*choose(18,1)+
  choose(7,3)*choose(18,0)
## [1] 1484
  1. DJ Jacqueline is making a playlist for an internet radio show; she is trying to decide what 6 songs to play and in what order they should be played. If she has her choices narrowed down to 7 hip-hop, 14 pop, and 22 blues songs, and she wants to play an equal number of hip-hop, pop, and blues songs, how many different playlists are possible? Express your answer in scientific notation rounding to the hundredths place.

6 songs - order matters Equal HH/Blues 3HH/3B = 7 x 6 x 5 x 22 x 21 x 20 2HH/2B ??=7 x 6 x 22 x 21 x 39 x38 1HH/ 1 B ???? = 7 x 22 x 41 x 40 x 39 x 38

7*6*5*22*21*20 +
  7*6*22*21*39*38+
  7*22*41*40*39*38
## [1] 404991048
  1. DJ Howard is making a playlist for a friend; he is trying to decide what 9 songs to play and in what order they should be played.

Step 1. If he has his choices narrowed down to 7 pop, 3 hip-hop, 6 country, and 7 blues songs, and he wants to play no more than 3 country songs, how many different playlists are possible? Express your answer in scientific notation rounding to the hundredths place.

0 Country: 17161514131211109 1 country: 61716151413121110 2 country: 6516151413121110 3 country: 654151413121110

format(17*16*15*14*13*12*11*10*9+
  6*17*16*15*14*13*12*11*10+
6*5*16*15*14*13*12*11*10+
6*5*4*15*14*13*12*11*10, scientific=TRUE)
## [1] "1.686485e+10"

Step 2. If he has his choices narrowed down to 7 pop, 3 hip-hop, 6 country, and 7 blues songs, and he wants to play all 7 blues songs, how many different playlists are possible? Express your answer in scientific notation rounding to the hundredths place.

7 blues of 9: 7x6X5X4X3X2X1X16x15

format(7*6*5*4*3*2*1*16*15,scientific=TRUE)
## [1] "1.2096e+06"
  1. Mallory is planting trees along her driveway, and she has 3 beech trees and 3 eucalyptus trees to plant in one row. What is the probability that she randomly plants the trees so that all 3 beech trees are next to each other and all 3 eucalyptus trees are next to each other? Express your answer as a fraction or a decimal number rounded to four decimal places.

EEEBBB or BBBEEE 2 ways total: 6!/3!3!

2/(factorial(6)/(factorial(3)*factorial(3)))
## [1] 0.1
  1. If you draw a queen or lower from a standard deck of cards, I will pay you $4. If not, you pay me $14. (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.

P(Q or less) X 4 + P(K or A) X(-14)

44/52 x 4 + 8/52 x (-14)

((44/52)*4)+((8/52)*(-14))
## [1] 1.230769

Step 2. If you played this game 759 times how much would you expect to win or lose? Round your answer to two decimal places. Losses must be expressed as negative values.

#52 values of 44 $4, 8 $-15
 vect<-c(rep(4,44), rep(-14,8))
#there are 44 cards worth$4
#there are 8 cards worth -$14
# if you play 759 times you will accumulate.....


tot<-0
for (i in 1:759)
{
card<-sample(vect,1)
tot<-tot+card
}
print(tot)
## [1] 966