Question 1

There are 540 identical plastic chips numbered 1 through 540 in a box. What is the probability of reaching into the box and randomly drawing the chip numbered 505? Express your answer as a fraction or a decimal number rounded to four decimal places.

\[P=\frac{\{505\}}{\{1,2...539,540\}}=\frac{1}{540}\approx 0.0019\]

1/540
## [1] 0.001851852

Question 2

Write out the sample space for the given experiment. Separate your answers using commas. When deciding what you want to put into a salad for dinner at a restaurant, you will choose one of the following extra toppings: asparagus, cheese. Also, you will add one of following meats: eggs, turkey. Lastly, you will decide on one of the following dressings: French, vinaigrette. (Note: Use the following letters to indicate each choice: A for asparagus, C for cheese, E for eggs, T for turkey, F for French, and V for vinaigrette.)

\[\{AEF, ATF, AEV, AEF, CEF, CTF, CEV, CEF\}\]

toppings <- c('A','C')
meats <- c('E','T')
dressings <- c('F','V')

q2_data <- crossing(toppings, meats) %>%
  crossing(., dressings) %>%
  mutate(combinations = paste0(toppings, meats, dressings))

as.vector(q2_data$combinations)
## [1] "AEF" "AEV" "ATF" "ATV" "CEF" "CEV" "CTF" "CTV"

Question 3

A card is drawn from a standard deck of 52 playing cards. What is the probability that the card will be a heart and not a face card? Write your answer as a fraction or a decimal number rounded to four decimal places.

\[P(hnf)= \frac{52 \cdot \frac{1}{4}}{52-12}=\frac{13}{40}=0.325\]

13/40
## [1] 0.325

Question 4

A standard pair of six-sided dice is rolled. What is the probability of rolling a sum less than 6? Write your answer as a fraction or a decimal number rounded to four decimal places.

\[P(l) =\frac{\{1,2,3,4,5\}}{\{1,2,3,4,5,6\}}=\frac{5}{6}\approx0.8333\]

5/6
## [1] 0.8333333

Question 5

A pizza delivery company classifies its customers by gender and location of residence. The research department has gathered data from a random sample of 2001 customers. The data is summarized in the table below.

  Male Female
Apartment 233 208
Dorm 159 138
With Parent(s) 102 280
Sorority/Fraternity Home 220 265
Other 250 146

What is the probability that a customer is male? Write your answer as a fraction or a decimal number rounded to four decimal places.

\[P(m) = \frac{233+159+102+120+250}{233+159+102+220+250+208+138+280+265+146} =\frac{964}{2001} \approx 0.4818 \]

q4_data <- data.frame(h=c('Apartment','Dorm','With Parent(s)','Sorority/Fraternity Home', 'Other'), Male = c(233, 159, 102, 220, 250), Female=c(208, 138, 280, 265, 146))
sum(q4_data$Male)/(sum(q4_data$Male)+sum(q4_data$Female))
## [1] 0.4817591

Question 6

Three cards are drawn with replacement from a standard deck. What is the probability that the first card will be a club, the second card will be a black card, and the third card will be a face card? Write your answer as a fraction or a decimal number rounded to four decimal places.

\[P(fbc) = \frac{12}{52} \cdot \frac{26}{52} \cdot \frac{13}{52} \approx 0.0288 \]

12/52 * 26/52 * 13/52
## [1] 0.02884615

Question 7

Two cards are drawn without replacement from a standard deck of 52 playing cards. What is the probability of choosing a spade for the second card drawn, if the first card, drawn without replacement, was a heart? Write your answer as a fraction or a decimal number rounded to four decimal places.

\[P(s|h) = \frac{13}{51} \cdot \frac{13}{52} \approx 0.0637\]

13/51 * 13/52
## [1] 0.06372549

Question 8

Two cards are drawn without replacement from a standard deck of 52 playing cards. What is the probability of choosing a heart and then, without replacement, a red card? Write your answer as a fraction or a decimal number rounded to four decimal places.

\[P(r|h) = \frac{25}{51} \cdot \frac{13}{52} \approx 0.1225\]

