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.
Probability red or blue:
round((54 + 75)/(54 + 9 + 75), 4)
## [1] 0.9348
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.
Probability end up with red golf ball:
round(20/(19 + 20 + 24 + 17), 4)
## [1] 0.25
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.
Females + Not living with parents - (Females not living with parents):
round((728 + 932 - 476)/ 1399, 4)
## [1] 0.8463
Determine if the following events are independent.
Going to the gym. Losing weight.
Answer: A) Dependent B) Independent
Answer: A) These events are dependent.
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?
Number of different veggie wraps that can be made:
choose(8,3) * choose(7,3) * choose(3,1)
## [1] 5880
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: B) These events are independent
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?
14 * 13 * 12 * 11 * 10 * 9 * 8 * 7
## [1] 121080960
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:
Total: 22
0 red, 1 orange, 3 green
Calculations:
prob_gggo <- (9/22) * (8/21) * (7/20) * (4/19)
prob_ggog <- (9/22) * (8/21) * (4/20) * (7/19)
prob_gogg <- (9/22) * (4/21) * (8/20) * (7/19)
prob_oggg <- (4/22) * (9/21) * (8/20) * (7/19)
prob <- prob_gggo + prob_ggog + prob_gogg + prob_oggg
The probability is:
## [1] 0.0459
Evaluate the following expression.
11!/7!
Answer:
Describe the complement of the given event.
67% of subscribers to a fitness magazine are over the age of 34.
Answer:
Complement of an Event: All outcomes that are NOT the event. Together the Event and its Complement make all possible outcomes.
So, the complement of the event described above is subscribers to a fitness magazine that are 34 years old or younger. This is (1 - .67 = .33) 33% of the subscribers.
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.)
Calculations for step 1 and step 2:
total_space <- 2^4
num_heads_3 <- choose(4,3)
prob_heads_3 <- num_heads_3 / total_space
expected_value <- 97 * prob_heads_3 + (-30) * (1 - prob_heads_3)
total_games <- 559
expected_amount_in_total_games <- total_games * expected_value
The expected value of the proposition:
## [1] 1.75
The expected amount in 559 games:
## [1] 978.25
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.)
Calculations for step 1 and step 2:
total_space <- 2^9
num_tails_0 <- 1
num_tails_1 <- choose(9,1)
num_tails_2 <- choose(9,2)
num_tails_3 <- choose(9,3)
num_tails_4 <- choose(9,4)
num_tails_4_or_less <- num_tails_1 + num_tails_2 + num_tails_3 + num_tails_4 + num_tails_0
prob_tails_4_or_less <- num_tails_4_or_less / total_space
expected_value <- 23 * prob_tails_4_or_less + (-26) * (1 - prob_tails_4_or_less)
total_games <- 994
expected_amount_in_total_games <- total_games * expected_value
Number of possible outcomes of flipping a coin 9 times:
## [1] 512
Number of possible outcomes of flipping 4 tails or less:
## [1] 256
Probability of getting 4 tails or less:
## [1] 0.5
Expected value of proposition:
## [1] -1.5
Expected win/loss if play 994 times:
## [1] -1491
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.
My guide to solving this problem: https://www.ece.utah.edu/eceCTools/Probability/BayesTheorem/ProbBayesEx1.pdf
P(truth teller) = .80
P(detect truth | told truth) = .90
P(detect lie) = .45
P(detect truth) = .74
P(detect lie and liar) = P(detect liar | liar) P(liar) = .59(.20) = .12
P(randomly selected individual is liar) + P(detect lie) - P(detect lie AND liar) = .20 + .45 - .12 = .53