1. A box contains 54 red marbles, 9 white marbles, and 75 blue marbles. If a marble is randomly selected from the box, what is the probability that it is red or blue? Express your answer as a fraction or a decimal number rounded to four decimal places.
red <- 54; white <- 9; blue <- 75
total <- red + blue + white
red_blue_probablity <- round((total-white)/total,4)
The probability that it is red or blue is 0.9348
  1. You are going to play mini golf. A ball machine that contains 19 green golf balls, 20 red golf balls, 24 blue golf balls, and 17 yellow golf balls, randomly gives you your ball.
    What is the probability that you end up with a red golf ball? Express your answer as a simplified fraction or a decimal rounded to four decimal places.
green <- 19; red <- 20; blue <- 24; yellow <- 17
total <- green + red + blue + yellow
red_probability <- round(red/total,4)
The probability that it is red is 0.25
  1. A pizza delivery company classifies its customers by gender and location of residence. The research department has gathered data from a random sample of 1399 customers. The data is summarized in the table below.
    Gender and Residence of Customers
    Males Females
    Apartment 81 228
    Dorm 116 79
    With Parent(s) 215 252
    Sorority/Fraternity House 130 97
    Other 129 72

    What is the probability that a customer is not male or does not live with parents? Write your answer as a fraction or a decimal number rounded to four decimal places.
total <- 1399
not_male_not_with_parents_probability <- round((total-215)/total,4)
The probability that a customer is not male or does not live with parents is 0.8463
  1. Determine if the following events are independent.
    Going to the gym. Losing weight.
    Answer: A) Dependent B) Independent

It’s A) Dependent


  1. A veggie wrap at City Subs is composed of 3 different vegetables and 3 different condiments wrapped up in a tortilla. If there are 8 vegetables, 7 condiments, and 3 types of tortilla available, how many different veggie wraps can be made?

For m>n, use formula: \[ \frac{n!}{(n-m)!m!} \]

vegetables_possibility <- factorial(8)/(factorial(5)*factorial(3))
condiments_possibility <- factorial(7)/(factorial(4)*factorial(3))
wraps_possibility <- factorial(3)/(factorial(2)*factorial(1))
wraps <- vegetables_possibility * condiments_possibility * wraps_possibility
Veggie wraps possibilities are 5880
  1. Determine if the following events are independent.
    Jeff runs out of gas on the way to work. Liz watches the evening news.
    Answer: A) Dependent B) Independent

It’s B) Independent


  1. The newly elected president needs to decide the remaining 8 spots available in the cabinet he/she is appointing. If there are 14 eligible candidates for these positions (where rank matters), how many different ways can the members of the cabinet be appointed?
ways <- factorial(14)/factorial(6)
There are 121080960 ways that can the members of the cabinet be appointed.
  1. A bag contains 9 red, 4 orange, and 9 green jellybeans. What is the probability of reaching into the bag and randomly withdrawing 4 jellybeans such that the number of red ones is 0, the number of orange ones is 1, and the number of green ones is 3? Write your answer as a fraction or a decimal number rounded to four decimal places.
orange_possibility <- factorial(4)/(factorial(3)*factorial(1))
green_possibility <- factorial(9)/(factorial(6)*factorial(3))
takeout_from_total_possibility <- factorial(22)/(factorial(18)*factorial(4))
orange_1_green_3_possibility <- orange_possibility * green_possibility / takeout_from_total_possibility
The answer is 0.0459 possibilities
  1. Evaluate the following expression.

\[ \frac{11!}{7!} \]

evaluation <- factorial(11)/factorial(7)
The evaluation answer is 7920
  1. Describe the complement of the given event.
    67% of subscribers to a fitness magazine are over the age of 34.
If %(subscribers > 34) = 67%, then the %(subscribers <= 34) = 33%.
  1. If you throw exactly three heads in four tosses of a coin you win $97. If not, you pay me $30.
    Step 1. Find the expected value of the proposition. Round your answer to two decimal places.
    Step 2. If you played this game 559 times how much would you expect to win or lose? (Losses must be entered as negative.)

Expected Value: \(P(x) * n\)

Step 1 -

per_trial_probability <- 0.5 
probability_3_heads <- (factorial(4)/(factorial(4-3)*factorial(3)))*per_trial_probability^4
expected_value_to_win <- probability_3_heads * 97
expected_value_to_lose <- (1-probability_3_heads) * 30

