[Inclusive "Or"] probability means one event can happen or another, and so on, and ALL the events can happen. It's due to the situation of being non-mutually exclusive
Code: Select all
print(f "What is the chance of unknowingly picking a banana or an orange from a basket containing a banana, orange, apple, pear, kiwi, tangerine, and grapefruit (two picks)?")
float(banana_outcome) = float(orange_outcome) = 1/7
banana_and_orange_outcomes_ added = banana_outcome + orange_outcome
banana_and_orange_outcomes_multiplied = banana_outcome * orange_outcome
chance_of_banana_or_orange_given_two_picks = banana_and_orange_outcomes_added - banana_and_orange_outcomes_multiplied
percent_chance_of_banana_or_orange_given_two_picks = chance_of_banana_or_orange_given_two_picks * 100
print(f "The chance of unknowingly picking a banana or orange from the basket is {chance_of_banana_or_orange_given_two_picks} which is {percent_chance_of_banana_or_orange_given_two_picks} \%")
\(P(E_{1}) + P(E_{2})...+\,\,P(E_{n + 1})
\)
\(- P(E_{1} \wedge E_{2}...\wedge\,\,E_{n + 1})\)
Given that:
\(P(E) = \dfrac{O_{F}}{O_{T}}\)
\(O_{T} \ne 0\)
Read: The probability of event 1 [inclusive "or"] event 2, [inclusive "or"] event E_{n + 1} equals the probability of event 1 added to the probability of event 2 added to the probability of event E_{n + 1} subtracted by the probability of event 1 and event 2, and event E_{n + 1}
Given that
The probability of an event is the outcomes favored divided by the outcomes total.
\(P(E_{1} \vee E_{2}) = P(E_{1}) + P(E_{2}) - P(E_{1} \wedge E_{2}) \)What is the chance of unknowingly picking a banana or an orange from a basket containing a banana, orange, apple, pear, kiwi, tangerine, and grapefruit (two picks)?
Given that:
\(P(E) = \dfrac{O_{F}}{O_{T}}\)
\(P(banana \vee orange) = P(banana) + P(orange) - P(banana \wedge orange) \)
\(P(banana \vee orange) = \)
\(\dfrac{1}{7} + \dfrac{1}{7} - P(\dfrac{1}{7} * \dfrac{1}{7}) = \)
\(\dfrac{2}{7} - \dfrac{1}{49} = \dfrac{13}{49} = 0.26530612244 = 0.27 \%\)
Given that:
\(P(banana) = \dfrac{banana}{total\,\,fruit} = \dfrac{1}{7}\)
\(P(orange) = \dfrac{orange}{total\,\,fruit} = \dfrac{1}{7}\)