25/51 * 13/52
## [1] 0.122549

Question 9

There are 85 students in a basic math class. The instructor must choose two students at random.

  Male Female
Freshman 12 12
Sophomores 19 15
Juniors 12 4
Seniors 7 4

What is the probability that a junior female and then a freshmen male are chosen at random? Write your answer as a fraction or a decimal number rounded to four decimal places.

\[P(fm|jf) = \frac{12}{84} \cdot \frac{4}{85} \approx 0.0068\]

q9_data <- data.frame(c=c('Freshman','Sophomores','Juniors','Seniors'), Male = c(12, 19, 12, 7), Female=c(12, 15, 4, 4))
names(q9_data) <- c('','Male','Female')
total_students <- sum(q9_data$Male) + sum(q9_data$Female)
12/(total_students-1) * 4/total_students
## [1] 0.006722689

Question 10

Out of 300 applicants for a job, 141 are male and 52 are male and have a graduate degree.

 

Step 1.

What is the probability that a randomly chosen applicant has a graduate degree, given that they are male? Enter your answer as a fraction or a decimal rounded to four decimal places.

\[P(g|m) = \frac{52}{141} \approx 0.3688\]

52/141
## [1] 0.3687943

 

Step 2.

If 102 of the applicants have graduate degrees, what is the probability that a randomly chosen applicant is male, given that the applicant has a graduate degree? Enter your answer as a fraction or a decimal rounded to four decimal places.

\[P(m|g) = \frac{52}{102} \approx 0.5098\]

52/102
## [1] 0.5098039

Question 11

A value meal package at Ron’s Subs consists of a drink, a sandwich, and a bag of chips. There are 6 types of drinks to choose from, 5 types of sandwiches, and 3 types of chips. How many different value meal packages are possible?

\[6 \times 5 \times 3 = 90\]

drinks <- c(1,2,3,4,5,6)
sandwiches <- c(1,2,3,4,5)
chips <- c(1,2,3)

q11_data <- crossing(drinks, sandwiches) %>%
  crossing(., chips)
nrow(q11_data)
## [1] 90

Question 12

A doctor visits her patients during morning rounds. In how many ways can the doctor visit 5 patients during the morning rounds?

\[ P(n) = n! \Rightarrow P(5)=5! = 5 \times 4 \times 3 \times 2 \times 1 = 120 \]

factorial(5)
## [1] 120
patients <- c(1,2,3,4,5)
q12_data <- permutations(length(patients), length(patients), patients)
nrow(q12_data)
## [1] 120

Question 13

A coordinator will select 5 songs from a list of 8 songs to compose an event’s musical entertainment lineup. How many different lineups are possible?

\[ C(n,r) = \frac{n!}{r!(n-r)!} \Rightarrow C(8,5) = \frac{8!}{5!(8-5)!} = \frac{40320}{120\cdot 3!} = \frac{40320}{120\cdot 6} = \frac{40320}{720} = 56\]

q13_data <- combinations(8,5)
nrow(q13_data)
## [1] 56

Question 14

A person rolls a standard six-sided die 9 times. In how many ways can he get 3 fours, 5 sixes and 1 two?

\[P(9) = 9! = 362880\]

die_rolls <- c('4.1','4.2','4.3','6.1','6.2','6.3','6.4','6.5','1')
q14_data <- permutations(length(die_rolls), length(die_rolls), die_rolls)
nrow(q14_data)
## [1] 362880

Question 15

How many ways can Rudy choose 6 pizza toppings from a menu of 14 toppings if each topping can only be chosen once?

\[ C(14,6) = \frac{14!}{6!(14-6)!} = \frac{87178291200}{720\cdot 8!} = \frac{87178291200}{720\cdot 40320} = \frac{87178291200}{29030400} = 3003\]

q15_data <- combinations(14,6)
nrow(q15_data)
## [1] 3003

Question 16

3 cards are drawn from a standard deck of 52 playing cards. How many different 3-card hands are possible if the drawing is done without replacement?

\[ C(52,3) = \frac{52!}{3!(52-3)!} = \frac{52!}{3!\cdot 49!} = 22100\]

