Professional Documents
Culture Documents
Statistics
• What is the probability that a randomly selected smoker is male? This time,
you're told that you have a smoker and asked to find the probability that the
smoker is also male. There are 19 male smokers out of 31 total smokers, so 19/31
= 0.6129 (approx)
PROBABILITY RULES
• Example 2: Company Good Defective Total
Aberations 0.50-0.025 = 0.05(0.50) = 0.025 0.50
• There are three major manufacturing 0.475
Brochmailians 0.30-0.021 = 0.07(0.30) = 0.021 0.30
companies that make a product: Aberations, 0.279
Brochmailians, and Chompielians. Aberations Chompieliens 0.20-0.020 = 0.10(0.20) = 0.020 0.20
has a 50% market share, and Brochmailians 0.180
Total 0.934 0.066 1.00
has a 30% market share. 5% of Aberations'
product is defective, 7% of Brochmailians'
product is defective, and 10% of
Chompieliens' product is defective. • Notice that the 5%, 7%, and 10% defective rates
don't go into the table directly. This is because they
• Solution: This information can be placed into are conditional probabilities and the table is a joint
a joint probability distribution. probability table. These defective probabilities are
conditional upon which company was given. That
• The percent of the market share for is, the 7% is not P(Defective), but P(Defective|
Chompieliens wasn't given, but since the Brochmailians). The joint probability P(Defective
marginals must add to be 1.00, they have a and Brochmailians) = P(Defective|Brochmailians) *
20% market share. P(Brochmailians).
PROBABILITY RULES
Company Good Defective Total
• What is the probability that a defective
Aberations 0.50-0.025 = 0.05(0.50) = 0.025 0.50
0.475 product came from Brochmailians?
P(Brochmailian|Defective) =
Brochmailians 0.30-0.021 = 0.07(0.30) = 0.021 0.30
0.279 P(Brochmailian and Defective) /
P(Defective) = 0.021/0.066 = 7/22 = 0.318
Chompieliens 0.20-0.020 = 0.10(0.20) = 0.020 0.20
0.180 (approx).
Total 0.934 0.066 1.00 • Are these events independent? No. If
they were, then P(Brochmailians|
• The "good" probabilities can be found by Defective)=0.318 would have to equal the
subtraction as shown above, or by multiplication P(Brochmailians)=0.30, but it doesn't.
using conditional probabilities. If 7% of Also, the P(Aberations and
Brochmailians' product is defective, then 93% is
good. 0.93(0.30)=0.279.
Defective)=0.025 would have to be
P(Aberations)*P(Defective) =
• What is the probability a randomly selected 0.50*0.066=0.033, and it doesn't.
product is defective? P(Defective) = 0.066
BAYES’ THEOREM
• Bayes' theorem is a mathematical formula
used to determine the conditional
probability named by the 18th century
English mathematician Thomas Bayes.
• After the fact that there is an A event,
Bayes rule is also used to calculate the
conditional probability of one of the factors
that have an effect on the occurrence of
this event. • P (A | B) = Probability of event A when
event B occurs.
• It is the method used to determine the
effect (conditional probability) of any • P (A) = Probability of event A.
symptom on occurrence of A in a wide set
of symptoms. • P (B | A) = The probability of event B
happening when event A occurs.
• It is the most popular and widely used
theory among probability theories. • P (B) = Probability of event B.
BAYES’ THEOREM
• Conditional probability has a wide • Bayes' theorem is used when it is desired
application in statistics. to investigate with which probability and
• The total probability and bayes theorem why.
developed based on this concept gains • In other words, Bayes' theorem provides
importance especially in decision making. the opportunity to analyze backwards
• When the probability of a B event cannot while the result is clear.
be calculated directly, the probability of a • Bayes rule is used in calculating
B event can be found based on these two conditional probabilities.
concepts. • If more than two events (factor, option,
• In cases where various reasons can give cause) have an effect on the occurrence
the same result, it may not be known for of an A event, when the A event occurs,
what reason this occurs, although the probability of observation of one of
sometimes the result is known. the factors is calculated according to the
Bayesian rule.
BAYES THEOREM
• Example1: X gene was detected in 70% of people with A
desease, which is seen in 5% of the population.
• However, just 20% of non-sick people were found to have the
X gene.
• In the light of these data, what is the probability that people
carrying the X gene become ill?
• Solution:
BAYES THEOREM
• Example2: According to a study, • Solution:
1 out of every 43 children get a • P (A): The probability that the child
certain disease that occurs in will become sick = 1/43
adulthood, and although it is not • P (B): Test probability of positive =
completely reliable, the test of 1/43 * 0.80 + 42/43 * 0.10 = 5/43
an ill child gives 80% positive • P (A | B): Possibility of positive test
and a healthy child's test 10% disease (this is asked)
positive. • P (B | A): The probability that the test
• According to this information, of the child with the disease will be
positive = 0.80
what is the probability that a
child with a positive test result • P (A | B) = P (B | A) * P (A) / P (B) =>
will actually become ill? (0.80 * 1/43) / (5/43) = 0.16 = 16%.
BAYES THEOREM
• Example3: Ali says it is itchy. • Solution:
• A: Allergy, B: Test ‘Yes’
• There is a test for cat allergy, but this
test is not always true: For people • P (A): Allergy probability = 0.01
who are really allergic, it is 80% that • P (B): The probability that the test will be yes =?
(we will have to calculate)
the test gives a "Yes" result.
• P (A | B): Possibility of allergies if the test is yes =?
• For people without allergies, the test (desired result)
gives a "Yes" rate of 10% ("false • P (B | A): In case of an allergy, the probability of
positive"). the test going out yes = 0.80
• If there is an allergy in 1% of the • Let's find P (B) first. We will calculate the
probability of the test going out for those with and
population and the test shows "Yes", without allergies, that is, for the entire population.
what is the probability that Ali is really • We found P (B) = 0.01 * 0.80 + 0.99 * 0.10 = 0.107.
allergic? • P (A | B) = P (A) * P (B | A) / P (B) => 0.01 * 0.80 /
0.107 = 0.075 => ~ 7.5%.