Chapter OneIntroduction to Probability
2
DISCRETE RANDOM VARIABLESDISCRETE RANDOM VARIABLES
At the end of the lecture, you will be able to :
- describe types of events and random variables
- calculate their probability distribution and their cumulative distribution
Learning Objectives:
3
Basic Definitions:
Random Experiment and Outcomes
Outcomes can be represented by Venn diagram or tree diagram.
Event: collection of one or more of the outcomes of an experiment.
Random Experiment
Outcomes/ Equally likely Possibilities
Toss a fair coin once Head, Tail
Roll a fair die once 1,2,3,4,5,6
Take a test Pass, Fail
Select a worker Male, female
Sample Spaces and Events
4
Example1.
Roll a die Sample space:
S = {1, 2, 3, 4, 5, 6}
Simple events (or outcomes):
E1: observe a 1= {1} E3 = {3} E4 = {4}
E2 = {2} E5 = {5} E6 = {6}
Compound events: A : observe an odd number = {1, 3, 5} B : observe a number greater than or equal to 4 = {4, 5, 6}
5
Example 1
Toss a coin three times and note the number of heads
The lifetime of a machine (in days)
The working state of a machine The number of calls arriving at a telephone exchange during a
specific time interval
6
Example 2: Each message in a digital communication system is classified as to
whether it is received within the time specified by the system design. If 3 messages are classified, what is an appropriate sample space for this experiment?
To generate the sample space, we can use a tree diagram
7
Types of events:
Complementary events: The complement of event A, is the event that includes all the outcomes for an experiment that are not in A.
Intersection of events ( A ∩ B) : The collection of all outcomes that are common to both event A and event B.
Union of events (A U B) : The collection of all outcomes that belong to either event A or to event B or to both event A and event B.
Mutually Exclusive events: Events that cannot occur together.
8
Definition of Probability
A probability P is a rule ( or function) which assigns a number between 0 and 1 to each event and satisfies:
0 ≤ P(E) ≤ 1 for any event E
P(Ø ) = 0 , P(S) = 1,
9
Calculating Probability
Probability: a numerical measure of the chance/likelihood that a specific event will occur.
Classical way of finding probability
n(S)
n(A)
iespossibilitlikelyequallyofNumberTotal
AeventiniespossibilitofNumber)(
AP
10
The probability of the complement of any event A is given as
Example: If P(rain tomorrow) = 0.6 then P(no rain tomorrow) = 0.4
Other notations for complement: Ac or Ā
( ') 1 ( )P A P A
11
Examples :
Generate the sample space using tree diagram
a)A jar contains 5 red sweets and 3 blue sweets. Two sweets are drawn at random i) with replacement and ii) without replacement.
b)Kamil has the option of taking one of three routes to work A, B or C. The probability of taking route A is 30%, and B is 15%. The probability of being late for work if he goes by route A is 10% and similarly by route B is 5% and route C is 2%.
c)A normal six sided fair die is thrown until a five is scored and then no more throws are made. The process continues up to a maximum of three throws.
General Addition Law
12
8 blue marbles, 5 blue cubes, 10 green marbles and 7 green cubes
Total sample space : 30 objects
P( Cubes or green)
General Addition Law
13
Let A and B be two events defined in a sample space S.
P(A B) P(A) P(B) P(A B)
259252256255
252256255
////)(
/)(,/)(,/)(
BAP
BAPBPAP
General Addition Law
14
P(A B) 0
P(A B) P(A) P(B)
Let A and B be two mutually exclusive, events defined in asample space S.
This can be expanded to consider more than two mutually exclusive events.
Example 1: Samples of building materials from three suppliers are
classified for conformance to air-quality specifications.
The results from 100 samples are summarized as follows:
Let A denote the event that a sample is from supplier R, and B denote
the event that a sample conforms to the specifications. If sample is
selected at random, determine the following probabilities: (a) P(A) (b) P(B) (c) P(B’) (d) P(AUB) (e) P(AB) (f) P(AUB’)
15
Conforms
Yes No
SupplierR 30 10
S 22 8
T 25 5
16
Solution
Example 2.
In a residential suburb, 60% of all households subscribe
to the metro newspaper published in a nearby city, 80%
subscribe to the local paper, and 50% of all households
subscribe to both papers. Draw a Venn diagram for this
problem. If a household is selected at random, what is
the probability that it subscribes to:
a) at least one of the two newspapers b) exactly one of the two newspapers
17
18
Solution
19
Example 3
A system consists of two components. The probability that the second component functions satisfactorily is 0.9, the probability that at least one of the two components does so is 0.96, and the probability that both components do so is 0.75. What is the probability that
a) the first component functions satisfactorily?
b) neither the first nor the second component function satisfactorily?
c) the second one functions in a satisfactory manner given that the first component does also?
20
Conditional Probability
A jar contains 5 red sweets and 3 blue sweets. Two sweets are drawn at random without replacement. Draw a tree diagram for the problem.
21
Conditional Probability
Let A and B be two events defined in a sample space S. The conditional probability of A, given that B has already
occurred, is denoted as P ( A | B) or P ( A / B ). Important note: a common mistake is to assume that the “/”
indicates division. It does not indicate this. It denotes “given”. The probability of A “given “ B.
Likewise, , P(A) > 0
( )( | )
( )
P A BP A B
P B
With the condition that P(B) > 0
( )( | )
( )
P A BP B A
P A
22
Example 5:
Sarah goes to work either by one of two routes, A or B. The probability of going by route A is 30%. If she goes by route A, the probability of being late for work is 5% and if she goes by route B, the probability of being late is 10%.
a)Find the probability that she is late for work
b)Given that Sarah is late for work, find the probability that she went via route A.
23
Example 3 ( revisit)
A system consists of two components. The probability that the second component functions satisfactorily is 0.9, the probability that at least one of the two components does so is 0.96, and the probability that both components do so is 0.75. What is the probability that
a) the first component functions satisfactorily?
b) neither the first nor the second component function satisfactorily?
c) the second one functions in a satisfactory manner given that the first component does also?
Example 4: Disks of polycarbonate plastic from a supplier are analyzed for scratch
and shock resistance. The results from 100 disks are given as:
Let A denote the event that a disk has high shock resistance and B denote
the event that a disk has high scratch resistance. If sample is
selected at random, determine the following probabilities:
(a) P(A) (b) P(B) (c) P(A|B) (d) P(B|A)
(d ) Are events A and B independent?24
Shock resistance
high low
Scratch resistance
high 70 10
low 16 4
25
Independent Events
A jar contains 5 red sweets and 3 blue sweets. Two sweets are drawn at random with replacement. Draw a tree diagram for the problem
26
Independent Events
Two events A and B are independent if
Example: - Roll a fair die, consider - Event A = { 2,4,6} - Event B = { 4,5, 6} - Are events A and B independent?
)()|( APBAP
P(A) = 1/2
P(A|B) = 2/3
27
Multiplicative Law of Probability and Independence
( ) ( ). ( )P A B P A P B
( ) ( | ). ( )P A B P A B P B For two events A and B
Definition: Events A and B are independent if and only if
If events A1, .., Ak are independent then,
1 2 1 2( ... ) ( ) ( ) ( )k kP A A A P A P A P A
28
Example 5
Ali and Kamil are sometimes late for class.
Let A = the event that Ali is late for class and K = the event that Kamil is late for class
Given that P(A) = 0.25 , P( A and K) = 0.15 and P ( A’ and K’) = 0.7
On a randomly selected day, find the probability that
a)At least one of Ali or Kamil are late for class
b)Kamil is late for class
29
c) Given that Ali is late for class, find the probability that Kamil is late
The professor suspects that Ali being late for class and Kamil being late for class are linked in some way.
d)Determine whether or not A and K are statistically independent
e)Based on your results in part (d), comment on the professor’s suspicion
30
The Law of Total Probability
31
The Law of Total Probability
Suppose B1, B2 ,…, Bn are mutually exclusive and exhaustive in S, then for any event A
1 1
( ) ( ) ( | ) ( )n n
i i ii i
P A P A B P A B P B
B1
SA
A∩ B1
A∩ B3A∩ B4A∩ B2
B1 B2B3
B4
32
Bayes’ Theorem
33
Bayes’ Theorem
Suppose B1, B2,…, Bn are mutually exclusive and exhaustive (whose union is S). Let A be an event such that P(A) > 0. Then for any event Bj , j =1, 2, …, n,
)(
)()|()|(
AP
BPBAPABP kk
k
n
iii
kkk
BPBAP
BPBAPABP
1
)()|(
)()|()|(
34
Example 1.
A store stocks light bulbs from three suppliers. Suppliers A, B, and C supply 10%, 20%, and 70% of the bulbs respectively. It has been determined that company A’s bulbs are 1% defective while company B’s are 3% defective and company C’s are 4% defective. If a bulb is selected at random and found to be defective, what is the probability that it came from supplier B?
Solution
35
Example 2. A particular city has three airports. Airport A handles 50% of all airline traffic, while airports B and C handle 30% and 20%, respectively. The rates of losing a baggage in airport A, B and C are 0.3, 0.15 and 0.4 respectively.
If a passenger arrives in the city and losses a baggage, what is the probability that the passenger arrives at airport B?
What is the probability that a customer loses a baggage and at airport C
36
Example 3: In a certain assembly plant, three machines, B1, B2, B3, make 30%, 45% and 25%, respectively, of the products. It is known from past experience that 2%,3% and 2% of the products made by each machine, respectively, are defective. Now, suppose that a finished product is randomly selected. What is the probability that it is defective?Solution:
If a product was chosen randomly and found to be defective, what is the probability that it was made by machine B3?