q16_data <- combinations(52,3)
nrow(q16_data)
## [1] 22100

Question 17

You are ordering a new home theater system that consists of a TV, surround sound system, and DVD player. You can choose from 12 different TVs, 9 types of surround sound systems, and 5 types of DVD players. How many different home theater systems can you build?

\[ 12 \times 9 \times 5 = 540\]

tvs <- c(1,2,3,4,5,6,7,8,9,10,11,12)
surround_sound_systems <- c(1,2,3,4,5,6,7,8,9)
dvd_players <- c(1,2,3,4,5)

q17_data <- tidyr::crossing(tvs, surround_sound_systems) %>%
  tidyr::crossing(., dvd_players)
nrow(q17_data)
## [1] 540

Question 18

You need to have a password with 5 letters followed by 3 odd digits between 0 - 9 inclusively. If the characters and digits cannot be used more than once, how many choices do you have for your password?

\[ C(26,5) = \frac{26!}{5!(26-5)!} = \frac{26!}{5!\cdot 21!} = 65780\]

\[ C(5,3) = \frac{5!}{3!(5-3)!} = \frac{5!}{3!\cdot 2!} = 10\] \[65780 \times 10 = 657800\]

letters <- combinations(26,5)
numbers <- combinations(5,3)
nrow(letters) * nrow(numbers)
## [1] 657800

Question 19

Evaluate the following expression.

\[_9 P_4\] \[_9 P_4=\frac{9!}{(9-4)!}=\frac{362880}{120}=3024\]

N <- 9
n <- 4
factorial(N)/factorial((N-n))
## [1] 3024

Question 20

Evaluate the following expression.

\[_{11}C_8\]

\[_{11}C_8=\frac{11!}{8!\cdot(11-8)!}=\frac{11!}{8!\cdot3!}=\frac{39916800}{403208 \cdot 6}=165\]

N <- 11
n <- 8
factorial(N)/(factorial(n)*factorial(N-n))
## [1] 165

Question 21

Evaluate the following expression.

\[\frac{_{12} P_8}{_{12} C_4}\]

\[_{12}P_8 = \frac{12!}{(12-8)!}=\frac{479001600}{4!}=\frac{479001600}{24}=19958400\]

\[ _{12}C_4=\frac{12!}{4!\cdot(12-4)!}=\frac{479001600}{24\cdot8!}=\frac{479001600}{24\cdot 40320}=\frac{479001600}{967680}=495\] \[\frac{_{12} P_8}{_{12} C_4}=\frac{19958400}{495}=40320\]

N <- 12
n1 <- 8
n2 <- 4
q21_p <- factorial(N)/factorial((N-n1))
q21_c <- factorial(N)/(factorial(n2)*factorial(N-n2))
q21_p/q21_c
## [1] 40320

Question 22

The newly elected president needs to decide the remaining 7 spots available in the cabinet he/she is appointing. If there are 13 eligible candidates for these positions (where rank matters), how many different ways can the members of the cabinet be appointed?

\[ C(13,7) = \frac{13!}{7!(13-7)!} = \frac{6227020800}{5040\cdot 6!} = \frac{6227020800}{5040\cdot 720} = \frac{6227020800}{3628800} = 1716\]

q22_data <- combinations(13,7)
nrow(q22_data)
## [1] 1716

Question 23

In how many ways can the letters in the word ‘Population’ be arranged?

\[ P(10) = 10! = 3628800 \]

letters <- c('P','o','p','u','l','a','t','i','o','n')
factorial(length(letters))
## [1] 3628800

Question 24

Consider the following data:


x 5 6 7 8 9
P(x) 0.1 0.2 0.3 0.2 0.2

 

Step 1

Find the expected value \(E(x)\) Round your answer to one decimal place. \[E(x) = \Sigma {xP(x)}= (5 \times 0.1)+(6 \times 0.2)+(7 \times 0.3)+(8 \times 0.2)+(9 \times 0.2) = 7.2\]

