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?

Since order does not matter and jellybeans are drawn without replacement we use combination n Choose r, which represents how many ways that r objects can be chosen from n distinct objects.

Number of combinations when there are 1 green and 4 red jellybeans.

GR14 <- choose(5,1)*choose(7,4)
print(GR14)
## [1] 175

Number of combinations when there are 0 green and 5 red jellybeans.

GR05 <- choose(7,5)
print(GR05)
## [1] 21

The total is:

GR14 + GR05
## [1] 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?

Since order does not matter of how the committee is selected and are selected without replacement we use combination n Choose r, which represents how many ways that r objects can be chosen from n distinct objects.

Number of combinations for a selection of 4 representatives and 1 senator.

RS41 <- choose(13,4)*choose(14,1)
print(RS41)
## [1] 10010

Number of combinations for a selection of 5 representatives and no senators

RS50 <- choose(13,5)
print(RS50)
## [1] 1287

The total for a subcomittee of at least 4 members is:

RS41+RS50
## [1] 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?

To calculate the total permutations assuming all the events are separated by the three groups. The assumption is order matters for each event (coin, die, and deck) and each event is completed before starting the next one. Meaning the coin is tossed 5 times then the die is rolled, and etc.

Permutations for a coin tossed 5 times since order matters.

coin <- 2^5
print(coin)
## [1] 32

Permutations for a six-sided die rolled 2 times since order matters.

die <- 6^2
print(die)
## [1] 36

Permutations for a group of 3 cards without replacement and assuming order matters here.

cards <- 52*51*50
print(cards)
## [1] 132600

The total permutations:

coin*die*cards
## [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.

The quickest way to answer this is to find its complement. Meaning, what is the probability of having no 3’s in the 3 cards drawn and finding the remaining probability from that.

No replacement and that order does not matter means combinations will be calculated. complement: Probability that no 3’s are selected:

# C is number of combinations that 3's are not selected. 52-4 = 48, which are the 48 cards that are not 3's. 
C <- choose(48,3)
# Total number of possible combinations of all cards
TotalC <- choose(52,3)
# proportion of 3's not be selected 
Prop <- (C/TotalC)*100
print(Prop)
## [1] 78.26244

The remaining proportion of the complement is the proportion that at least 1 3 is selected.

print(paste0('probability = ', round(100-Prop,4),'%'))
## [1] "probability = 21.7376%"
  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?

Order does not matter and movies are chosen without replacement so we will use combinations:

movies <- choose(17+14,5)
print(movies)
## [1] 169911

Step 2. How many different combinations of 5 movies can he rent if he wants at least one mystery?

# 1 mystery and 4 documentaries
C14 <- choose(14,1)*choose(17,4)
# 2 mystery and 3 documentaries
C23 <- choose(14,2)*choose(17,3)
# 3 mystery and 2 documentaries
C32 <- choose(14,3)*choose(17,2)
# 4 mystery and 1 documentary
C41 <- choose(14,4)*choose(17,1)
# 5 mystery and 0 documentary
C50 <- choose(14,5)

# sum of all the combinations such that there is at least one mystery
C14+C23+C32+C41+C50
## [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.

A total of 3 from each Brahms, Haydn, and Mendelssohn must be selected. We are assuming order does not matter and that this calculation does not account for in which order the 9 symphonies will be played. Each are selected without replacement.

Brahms <- choose(4,3)
Haydn <- choose(104,3)
Mendelssohn <- choose(17,3)
Total <- Brahms*Haydn*Mendelssohn
format(Total, scientific = TRUE, digits = 3)
## [1] "4.95e+08"
  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.

Since order matters and books are chosen without replacement, permutations are calculated.

nonfiction <- 5
others <- 6+6+7
# 1 book is nonfiction and 12 books are others
one_nf <- (factorial(others)/factorial(others-12)) * (factorial(nonfiction)/factorial(nonfiction-1))

# 2 books are nonfiction and 11 books are others
two_nf <- (factorial(others)/factorial(others-11)) * (factorial(nonfiction)/factorial(nonfiction-2))

# 3 books are nonfiction and 10 are others
three_nf <- (factorial(others)/factorial(others-10)) * (factorial(nonfiction)/factorial(nonfiction-3))

# 4 books are nonfiction and 9 are others
four_nf <- (factorial(others)/factorial(others-9)) * (factorial(nonfiction)/factorial(nonfiction-4))

# Sum of all permutations
total <- one_nf+two_nf+three_nf+four_nf

format(total, scientific = TRUE, digits = 3)
## [1] "2.05e+14"

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.

The schedule woould be made up of 6 plays and 7 other books.

plays <- 6
others <- 6+7+5
all_plays <- factorial(6) * (factorial(others)/factorial(others-7))
format(all_plays, scientific = TRUE, digits = 3)
## [1] "1.15e+11"
  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.

In this case, order matters so permutations are calculated

# permutations of 5 sycamores is
sycamores = factorial(5)
cypress = factorial(5)

# each block of five can be arranged in two ways so total is multiplied by 2. The total permutations of all 10 tress is calculated.
total <- (sycamores*cypress*2)/factorial(10)

print(paste0('probability = ', round(total*100,4),'%'))
## [1] "probability = 0.7937%"

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 44 cards out of 52 in the deck that are a queen or lower. This scenario leads to a $4 win. There are 8 cards out of 52 in the deck that are higher than a queen. This scenario leads to a $16 payout.

result <- (44/52)*4-(8/52)*16
print(paste0('The expected value is $',round(result,2)))
## [1] "The expected value is $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.

result_833<-result*833
print(paste0('The expected value is $',round(result_833,2)))
## [1] "The expected value is $768.92"