There are 2 scenarios here. We pick 5 red jellybeans from 7 and 0 green from 5, and 4 red jellybeans from 7 and 1 green from 5. Adding the two up gives us 196 permutations.
greenUnder2 <- choose(5,0)*choose(7,5) + choose(5,1)*choose(7,4)
greenUnder2
## [1] 196
The probability we choose 5 jelly beans with less than 2 green ones is around 25%.
greenUnder2 / choose(12,5)
## [1] 0.2474747
Similar to the last problem we either choose 5 represenatives or 4 from 13. This gives us 11,297
subcommittee <- choose(13,5)*choose(14,0) + choose(13,4)*choose(14,1)
subcommittee
## [1] 11297
The probability of choosing 4 or more represenatives is 14%.
subcommittee / choose(27,5)
## [1] 0.1399356
Here we calculate the number of permutations for each individual piece and then multiply them all up giving us 25,459,200
coinflip <- 2^5
dice <- 6^2
cards <- choose(52,3)
total_permutations <- coinflip * dice * cards
total_permutations
## [1] 25459200
There is a 21% chance at least one of the cards is a 3.
none_3 <- (48/52) * (47/51) * (46/50)
1 - none_3
## [1] 0.2173756
Total permutations are 169,911
x <- choose(31,5)
x
## [1] 169911
Total permutations are 163,723
choose(14,1)*choose(17,4) +
choose(14,2)*choose(17,3) +
choose(14,3)*choose(17,2) +
choose(14,4)*choose(17,1) +
choose(14,5)*choose(17,0)
## [1] 163723
If we need an equal amount of each symphony then we choose 3 from each. The number of permutations is 4.9*10^8
choose(4,3) * choose(104,3) *choose(17, 3)
## [1] 495322880
Number of permutations is 11 * 10^12
n <- 6+6+7+5
(choose(n,10) - (choose(n-4, 9)*choose(5,4))) * factorial(10)
## [1] 4.06954e+12
Number of permutations is 4.49 * 10^10
choose(17,6) * factorial(10)
## [1] 44910028800
The only card higher than a queen are a king or an Ace. This is 8 cards.
queen_higher <- 8/52
queen_lower <- 44/52
c(queen_higher, queen_lower)
## [1] 0.1538462 0.8461538
The expected value is 92 cents.
ev <- queen_higher*-16 + queen_lower*4
ev
## [1] 0.9230769
If we played 833 games I would expect to win around $768
ev*833
## [1] 768.9231