The probability of winning is 0.25 and its expected value is 24.25. And the probability of losing is 0.75 with expected value of 22.5

Step 2 -

expected_value_at_559 <- 559 * (expected_value_to_win - expected_value_to_lose)
If played 559 times, winning will be 978.25 dollars.
  1. Flip a coin 9 times. If you get 4 tails or less, I will pay you $23. Otherwise you pay me $26.
    Step 1. Find the expected value of the proposition. Round your answer to two decimal places.
    Step 2. If you played this game 994 times how much would you expect to win or lose? (Losses must be entered as negative.)

Expected Value: \(P(x) * n\)

Step 1 -

toss <- 9
probability_1_coin_side = 0.5
probability_of_no_tail <- 1
probability_of_1_tail <- factorial(9)/factorial(9-1)*factorial(1)
probability_of_2_tail <- factorial(9)/(factorial(9-2)*factorial(2))
probability_of_3_tail <- factorial(9)/(factorial(9-3)*factorial(3))
probability_of_4_tail <- factorial(9)/(factorial(9-4)*factorial(4))
winning_probability <- (probability_of_no_tail + probability_of_1_tail + probability_of_2_tail + probability_of_3_tail + probability_of_4_tail) * probability_1_coin_side^toss

The probability of winning is 0.5. And the probability of losing is 1 - winning_probability = 0.5.

Step 2 -

total_outcome <- 994 * (winning_probability * 23 - (1-winning_probability) * 26)
If played 994 times, the total outcome is -1491 which means that the loss = 1491 dollars.
  1. The sensitivity and specificity of the polygraph has been a subject of study and debate for years. A 2001 study of the use of polygraph for screening purposes suggested that the probability of detecting a liar was .59 (sensitivity) and that the probability of detecting a “truth teller” was .90 (specificity). We estimate that about 20% of individuals selected for the screening polygraph will lie.
  1. What is the probability that an individual is actually a liar given that the polygraph detected him/her as such? (Show me the table or the formulaic solution or both)
  2. What is the probability that an individual is actually a truth-teller given that the polygraph detected him/her as such? (Show me the table or the formulaic solution or both.)
  3. What is the probability that a randomly selected individual is either a liar or was identified as a liar by the polygraph? Be sure to write the probability statement.
liar_detection_probability <- 0.59
truth_detection_probability <- 0.9
doubted_liar_detection_probability <- 1 - liar_detection_probability
doubted_truth_detection_probability <- 1 - truth_detection_probability
liars_percentage_from_total <- 0.2
truths_percentage_from_total <- 1 - liars_percentage_from_total

Based on Bayes Theorem:

a - \[ \begin{split} P(Liars) &= \frac{P(IdentifiedLiars)\times P(PossibleLiarsDetection)}{P(TotalPossibleLiars)} \\ &= \frac{P(IdentifiedLiars)\times P(Liar)}{P(PossibleLiarsDetection)\times P(IdentifiedLiars)+P(IdentifiedTruthTeller)\times P(DoubtedTruthTeller)} \end{split} \]

is_liar_probability <- liars_percentage_from_total * liar_detection_probability / ((liars_percentage_from_total * liar_detection_probability) + (truths_percentage_from_total * doubted_truth_detection_probability))

The probability that an individual is actually a liar is 0.596

b - \[ \begin{split} P(TruthTellers) &= \frac{P(IdentifiedTruthTellers)\times P(PossibleTruthTellersDetection)}{P(TotalPossibleTruthTellers)} \\ &= \frac{P(IdentifiedTruthTellers)\times P(Liar)}{P(PossibleTruthTellersDetection)\times P(IdentifiedTruthTellers)+P(IdentifiedTruthTeller)\times P(DoubtedTruthTeller)} \end{split} \]

is_truth_teller_probability <- truths_percentage_from_total * truth_detection_probability / ((truths_percentage_from_total * truth_detection_probability) + (liars_percentage_from_total * doubted_liar_detection_probability))

The probability that an individual is actually a truth-teller is 0.8978

c - \[ \begin{split} P(IdentifiedLiars \cup PossibleLiars) &= P(IdentifiedLiars)+P(PossibleLiars) \end{split} \]

is_or_was_liar_probability <- liars_percentage_from_total + (truths_percentage_from_total * doubted_truth_detection_probability)
The probability that a randomly selected individual is either a liar or was identified as a liar is 0.28