q1<-choose(5,1)*choose(7,4)+choose(5,0)*choose(7,5)
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?
There are \({}_{5}C_1*{}_{7}C_4+{}_{5}C_0*{}_{7}C_5\)=196 ways.
q2 <- choose(13,4)*choose(14,1)+choose(13,5)+choose(14,0)
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?
There are 1.1298^{4} ways that a subcommittee of 5 can be formed.
q3 <- 2^5*6^2*52*51*50
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?
There are \(2^5*6^2*50*51*52=1.527552\times 10^{8}\) possible outcomes.
p3 <- round(1- 48/52*47/51*46/50,4)
totals <- choose(52,3)
not_three <- choose(48,3)
p_three_drawn <- round(1-not_three/totals,4)
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.
\({}_{52}C_3\)
not_three = \({}_{48}C_3\)
1-P(not_three)
The probability that at least one of the cards is a 3 is 0.2174.
q5a<-choose(31,5)
one_mystery<-choose(14,1)*choose(17,4)
two_mysteries <-choose(14,2)*choose(17,3)
three_mysteries <- choose(14,3)*choose(17,2)
four_mysteries <-choose(14,4)*choose(17,1)
five_mysteries <- choose(14,5)*choose(17,0)
q5b <- one_mystery+two_mysteries+three_mysteries+four_mysteries+five_mysteries
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 rent \({}_{31}{C}_5\)=1.69911^{5}
Step 2. How many different combinations of 5 movies can he rent if he wants at least one mystery?
one mystery=\({}_{14}C_1*{}_{17}C_4\); two mysteries=\({}_{14}C_2*{}_{17}C_3\)
three mysteries=\({}_{14}C_3*{}_{17}C_2\); four mysteries=\({}_{14}C_4*{}_{17}C_1\)
five mysteries=\({}_{14}C_5*{}_{17}C_0\)
He can rent 1.63723^{5} combinations of at least one mystery.
q6 <- format(signif(104*103*101*17*16*15*4*3*2,3),scientific = TRUE)
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.
Assuming that exactly 9 songs have to be played to fill the time slot.
3 Brahms: 4*3*2, 3 Haydn: 104*103*101, 3 Mendelssohn: 17*16*15..
There are 1.06e+11 different schedules to chose from.
zero_nf <- 19*18*17*16*15*14*13*12*11*10*9*8*7
one_nf <- 19*18*17*16*15*14*13*12*11*10*9*8*6
two_nf <- 19*18*17*16*15*14*13*12*11*10*9*6*5
three_nf <- 19*18*17*16*15*14*13*12*11*10*6*5*4
four_nf <- 19*18*17*16*15*14*13*12*11*6*5*4*3
q7a <- format(signif(zero_nf+one_nf+two_nf+three_nf+four_nf,3),scientific=TRUE)
q7b <- format(signif(6*5*4*3*2*1*18*17*16*15*14*13*12,3),scientific = TRUE)
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.
There are 4.57e+14 schedules possible.
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 are 1.15e+11 possible schedules that include all 6 plays.
pos_ways <-2
total_trees <- 10
syc <-5
cyp <- 5
q8 <- round(pos_ways/(factorial(total_trees)/(factorial(syc)^2)),4)
# could be pos_ways/(factorial(total_trees)/(factorial(syc)*factorial(cyp)))
#since there are 5 trees of both types the factorial can be squared and you will
#get the same result
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.
Possible ways:
way one: syc,syc,syc,cyp,cyp,cyp; way two: cyp,cyp,cyp,syc,syc,syc
The probability that Zane randomly plants all 5 sycamores or all 5 cypress trees next to each other is 0.0079.
less_q <- 44/52
win <- 4
lose <- -16
not_less_q <-8/52
q9a <- round(less_q*win+not_less_q*lose,2)
q9b <- round(less_q*833*4 + not_less_q*833*(-16),2)
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.
P(less than queen)*4 + P(not less than queen)* -16
The expected value would be $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.
I would expect to win $2819.38 and I would expect to lose $-2050.46. In total I would expect to win $768.92. While, the expected value states that $766.36 should be won.
num_games <- 833
values <-c(rep(4,44),rep(-16,8))
winnings <- 0
times_won <- 0
times_lost <- 0
for (i in 1:num_games){
card <- sample(values,1)
winnings<- round(winnings+card,0)
if (card == 4){
times_won <- round(times_won+1,0)
}else{
times_lost <- round(times_lost+1,0)
}
}
print(c('Amount won: ',winnings,'times won: ',times_won,'Times lost: ',
times_lost,'win %: ',round(times_won/num_games,3),'expected win %:',
round(less_q,3),'loss % :',round(times_lost/num_games,3),'expected loss %: ',
round(not_less_q,3),'amount won: ',round(times_won*win,2),'amount lost: ',
round(times_lost*lose,2)))
## [1] "Amount won: " "872" "times won: "
## [4] "710" "Times lost: " "123"
## [7] "win %: " "0.852" "expected win %:"
## [10] "0.846" "loss % :" "0.148"
## [13] "expected loss %: " "0.154" "amount won: "
## [16] "2840" "amount lost: " "-1968"