Lecture - 2
Lecture - 2
Lecture - 2
1
Sample Space
❖ Example event: all outcomes in throwing of 3 dice in which the total shown is at least 17
3
Probability
❖ To each event , we assign a real number called its probability, P(e)
❖ Axioms of probability:
❖ For each
❖ Examples:
❖ Cast of a single die: P(each face)=1/6
❖ Same die, different events: ?
4
Conditional Probability
5
Conditional Probability and Independence
❖ In general:
❖ In the previous example: because event and are not independent
❖ In order for to happen must happen
6
Random Variables (RV)
❖ When we perform experiments, we are sometimes primarily concerned about a numerical quantity.
❖ Essentially a function defined on sample space
❖ i.e. Sum of the 3 dice tosses
❖ We call such quantities random variables
❖ We need random variables for simulations, e.g.
❖ Inter-arrival times for costumers/orders/vehicles
❖ Service times for customers
❖ Repair times for machines
❖ Assume their distributions, then generate them on demand
7
Discrete RVs
❖ A random variable that can take either a finite, or at most, a countable number of possible values
is said to be a discrete random variable.
❖ Number of customers arriving to a shop in a day
❖ Probability mass function, p(x) is
8
Discrete RVs (Example)
❖ The Industrial Engineering Department has a lab with six computers
reserved for its students.
❖ Let X denote the number of these computers that are in use at a
particular time of day.
❖ Suppose that the probability distribution of X is as given in the
following table; the first row of the table lists the possible X values and
the second row gives the probability of each such value.
9
Discrete RVs (Example)
10
Discrete RVs (Example)
❖ The probability that at least 3 computers are in use?
1
1
Continuous RVs
❖ Continuous Random Variables
❖ X = Time waited at a bus station
❖ Range of X = [0,
❖ Probability density function, f(x) is
❖ What is the probability that the life of the laser device is between 2 and
3 years?
14
Expectation and Variance
❖ The expectation or the mean is a measure of the central tendency of a random variable.
E(X) is given by if
❖ Discrete rv
❖ Continuous rv
❖ The variance V(X) is a measure of spread of the random variable around the mean E(X)
given by
V
15
Expectation (Examples)
16
Bernoulli Distribution
❖ The simplest form of random variable.
Success/Failure
0.7
❖
0.6
❖ Flip coin Heads/Tails 0.5
0.4
P(X=x)
P ( X 1) p 0.3
P ( X 0) 1 p 0.2
E[ X ] p 0.1
0
Var ( X ) p(1 p ) 0 1
X
17
Binomial Distribution
❖ The number of successes in n Bernoulli trials.
Or the sum of n Bernoulli random variables.
0.3
❖
n x
P(X=x)
n x
P ( X x ) p (1 p )
x 0.1
E [ X ] np
0
Var ( X ) np(1 p ) 0 1 2 3 4 5 6 7 8 9 10
X
18
Binomial Example
❖ An airline knows that 5 percent of the people making reservations on a certain flight
will not show up. Consequently their policy is to sell 52 tickets for a flight that can hold
only 50 passengers.
❖ Then p = P(a certain passenger to show up) = .95,
X = The number of passengers show up for the flight,
X ~ Bin(52,.95).
❖ What is the probability that there will be a seat for every passenger who shows up?
19
Binomial Example
20
Geometric Distribution
x 1
P ( X x) p (1 p )
1
E[ X ]
p
(1 p )
Var ( X ) 2
p
21
Geometric Distribution - Example
❖ Starting at a fixed time, we observe the gender of each newborn child at a certain hospital until
a boy (B) is born. Let , assume that successive births are independent, and define the RV X by
of births observed until the first boy is born.
❖ Then also assume p = P(a newborn is Boy) = .49, so
X = the number births until the first Boy,
X ~ Geom(.49).
❖ The probability that 3 births are observed
P(X = 3) =until
(.51)the
2 first
(.49) 1 boy?
= .127
P(X=x)
0.1
Var 0
0 1 2 3 4 5 6 7 8 9 10
X
23
Poisson Example
24
Exponential Distribution
❖ Model times between events 0.5
f(x)
0.2
❖ Cumulative Density:
❖ 0.1
❖ Memoryless
𝑓 ( 𝑋 > 𝑥 + 𝑦 ∨ 𝑋 > 𝑦 )= 𝐹 ( 𝑥)
0
0 2 4 6 8 10
X
25
Exponential Example
❖ Suppose that calls are received at a 24-hour “suicide hotline” according
to a Poisson process with rate λ = 0.5 call per day.
❖ Then the number of days X between successive calls has an exponential
distribution with parameter value 0.5, so the probability that more than
2 days elapse between calls is
P(X > 2) = 1 – P(X 2)
= 1 – (1 - e –(.5)(2)
)
=e–(.5)(2)
=0.368
❖ The expected time between calls is
26
Normal Distribution
❖ The distribution of the average of iid random variables are eventually normal
❖ Distribution of heights 0.45
1
1 x
2
f ( x)
2
2
e 0.3
2 2
f(x)
E[ X ]
0.15
Var ( X ) 2 0
0 2 4 6 8 10
X
27
❖ Left Tail distribution (
𝑃 ( 𝑋 ≤ 𝑥) = 𝑃 𝑍 ≤
𝜎)
𝑥 −𝜇
=𝜑 (
𝑥 −𝜇
𝜎
)
Then
28
Normal Distribution Example
❖ The time that it takes a driver to react to the brake lights on a decelerating
vehicle is critical in helping to avoid rear-end collisions.
❖ The article “Fast-Rise Brake Lamp as a Collision-Prevention Device”
(Ergonomics, 1993: 391–395) suggests
that reaction time for an in-traffic response to a brake signal from standard
brake lights can be modeled with a normal distribution having mean value
1.25 sec and standard
deviation of .46 sec.
29
Normal Distribution Example
❖ What is the probability that reaction time is between 1.00 sec and 1.75 sec? If
we let X denote reaction time, then standardizing gives
1.00 X 1.75
Thus normalizing
30
Triangular Distribution
❖ Used in situations were there is little or no data.
❖ Just requires the minimum (a), maximum(b) and most likely (m)s
value.
2( x a )
f ( x) , axm 0.3
( m a )( b a )
2( b x )
, m xb 0.2
(b m)( b a )
f(x)
0, otherwise 0.1
E [ X ] ( a b) / 2
0
0 1 2 3 4 5 6 7 8 9 10
Var ( X ) (b a ) / 12
2 X
31