note: W = ways, P = probability
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?
let X = {number of green jellybeans being withdrawn}
W(X < 2) = W(X = 0) + W(X = 1)
wx0 = choose(7,5)*choose(5,0)
wx1 = choose(7,4)*choose(5,1)
wx0+wx1## [1] 196
2
A certain congressinal committee consists of 14 senators and 13 representatives. How many ways can a subcommittee of 5 be formed of at least 4 of the members must be representatives?
let A = {the number of representatives being chosen}
W(A >= 4) = W(A = 4) + W(A = 5)
wa4 = choose(14,1) * choose(13,4)
wa5 = choose(14,0) * choose(13,5)
wa4 + wa5## [1] 11297
3
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?
all events are independent, we are going to apply product rule.
W(coin+die+group_cards) = W(coin) * W(die) * W(group_cards)
# coin outcomes
w_coin = 2^5
# die outcomes
w_die = 6^2
# group cards outcomes: group by color
w_redcard = choose(26,3) # which is equal to blackcard
# group cards outcomes: group by suits
w_diamonds = choose(13,3) # equals to other three suits
# group cards outcomes: only face card
w_face = choose(12,3)
# group cards outcomes: no number card
w_nonums = choose(16,3)
# group cards outcomes: number card
w_num = choose(36,3)
# outcomes with cards grouped by color
w_coin * w_die * w_redcard## [1] 2995200
# outcomes with cards grouped by suits
w_coin * w_die * w_diamonds## [1] 329472
# outcomes with only face cards
w_coin * w_die * w_face## [1] 253440
# outcomes with no number cards
w_coin * w_die * w_nonums## [1] 645120
# outcomes with number cards
w_coin * w_die * w_num## [1] 8225280
4
3 cards are drawn from a standard deck witout replacement. what is the probability that at least one of the cards drawns is a 3? Express your answer as a fraction or a decimal number rounded to four decimal places.
let B = {number of 3’s card are drawn}
P(B >= 1) = 1 - P(B < 1)
P(B < 1) = P(B = 0)
# there are 4 of 3 cards, except these 3 cards, the remainings are 48 cards
pb0 = (choose(52-4, 3) * choose(4,0)) / choose(52,3)
1-pb0## [1] 0.2173756
5
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 documemtaries and 14 mysteries.
step 1. How many different combinations of 5 movies can he rent?
# the total number of movies of his selection
total_movies = 17+14
# from the total movie and pick 5 movies
choose(total_movies, 5)## [1] 169911
step 2. How many different combinations of 5 movies can he rent if he wants at least one mystery?
let C = {number of mystery movies he rent}
W(C >= 1) = W(total_movie) - W(C < 1) = W(total_movie) - W(C = 0)
wc0 = choose(17,5)
choose(total_movies, 5) - wc0## [1] 163723
6
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.
# he needs to have an equal number of symphonies from three categories, therefore, each category will have 3 symphonies
choose(4,3)*choose(104,3)*choose(17,3)## [1] 495322880
# scientific notation with hundredth place
format(495000000,scientific = T)## [1] "4.95e+08"
7
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 schdules are possible? Express your answer in scientific notation rounding to the hundredths place.
let D = {number of nonfiction books he picked}
W(D<=4) = W(total_books) - W(D = 5)
wd5 = choose(6+6+7,13-5)
choose(6+6+7+5, 13) - wd5## [1] 2420562
# scientific notation + hundredth place
format(2420000, scientific = T)## [1] "2.42e+06"
step 2. If he wants to include all 6 plays, how many different reading schedules are possible? Expression your answer in scientific notation rounding to the hundredths place.
# include all 6 play, which mean that he already picked 6 books out of 13.
choose(6+7+5, 13-6)## [1] 31824
# scientific notation + hundredth place
format(31800, scientific = T)## [1] "3.18e+04"
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 tree so that all 5 sycamores are next to each other and all 5 cypress trees are next to each other? Expression your answer as a fraction or a decimal number rounded to four decimal places.
plant 5 symcamores so that they are next to each other, which means that there 5 trees belong to the same category are picked
# the driveway has left side and right side, no matter how you plant trees from left side, you can do the same from right side
round(choose(5,5) / choose(10,5) *2,4)## [1] 0.0079
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.
there are 4 Kings and 4 Aces in total 8 cards, the probability for me to draw a queen or lower will be
queen_lower = 1 - choose(8,1)/choose(52,1)
queen_lower## [1] 0.8461538
if I draw a queen or lower, you pay me $4, from the probability calculated, I will win
win = queen_lower * 4otherwise, I pay you $16
lose = (1-queen_lower) * 16
# with such probability, I will expected to get
expected_value = round(win - lose,2)
expected_value## [1] 0.92
step 2. If you played this game 833 times how much would you expected to win or lose? Round your answer to two decimal places. Losses must be expressed as negative values.
# since the expected value is positive, after 833 games, I will win
expected_value * 833## [1] 766.36