Beruflich Dokumente
Kultur Dokumente
“Probability”
The lecture slides are largely based on the teaching materials provided by
Dr. Tim Ko.
Probability —1—
City University of Hong Kong Dept of Electrical Engineering
Managing Uncertainty
• Most life decisions are made under uncertainty.
• Approximate Solution:
The inaccuracy of the test is 0.01, assume all inaccuracy show up as
false positive (tested positive but no cancer). We ignore the false
negatives (tested negative but have cancer) because their occurrences
are negligible.
Probability —2—
City University of Hong Kong Dept of Electrical Engineering
• If a patient has been tested positive, what is the probability that the
patient has cancer (true positive)?
= proportion of people who have cancer / all positive
= 0.001/0.011 = 0.091, < 10%.
Probability —3—
City University of Hong Kong Dept of Electrical Engineering
Contents
• Events, Sample Space, and Random Variables (RVs)
• Moments
• Relationships
– between exponential and geometric
– between binomial and Poisson
– between Poisson and exponential
– between binomial, Poisson and normal
Probability —4—
City University of Hong Kong Dept of Electrical Engineering
Probability —5—
City University of Hong Kong Dept of Electrical Engineering
Probability —6—
City University of Hong Kong Dept of Electrical Engineering
Probability —7—
City University of Hong Kong Dept of Electrical Engineering
Probability —8—
City University of Hong Kong Dept of Electrical Engineering
P (A ∩ B)
P (A | B) = . (1)
P (B)
• Since P (A | B)P (B) = P (A ∩ B) = P (B | A)P (A),
P (B | A)P (A)
P (A | B) = . (2)
P (B)
P (A | B)P (B)
P (B | A) = . (3)
P (A)
• Now if events A and B are independent (special case), which means
Probability —9—
City University of Hong Kong Dept of Electrical Engineering
that if one of them occurs, the probability of the other to occur is not
affected,
P (A ∩ B) = P (A)P (B).
P (A | B) = P (A); P (B | A) = P (B)
Probability —10—
City University of Hong Kong Dept of Electrical Engineering
FX (x) = P (X ≤ x).
Probability —11—
City University of Hong Kong Dept of Electrical Engineering
Probability —12—
City University of Hong Kong Dept of Electrical Engineering
∑
b
Probability —13—
City University of Hong Kong Dept of Electrical Engineering
Probability —14—
City University of Hong Kong Dept of Electrical Engineering
Moments
• For discrete random variable (RV), 1st moment, average or mean:
E(X) = X = x1 P {X = x1 } + .. + xn P {X = xn }
∑
n
= xi P {X = xi }
i=1
Probability —15—
City University of Hong Kong Dept of Electrical Engineering
where m = E(X)
√
• Standard Deviation: σX = V ar(X)
Probability —16—
City University of Hong Kong Dept of Electrical Engineering
• If a is a constant:
Probability —17—
City University of Hong Kong Dept of Electrical Engineering
Probability —18—
City University of Hong Kong Dept of Electrical Engineering
Probability —19—
City University of Hong Kong Dept of Electrical Engineering
• Success = 1, P (Success) = p
• Failure = 0, P (F ailure) = 1 − p
E[X] = p
V ar[X] = p(1 − p)
Probability —20—
City University of Hong Kong Dept of Electrical Engineering
Geometric Distribution
• The geometric random variable X represents the number of
independent Bernoulli trials (each of which with p being the
probability of success) that are required until the first success.
• For X to be equal to i we must have i − 1 consecutive failures and
then one success in i independent Bernoulli trials.
• The probability function is
P (X = i) = (1 − p)i−1 p for i = 1, 2, 3, . . . .
Probability —21—
City University of Hong Kong Dept of Electrical Engineering
independent Bernoulli trials, and the fact that we had m failures does
not affect the probability that the next n trials will be failures or not.
Probability —22—
City University of Hong Kong Dept of Electrical Engineering
Binomial Distribution
• Binomial – the number of successes in S independent Bernoulli trials.
r )p (1 − p)
P (X = r) = (S r S−r
r = 0, 1, 2, .., S
Probability —23—
City University of Hong Kong Dept of Electrical Engineering
E[X] = Sp
Probability —24—
City University of Hong Kong Dept of Electrical Engineering
Probability —25—
City University of Hong Kong Dept of Electrical Engineering
Probability —26—
City University of Hong Kong Dept of Electrical Engineering
E[X] = 1/µ,
Probability —27—
City University of Hong Kong Dept of Electrical Engineering
Scaling
∫ b
1
P (a ≤ r ≤ b) = µ e−µr dr = µ( )[e−µr ]ba = −[e−µr ]ba
a
−µ
1
P (60 ≤ r ≤ 61) = −[e− 180 r ]61
60 = 0.003970
Probability —28—
City University of Hong Kong Dept of Electrical Engineering
Probability —29—
City University of Hong Kong Dept of Electrical Engineering
or
e−λnδ = (1 − p)n , n = 1, 2, 3, . . . ,
e−λδ = 1 − p.
Thus,
− ln(1 − p)
δ= and p = 1 − e−λδ .
λ
• We can see that as the interval size δ approaches zero the probability
of success p also approaches zero; and under these conditions the two
distributions equal to each other.
Probability —30—
City University of Hong Kong Dept of Electrical Engineering
Poisson Process
• Example: An experiment generate a random variable X representing
the number of telephone calls per minute received by a switch (or
number of outcomes occurring in a given time interval). This is a
Poisson process if it has the following properties:
1. The number of outcomes occurring in one time interval is independent
of the num that occurs in any other disjoint time interval –
memoryless.
2. The prob that a single outcome will occur during a very short time
interval is proportional to the length of the time interval; and does not
depend on the num of outcomes occurring outside this time interval.
3. The prob that more than one outcome will occur in such a short time
interval is negligible.
• In this case, the number of X telephone calls received is a Poisson RV,
and its prob distribution is the Poisson distribution.
Probability —31—
City University of Hong Kong Dept of Electrical Engineering
Poisson Distribution
• Poisson Distribution:
λr −λ
P (X = r) = e r = 0, 1, 2, ..
r!
• Derive the mean and variance of Poisson random variable to obtain
E[X] = λ, V ar[X] = λ.
Probability —32—
City University of Hong Kong Dept of Electrical Engineering
Proof:
We write:
( )
n k
lim P (Xn = k) = lim p (1 − p)n−k .
n→∞ n→∞ k
Probability —33—
City University of Hong Kong Dept of Electrical Engineering
or
( k
)( )n ( )−k
n! λ λ λ
lim P (Xn = k) = lim 1− 1− .
n→∞ n→∞ (n − k)!nk k! n n
n!
lim = 1.
n→∞ (n − k)!nk
Therefore,
λk e−λ
P (Y = k) = lim P (Xn = k) = .
n→∞ k!
• We have proved that the Poisson random variable accurately
approximates the binomial random variable in case when n is very
large and p is very small so that np is not too large and not too small.
Probability —34—
City University of Hong Kong Dept of Electrical Engineering
Probability —35—
City University of Hong Kong Dept of Electrical Engineering
• F (τ ) = P (T ≤ τ ) = 1 − e−λτ
• pdf of the call interarrival time (τ ) is then given by
dF (τ ) 1
f (τ ) = = λe−λτ ; E(τ ) =
dτ λ
• Poisson arrival process ⇔ exponential interarrival time
• Number of negative exponential distributed arrivals in time t
= r arrivals in Poisson distribution during time t
Probability —36—
City University of Hong Kong Dept of Electrical Engineering
Normal Distribution
• RV commonly used in many applications, is the Normal (also called
Gaussian).
• We say that the random variable X has Gaussian distribution with
parameters m and σ 2 if its density is given by
1 −(x−m)2 /2σ 2
fX (x) = √ e − ∞ < x < ∞.
2πσ
• This density is symmetric and bell shaped.
• The wide use of the Gaussian random variable is rooted in the
so-called The central limit theorem.
• This theorem is the most important result in probability theory.
• Loosely speaking, it says that the sum of a large number of
independent random variables (not necessarily of the same
distribution, but each has a finite variance) has Gaussian (normal)
distribution.
Probability —37—
City University of Hong Kong Dept of Electrical Engineering
• This is also true if the distribution of these random variables are very
different from Gaussian.
Probability —38—
City University of Hong Kong Dept of Electrical Engineering
Probability —39—
City University of Hong Kong Dept of Electrical Engineering
Probability —40—
City University of Hong Kong Dept of Electrical Engineering
Probability —41—
City University of Hong Kong Dept of Electrical Engineering
Applications in Simulations
• You want to find an exponentially distributed (f (r) = µe−µr ) random
value from a number generated by a uniformly distributed random
number generator.
Probability —42—