Week2 Probability
Week2 Probability
1
Probability Theory
The chance of the occurrence of a random event is
defined as its probability. The basic axiom of the
probability theory states that each random event has a
certain probability that varies in the range of 0 to 1.
Denoting the random variable by a capital letter and
its value in an observation by the corresponding small
letter we can write
P(X = xi ) = pi
2
Probability Theory
P(X = xi ) = pi
X = xi, random event
P, symbol for the probability of the event
pi , the probability of the event X = xi
pi = 0 implies that the event X = xi will never occur
pi =1 means that the event will occur in all
observations.
With the increase of the probability from 0 to 1, the
chance of occurrence of the event also increases, i.e.
the event is seen more frequently.
3
Probability Theory
To throw a dice
As one of these events will certainly occur in each throw, the total probability is given
as:
6
𝑃(𝑋 = 1)
𝑖=1
4
Probability of drawing an “ace”
• What is the probability that a card drawn at random from a deck of cards will be an
ace?
To calculate the probability that sum of two dices will be equal to 5, calculate the number
of outcomes which are equal to 5 and divide by the total number of outcomes (36). Since
four of the outcomes have a total of 5 (1,4; 2,3; 3,2; 4,1), the probability of sum of two
dices are equal to 5 is 4/36 = 1/9 . Similarly, probability of obtaining sum of 12 is computed
by dividing the number of favorable outcomes (there is only one) by the total number of
outcomes (36). The probability is therefore 1/36 .
7
The Probabilities of Compound Events
While the probability of simple events is calculated easily by using the simple
probability rules, the probability of compound events is calculated by using the
theory of set. The same rules of set theory are applied for calculating the
probability of compound events.
Probability theory tells us how the probability of a compound random event can
be computed when the probabilities of (simple or compound) events that
constitute it are known.
8
Elements of Set Theory
9
Set Theory
• Subset:
10
Random Event
The probability of a compound event consisting of two disjoint events is the sum
of their probabilities.
By extending this theorem, we can see that the sum of the probabilities of all
simple events for a random variable is equal to 1 as one of these simple events will
certainly occur in an observation. This type of events are called as mutually
exclusive events.
11
Mutually Exclusive Events
Two events are mutually exclusive if it is not possible for both of
them to occur. For example, if a dice is rolled, the event "getting a
1" and the event "getting a 2" are mutually exclusive since it is not
possible for the dice to be both a 1 and a 2 on the same roll. The
occurrence of one event "excludes" the possibility of the other
event.
The probability of the union of two events that are not disjoint can
easily be computed by the Venn diagram, where each event is
represented by the region inside a closed curve whose area is
assumed to be proportional to the probability of the event.
13
Probability of the union of the events A and B that are not disjoint
14
Non-disjoint events (Not mutually exclusive
events)
• What is the probability that a card selected from a deck will be
either an ace (1) or a spade ()?
The only way in which an ace and a spade can both be drawn is to
draw the ace of spades. There is only one ace of spades, so:
P(ace and spade) = 1/52 .
16
Multiplication rule
17
Multiplication rule
• What is the probability that a fair coin will come up with heads
twice in a row?
Two events must occur: a head on the first toss and a head on the
second toss.
18
Multiplication rule
Since there is only one ace of clubs in the deck, the probability of the
first event is 1/52.
19
Multiplication rule
20
Multiplication rule
21
Complementary Event
22
Complementary Event
• Consider the throwing of a dice and define the probabilities of getting more
than 4 and less than or equal to 4.
P (X>4) = 2/6
P (X4) = 4/6
Getting more than 4 and less than or equal to 4 is the complimentary event of
each other, then
P (X>4) + P (X4) = 1
2/6 + 4/6 = 1
23
Conditional Probability
24
Conditional Probability
25
Conditional Probability
• What is the probability that the total of two dices will be greater than 8 given that the
first dice is 6?
This can be computed by considering outcomes for which the first dice is 6. Then,
determine the proportion of these outcomes which are greater than 8. All the possible
outcomes for two dices are given below:
26
Conditional Probability
There are 6 outcomes for which the first dice is 6, and of these,
there are four possibilities that are more than 8 (6,3; 6,4; 6,5; 6,6).
The probability of sum is greater than 8 given that the first dice is 6
is therefore 4/6 = 2/3.
Event A is that the first card is an ace. Since 4 of the 52 cards are
aces, P (A) = 4/52 = 1/13.
Given that the first card is an ace, what is the probability that the
second card will be an ace as well? Of the 51 remaining cards, 3 of
them are aces.
28
Conditional Probability
• Consider the probability of having İ letter, then T letter and then
Ü letter when you draw them from a box of 29 letters of Turkish
alphabet (Do not replace the letters into the box).
29
Probabilities of Engineering Problems
In engineering problems the previous approach is usually useless
in estimating the probabilities. We must base our estimates on the
frequencies. The frequency of a random event is the ratio of the
number of times it occurs to the total number of observations. If
the event X = xi is observed ni times during N experiments its
frequency is
fi = ni /N
𝑛𝑖
𝑝𝑖 = lim ( )
𝑁→∞ 𝑁
30
Probabilities of Engineering Problems
Although we can never make infinite number of observations, it
can be assumed that fi approaches pi quite rapidly with the
increase of N. If no precipitation has been observed at a station for
ni=900 days along a period of N= 1500 days then the probability of
no precipitation can be estimated as
31
Probabilities of Engineering Problems
• The number of vehicles waiting for a left turn at a cross–section
is observed to vary between 0 and 6, with the following
probabilities:
4 3
𝑃 𝑋=0 = 𝑃 𝑋=4 =
60 60
16 2
𝑃 𝑋=1 = 𝑃 𝑋=5 =
60 60
20 1
𝑃 𝑋=2 = 𝑃 𝑋=6 =
60 60
14
𝑃 𝑋=3 =
60
32
Probabilities of Engineering Problems
There are 7 simple events in the sample space of the random
variable X "the number of vehicles waiting for a left turn", the sum
of their probabilities adding up to 1.
P (X > 3) = P (X = 4) + P (X = 5) + P (X = 6)
= 3 / 60 + 2 / 60 + 1 / 60 = 6/60=1/10
35
36
37
38
Probabilities of Engineering Problems
• One can get to town 2 from town 1 either by the route A or by
the routes B and C through town 3. In winter the probabilities of
the routes being open are P(A)=0.40, P(B)=0.75, P(C)=0.67. These
events are not independent. The probability of the route C to be
open when B is open is given as P(CB)=0.80, the probability of
the route A to be open when both B and C are open is
P(AB∩C)=0.5. Let us determine the probability that one can get
from 1 to 2 in winter.
39
Probabilities of Engineering Problems
The travel between the points 1 and 2 is possible if the route A is
open or both B and C are open. Let us find the probability that both
B and C are open.
40
Probabilities of Engineering Problems
• A structural frame consists of 3 elements with probabilities of
failure P(A)=0.05, P(B)=0.04 , P(C)=0.03. The events of failure of
the elements are assumed to be independent. What is the
probability of failure for the frame? (the frame fails when at least
one of its elements fail)
41
Probabilities of Engineering Problems
Since the events of failure will occur when one of the elements fail,
we must determine the probability of the union of probability of
failure of the elements P(AUBUC).
42
Probabilities of Engineering Problems
43
Probabilities of Engineering Problems
• A frame is hold by two ropes, A and B, with probabilities of
breaking off equal to 0.1 for each rope. The probability that one
of the ropes breaks off when the other does is 0.8. Determine
the probability of failure of the frame. (The frame fails, when
either of the ropes is broken)
44
Probabilities of Engineering Problems
We are looking for the probability P(AUB) where A and B denote the
events of breaking off of the ropes.
From the equation:
45
Bernoulli Trials
• Let us consider an experiment where only two outcomes are possible
(there are only two simple events in the sample space). Suppose one of
the outcomes corresponds (arbitrarily) to "success" and the other to
"failure ". The probability of the success will be denoted by p, and the
probability of the failure by q=1–p. Such an experiment is called a
Bernoulli Trial.
• Let us repeat the experiment n times (independent Bernoulli Trials). Now
consider the random variable X, the number of times of success in n trials.
X is a discrete variable that is an integer in the range of 0 to n. Let us
compute the probability of X = x in n trials. Suppose n=3 (three trials).
46
Bernoulli Trials
• The event of no success (X=0) will occur only when all
the three trials are failures. Since the trials are
considered independent this has the probability:
P(X=0) = qqq = q3
47
Bernoulli Trials
• 2 successes in 3 trials can also occur in three
different ways: first two trials are successful and
the third trial is failure, first and third trials are
successful and the second is failure, second and
third trials are successful and the first is failure.
Each event has the probability p2q and therefore
the probability of 2 successes in 3 events is:
P(X=2) = 3p2q : (ppq)+(pqp)+(qpp)
• Finally the probability of 3 successes in 3 events
is:
P(X=3) = p3
48
Bernoulli Trials
• What is the probability of no sixes in 3 throws in throw of a
dice?
49
Bernoulli Trials
50
Bernoulli Trials
51
Bernoulli Trials
52
Bernoulli Trials
53
Bernoulli Trials
(2.74)
54
Bernoulli Trials
55
Bernoulli Trials
56
Bernoulli Trials
57
Bernoulli Trials
58
Bernoulli Trials
59
Bernoulli Trials
• The probability of larger waves occurring X=0,1,2, and 3 years
in a period of 3 years are calculated by the Bernoulli
distribution:
60