\((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.

Answer
Given Red marbels = 54
White marbels = 9
Blue marbels = 75
Total marbels = 54 + 9 + 75 = 138
P(Red | Blue) = (54 + 75) / 138 = 129/138 = 0.9348

round((54 + 75) / 138, 4)
## [1] 0.9348

\((2)\) 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.

Answer
Given Green golf ball = 19
Red golf ball = 20
Blue golf ball = 24
Yellow golf ball = 17
Total ball = 19 + 20 + 24 + 17 = 80
P(Red golf ball) = Red golf ball / Total ball = 20/80 = 0.25

round(20 / 80, 4)
## [1] 0.25

\((3)\) 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.

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.

Answer

From the above table, Total male = 671
Total female = 728
Total residence = Total male + Total female = 671 + 728 = 1399

P(Not male or does not live with parents) = (Total residence) - (male live with parents) / Total residence
P(Not male or does not live with parents) = (1399 - 215) / 1399
P(Not male or does not live with parents) = 0.8463

round((1399 - 215) / 1399, 4)
## [1] 0.8463

\((4)\) Determine if the following events are independent.
Going to the gym. Losing weight.
Answer: A) Dependent B) Independent

Answer

Going to the gym is independent.(Person can go to the gym or not)
Losing weight is dependent on gym.(Going to gym means workout, so weight loss)
So, two events are dependent.
Answer is A) Dependent

\((5)\) 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?

Answer

This problem can solve using combination vegetables = 8 condiments = 7 tortilla = 3

\[C(n,r) = \frac{n!}{r!(n-r)!}\] \[C(totalwrap) = C(8,3) * C(7,3) * C(3,1) = \frac{8!}{3!(8-3)!} * \frac{7!}{3!(7-3)!} * \frac{3!}{1!(3-1)!} \] \[C(totalwrap) = 5880\]

choose(8,3) * choose(7, 3) * choose(3, 1)
## [1] 5880

\((6)\) 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

Answer

Answer is B) Independent

These two events have no where realted to each other.

\((7)\) 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?

Answer

Spots availabe = 8
Candidates = 14
\[No. of ways = P(n,r) = \frac{n!}{(n-r)!}\]
\[No. of ways = P(14,8) = \frac{14!}{(14-8)!} \]
No. of ways = 121080960

factorial(14) / factorial(6)
## [1] 121080960

\((8)\) 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.

Answer

Given, Red jellybeans = 9
Orange jellybeans = 4
Green jellybeans = 9
Total = 9 + 4 + 9 = 22
P(Orange = 1, Green = 3) = Random_combo / Total_combo
\[Random Combo = C(9,0) * C(4,1) * C(9,3) = \frac{9!}{0!(9-0)!} * \frac{4!}{1!(4-1)!} * \frac{9!}{3!(9-3)!} = 336\] \[Total Combo = C(22,4) = \frac{22!}{4!(22-4)!} = 7315\] P(Orange = 1, Green = 3) = Random_combo / Total_combo = 336 / 7315 = 0.0459

random_combo <- choose(4,1) * choose(9,3)
random_combo
## [1] 336
total_combo <- choose(22,4)
total_combo
## [1] 7315
round(random_combo / total_combo, 4)
## [1] 0.0459

\((9)\) Evaluate the following expression
\[\frac{11!}{7!}\] Answer

\[\frac{11!}{7!}\] \[\frac{11 * 10 * 9 * 8 * 7!}{7!}\] \[11 * 10 * 9 * 8 = 7920\]

factorial(11) / factorial(7)
## [1] 7920

\((10)\) Describe the complement of the given event.
67% of subscribers to a fitness magazine are over the age of 34.

Answer
Complement of the event : 33% of subscribers to a fitness magazine are less than or equal to age of 34.

\((11)\) 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.

Answer
Expected value of the proposition is: (P exactly 3 heads + P not 3 heads)