x <- c(5, 6, 7, 8, 9)
px <-c(0.1, 0.2, 0.3,  0.2, 0.2)
ex <- sum(x*px)
ex
## [1] 7.2

 

Step 2

Find the variance. Round your answer to one decimal place.

\[\sigma^2=\Sigma_i (x_i-E(x))^2P(x_i) \] \[\sigma^2= 0.1(5-7.2)^2+0.2(6-7.2)^2+0.3(7-7.2)^2+0.2(8-7.2)^2+0.2(9-7.2)^2\] \[\sigma^2= (0.1\times 4.84)+(0.2 \times 1.44)+(0.3 \times 0.04)+(0.2 \times 0.64)+(0.2 \times 3.24)\] \[\sigma^2=0.484+0.288+0.012+0.128+0.648\approx1.6\]

v <- sum(px*(x-ex)**2)
v
## [1] 1.56

 

Step 3

Find the standard deviation. Round your answer to one decimal place. \[\sigma = \sqrt{\sigma ^2} \approx \sqrt{1.6} \approx 1.3\]

v**(1/2)
## [1] 1.249

The difference is due the the fact that I used 1.6 as the variance instead of 1.56.

 

Step 4

Find the value of \(P(X\geq9)\). Round your answer to one decimal place.

The answer is 0.2 because this is the only P(x) where x >= 9.

sum(px[x>=9])
## [1] 0.2

 

Step 5

Find the value of \(P(X\leq7)\). Round your answer to one decimal place.

\[0.1 + 0.2 + 0.3= 0.6\]

sum(px[x<=7])
## [1] 0.6

Question 25

Suppose a basketball player has made 188 out of 376 free throws. If the player makes the next 3 free throws, I will pay you 23 dollars. Otherwise you pay me 4 dollars.

 

Step 1

Find the expected value of the proposition. Round your answer to two decimal places.

The player shooting \(\frac{188}{376}\) free throws so they have a 50% probability of making the shot. We can now estimate the probability of them making the next 3 shots as \(\frac{1}{8}\). The probability that they won’t is \(\frac{7}{8}\).

The expected value of the proposition is:

\[P(\mbox{winning bet}) \times \mbox{winnings } - P(\mbox{not winning bet}) \times \mbox{loss}\]

\[ \frac{1}{8}\times 23 - \frac{7}{8} \times 4 = \frac{23}{8}-\frac{28}{8} = -\frac{5}{8} \approx -0.63\]

makes_it <-c(1,0)

q25_data <- crossing(makes_it, makes_it) %>%
  crossing(., makes_it)

q25_data$shots_made <- rowSums(q25_data)

made_all_3 <- 1
n <- nrow(q25_data)

pwin <- made_all_3/n
ploose <- 1 - pwin

ex25 <- (pwin * 23) - (ploose * 4)
ex25
## [1] -0.625

 

Step 2

If you played this game 994 times how much would you expect to win or lose? (Losses must be entered as negative.)

\[994 \times -0.63 = -626.22\]

994 * ex25
## [1] -621.25

Question 26

Flip a coin 11 times. If you get 8 tails or less, I will pay you 1 dollar. Otherwise you pay me 7 dollars.

 

Step 1

Find the expected value of the proposition. Round your answer to two decimal places.

flipped_tails <- c(1,0)

q26_data <- crossing(flipped_tails, flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails) %>%
  crossing(., flipped_tails)

q26_data$total_tails <- rowSums(q26_data)

tails_8_or_less <- q26_data %>%
  filter(total_tails < 9) %>%
  nrow(.)
n <- nrow(q26_data)

pwin <- tails_8_or_less/n
ploose <- 1 - pwin

ex26 <- (pwin * 1 )-(ploose * 7)
ex26
## [1] 0.7382812

 

Step 2

If you played this game 615 times how much would you expect to win or lose? (Losses must be entered as negative.)

615 * ex26
## [1] 454.043

Question 27

If you draw two clubs on two consecutive draws from a standard deck of cards you win 583 dollars. Otherwise you pay me 35 dollars. (Cards drawn without replacement.)

 

Step 1

Find the expected value of the proposition. Round your answer to two decimal places.

