You are on page 1of 23

Probability

Dr Azmi Mohd Tamil
Dept of Community Health
Universiti Kebangsaan Malaysia

Sample Spaces
4

A sample space is the set of all possible outcomes.
However, some sample spaces are better than others.

4

Consider the experiment of flipping two coins. It is
possible to get 0 heads, 1 head, or 2 heads. Thus, the
sample space could be {0, 1, 2}. Another way to look
at it is flip { HH, HT, TH, TT }. The second way is
better because each event is as equally likely to occur
as any other.

4

When writing the sample space, it is highly desirable
to have events which are equally likely.

but you can get a sum of 4 by rolling a 3-1. However. 11. 6. 4. The following table illustrates a better sample space for the sum obtain when rolling two dice. 5. each of these aren't equally likely. 12 }. 3. 8.Sample Spaces 4 Another example is rolling two dice. The only way to get a sum 2 is to roll a 1 on both dice. The sums are { 2. or 31. 9. 2-2. . 7. 10.

Example First Die 1 2 3 4 5 6 1 2 3 4 5 6 7 2 3 4 5 6 7 8 Second Die 3 4 4 5 5 6 6 7 7 8 8 9 9 10 5 6 7 8 9 10 11 6 7 8 9 10 11 12 .

P(E) = n(E) / n(S) . 4 4 This gives us the formula for classical probability. if the events are equally likely.Classical Probability Sum Freq Relative Freq 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 5 4 3 2 1 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36 4 The relative frequency of a frequency distribution is the probability of the event occurring. The probability of an event occurring is the number in the event divided by the number in the sample space. however. This is only true.

Empirical Probability 4 Empirical probability is based on observation. The empirical probability of an event is the relative frequency of a frequency distribution based upon observation. 4 P(E) = f / n .