total_combo <- 2 ^ 4
P_3heads <- choose(4,3) / total_combo
P_not3heads <- 1 - choose(4,3) / total_combo
expect_value <- round((P_3heads * 97) + P_not3heads * (-30), 2)
expect_value
## [1] 1.75

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

Answer
The expect to win $978.25.

round(expect_value * 559,2)
## [1] 978.25

\((12)\) 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

Answer
Expected value of the proposition is: (P of 4 tails or less + P more than 4 tails)

combo <- 2 ^ 9
P_4tails_less <- sum(choose(9,4),choose(9,3),choose(9,2),choose(9,1),choose(9,0)) / combo
P_4tails_more <- 1 - P_4tails_less
expect_value <- round((P_4tails_less * 23) + P_4tails_more * (-26), 2)
expect_value
## [1] -1.5

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

Answer
The expect to lose -$1491.

round(expect_value * 994, 2)
## [1] -1491

\((13)\) 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.

a. 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.)

Answer
According to Bayes Theorem
P(A) = Probability of Liar
P(X) = Probability of lie detected by Polygraph
\[P(Liar|Polygraph Detected Liar) = \frac{P(Polygraph Detected Liar|Liar) * P(Liar)}{P(Polygraph Detected Liar)*P(Liar) +P(Polygraph Detected Liar | Truth) * P(Truth)}\] P(Polygraph Detected Liar) = 0.59
P(Polygraph Detected Truth) = 0.90
P(Polygraph Detected Lie) = 1 - 0.9 = 0.1
P(Liar) = 0.2
P(Truth) = 1 - 0.2 = 0.8
\[P(Liar|Polygraph Detected Liar) = \frac{(0.59 * 0.2)} {(0.59 * 0.2) + (0.1 * 0.8)}\] \[P(Liar|Polygraph Detected Liar) = 0.5959596\] So, around 60% chance that the person was a liar if polygraph test detect him/her was a liar.

(0.59 * 0.2) / (0.59 * 0.2 + 0.1 * 0.8)
## [1] 0.5959596

b. 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.)

Answer
P(A) = Truth teller
P(B) = Polygraph detect truth teller
\[P(Truth teller|Polygraph Detected truth teller) = \frac{P(Polygraph Detected truth teller| Truth teller) * P(Truth)}{P(Polygraph Detected truth teller)*P(Truth teller) +P(Polygraph Detected truth teller | Liar) * P(Liar)}\] P(Polygraph Detected Liar) = 0.59
P(Polygraph Detected Truth) = 0.90
P(Polygraph Detected Lie) = 1 - 0.9 = 0.1
P(Polygraph Detected truth | Liar) = 1 - 0.59 = 0.41
P(Liar) = 0.2
P(Truth) = 1 - 0.2 = 0.8

\[P(Truth teller|Polygraph Detected truth teller) = \frac{(0.9 * 0.8)} {(0.9 * 0.8) + (0.41 * 0.2)}\] \[P(Truth teller|Polygraph Detected truth teller) = 0.8977556\]

0.9 * 0.8 / (0.9 * 0.8 + 0.41 * 0.2)
## [1] 0.8977556

About 90% chance that the person was a telling truth if polygraph test detect him/her was a truth teller.

c. 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.

Answer

\[P(A \cup B) = P(A) + P(B) - P(A \cap B)\] P(A) = Polygraph Detected liar
P(B) = Indivisual is actually Liar
P(A and B) = Individual lier and polygraph detected liar
\[P(A \cup B) = (0.59 * 0.2 + 0.1 * 0.8) + 0.2 - (0.59 * 0.2)\] \[P(A \cup B) = 0.198 + 0.2 - 0.118\] \[P(A \cup B) = 0.198 + 0.2 - 0.118\] \[P(A \cup B) = 0.28\]

(0.59 * 0.2 + 0.1 * 0.8) + 0.2 - (0.59 * 0.2)
## [1] 0.28

About 28% randomly selected individual is either a liar or was identified as a liar by the polygraph.