\[P(c|c) = \frac{12}{51} \cdot \frac{13}{52} \approx 0.059\]

\[ (0.059 \times 583)-((1-0.59)\times 35) \approx 1.46\]

pwin <- (12/51)*(13/52)
ploose <- 1 - pwin
ex27 <- (pwin * 583)-(ploose * 35)
ex27
## [1] 1.352941

The difference is due to the rounding of the probability of wining, but I will use this figure for step 2

 

Step 2

If you played this game 632 times how much would you expect to win or lose? (Losses must be entered as negative.)

\[632 \times 1.35 = 853.20\]

632 * ex27
## [1] 855.0588

Again the difference is due to rounding. Lesson: Don’t use rounded values when calculating values (garbage in garbage out).


Question 28

A quality control inspector has drawn a sample of 10 light bulbs from a recent production lot. If the number of defective bulbs is 2 or less, the lot passes inspection. Suppose 30% of the bulbs in the lot are defective. What is the probability that the lot will pass inspection? (Round your answer to 3 decimal places)

\[F(x;p,n) = \sum_{i=0}^{x}{\left( \begin{array}{c} n \\ i \end{array} \right) (p)^{i}(1 - p)^{(n-i)}}\]

Not wanting to mess this up I will just us R to solve:

p <- 0.3
n <- 10
x <- 2
dbinom(0,n,p)+dbinom(1,n,p)+dbinom(2,n,p)
## [1] 0.3827828
q28 <- pbinom(x, n, p)
q28
## [1] 0.3827828

The answer is 0.383.


Question 29

A quality control inspector has drawn a sample of 5 light bulbs from a recent production lot. Suppose that 30% of the bulbs in the lot are defective. What is the expected value of the number of defective bulbs in the sample? Do not round your answer.

Given $ p=0.3$ and \(n=5\): \[E = p\cdot n = 1.5\]

0.3*5
## [1] 1.5

Question 30

The auto parts department of an automotive dealership sends out a mean of 5.5 special orders daily. What is the probability that, for any day, the number of special orders sent out will be more than 5? (Round your answer to 4 decimal places)

\[F(x;\lambda) = \sum_{i=0}^{x}{\frac{e^{-\lambda}\lambda^{i}} {i!}}\] Given the complexity of the formula they will only be solved in R.

x <- 5
lambda <- 5.5
1 - ppois(1, lambda)
## [1] 0.973436

The answer is 0.9723.


Question 31

At the Fidelity Credit Union, a mean of 5.7 customers arrive hourly at the drive-through window. What is the probability that, in any hour, more than 4 customers will arrive? (Round your answer to 4 decimal places)

x <- 4
lambda <- 5.7
1 - ppois(1, lambda)
## [1] 0.977582

The answer is 0.9776.


Question 32

The computer that controls a bank’s automatic teller machine crashes a mean of 0.4 times per day. What is the probability that, in any 7-day week, the computer will crash no more than 1 time? (Round your answer to 4 decimal places)

Since they provide a daily lambda the weekly lambda is \(7\times 0.4\) or \(2.8\).

x <- 1
lambda <- 0.4 * 7
ppois(x, lambda)
## [1] 0.2310782

The answer is 0.2311.


Question 33

A town recently dismissed 8 employees in order to meet their new budget reductions. The town had 6 employees over 50 years of age and 19 under 50. If the dismissed employees were selected at random, what is the probability that more than 1 employee was over 50? Write your answer as a fraction or a decimal number rounded to three decimal places.

q <- 1
m <- 6
n <- 19
k <- 8
1 - phyper(q, m, n, k)
## [1] 0.6505929

The answer is 0.651.


Question 34

Unknown to a medical researcher, 10 out of 25 patients have a heart problem that will result in death if they receive the test drug. Eight patients are randomly selected to receive the drug and the rest receive a placebo. What is the probability that less than 7 patients will die? Write your answer as a fraction or a decimal number rounded to three decimal places

q <- 6
m <- 10
n <- (25-m)
k <- 8
phyper(q, m, n, k)
## [1] 0.9982942

The answer is 0.998.