4 The probability of an event which must occur is 1.Probability Rules 4 All probabilities are between 0 and 1 inclusive 0 <= P(E) <= 1 4 The sum of all the probabilities in the sample space is 1 4 The probability of an event which cannot occur is 0.P(E) . P(E') = 1 . 4 The probability of an event not occurring is one minus the probability of it occurring.

.Mutually Exclusive Events 4 Two events are mutually exclusive if they cannot occur at the same time. 4 If two events are mutually exclusive . Mutually Exclusive : P(A and B) = 0 4 If two events are mutually exclusive. then the probability of them both occurring at the same time is 0. then the probability of either occurring is the sum of the probabilities of each occurring.

P(A or B) = P(A) + P(B) .Specific Addition Rule 4 Only valid when the events are mutually exclusive.

A and B are mutually exclusive A A' Total B 0 0.7 0.Example 1 4 Given: P(A) = 0.3 Total 0.20.8 1 .1 0.70.2 0. P(B) = 0.2 0.7 B' 0.

the intersection needs to be subtracted. To compensate for that double addition. When P(A) and P(B) are added. 4 General Addition Rule P(A or B) = P(A) + P(B) . the probability of the intersection (and) is added twice. there is some overlap.P(A and B) .Non-Mutually Exclusive Events 4 In events which aren't mutually exclusive.

15 A A' Total B 0.25 0.70.Example 2 4 Given P(A) = 0.7 B' 0.20. P(B) = 0.55 0.15 0.05 0.8 1 .2 0.3 Total 0. P(A and B) = 0.

then the probability of them both occurring is the product of the probabilities of each occurring. Rolling the 2 does not affect the probability of flipping the head. 4 If events are independent.Independent Events 4 Two events are independent if the occurrence of one does not change the probability of the other occurring. 4 An example would be rolling a 2 on a die and flipping a head on a coin. .

Specific Multiplication Rule 4 Only valid for independent events P(A and B) = P(A) * P(B) .

P(B) = 0.2 0.14 0.56 0.06 0.8 1 .70.20.24 0.Example 3 4 P(A) = 0. A A' Total B 0.3 Total 0.7 B' 0. A and B are independent.

Dependent Events 4If the occurrence of one event does affect the probability of the other occurring. then the events are dependent. .

Conditional Probability 4The probability of event B occurring that event A has already occurred is read "the probability of B given A" and is written: P(B|A) 4 General Multiplication Rule P(A and B) = P(A) * P(B|A) .

8 1 .70.20.40 B 0.18 0.62 0. P(B|A) = 0.12 0.7 B' 0.2 0.3 Total 0.08 0.Example 4 4 P(A) A A' Total = 0. P(B) = 0.

P(B|A) = P(B) .P(A and B) = P(A) * P(B) 3.Independence Revisited 4 The following four statements are equivalent 1.P(A|B) = P(A) 4.A and B are independent events 2.

19 males smoke out of 60 males. . you're told that you have a smoker and asked to find the probability that the smoker is also male. Yes No Total Male 19 41 60 Female 12 28 40 Total 31 69 100 •What is the probability of a randomly selected individual being a male who smokes? This is just a joint probability. "Do you smoke?" was asked of 100 people.31666. it includes all the cases.19 •What is the probability of a randomly selected individual being a male? This is the total for male divided by the total = 60/100 = 0. this is a marginal probability. so 19/31 = 0.. Since no mention is made of smoking or not smoking. The number of "Male and Smoke" divided by the total = 19/100 = 0. •What is the probability that a randomly selected smoker is male? This time.60. you're told that you have a male . What is the probability that the male smokes? Well.6129 (approx) .31.think of stratified sampling.The question. the total who smoke divided by the total = 31/100 = 0. •What is the probability of a randomly selected individual smoking? Again. so 19/60 = 0.. Results are shown in the table. There are 19 male smokers out of 31 total smokers. since no mention is made of gender. •What is the probability of a randomly selected male smoking? This time.

05(0. and 10% of Chompieliens' product is defective.20 Total 0.934 0.50) = 0.30-0.020 = 0.30) = 0. 7% of Brochmailians' product is defective.There are three major manufacturing companies that make a product: Aberations.180 0.279 0.021 0. Aberations has a 50% market share.020 0. Brochmailians.025 0.20-0.50 Brochmailians 0.50-0.00 .30 Chompieliens 0. and Brochmailians has a 30% market share.475 0.021 = 0. 5% of Aberations' product is defective.07(0.20) = 0.025 = 0.066 •What is the probability a randomly selected product is defective? •What is the probability that a defective product came from Brochmailians? 1.10(0. This information can be placed into a joint probability distribution Company Good Defective Total Aberations 0. and Chompielians.

30)=0. 7%. but since the marginals must add to be 1. and 10% defective rates don't go into the table directly.066 •What is the probability that a defective product came from Brochmailians? P(Brochmailian|Defective) = P(Brochmailian and Defective) / P(Defective) = 0. The "good" probabilities can be found by subtraction as shown above.318 (approx).00. they have a 20% market share. or by multiplication using conditional probabilities.318 would have to equal the P(Brochmailians)=0.The percent of the market share for Chompieliens wasn't given. This is because they are conditional probabilities and the table is a joint probability table. •Are these events independent? No.93(0. but P(Defective|Brochmailians).025 would have to be P(Aberations)*P(Defective) = 0. If they were. 0. If 7% of Brochmailians' product is defective. •What is the probability a randomly selected product is defective? P(Defective) = 0. the P(Aberations and Defective)=0. but it doesn't.279. . then P(Brochmailians|Defective)=0. The joint probability P(Defective and Brochmailians) = P(Defective|Brochmailians) * P(Brochmailians).066=0. These defective probabilities are conditional upon which company was given.033.30. and it doesn't.50*0. the 7% is not P(Defective). That is.066 = 7/22 = 0. Also.021/0. then 93% is good. Notice that the 5%.

This is given in the problem. the part of D in B. and D instead of Aberations. C. P(D|B) is not a Bayes problem. Brochmailians. B.Bayes' Theorem Let's use the same example. ie: A. but shorten each event to its one letter initial. the part of D in A. Bayes' formula finds the reverse conditional probability P(B|D). It is based that the Given (D) is made of three parts. and the part of D in C. Chompieliens. P(B and D) P(B|D) = ----------------------------------------------------P(A and D) + P(B and D) + P(C and D) Inserting the multiplication rule for each of these joint probabilities gives P(D|B)*P(B) P(B|D) = -----------------------------------------------------------P(D|A)*P(A) + P(D|B)*P(B) + P(D|C)*P(C) . and Defective.