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
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
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 |
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
It’s A) Dependent
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
It’s B) Independent
ways <- factorial(14)/factorial(6)
There are 121080960 ways that can the members of the cabinet be appointed.
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
\[ \frac{11!}{7!} \]
evaluation <- factorial(11)/factorial(7)
The evaluation answer is 7920
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.
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.
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