Lecture03 Probability Review
Lecture03 Probability Review
05 March 2010
Goals of today
2
Topics
3
Probability Review
Fundamentals
6
Complementary Event
7
Joint Probability
Joint Probability (A ∩ B)
The probability of two events in conjunction. It is the probability of both events together.
p A B p A p B p A B
Independent Events
Two events A and B are independent if
p A B p A p B
8
Example on Independence
E1: Drawing Ball 1 P(E1): 1/3
E2: Drawing Ball 2 P(E2):1/3 p A B p A p B
E3: Drawing Ball 3 P(E3): 1/3
pB PA
10
Example on Independence
E1: Drawing Ball 1 P(E1): 1/3 p A B
E2: Drawing Ball 2 P(E2):1/3 pA |B
E3: Drawing Ball 3 P(E3): 1/3 pB
Case 1: Drawing with replacement of the ball
1 2
The second draw is independent of the first draw
3
1 1 1
p E 1| E 2 p E 1| E 2
p E 1 E 2 3 3 1
3 p E 2 1 3
3
Case 2: Drawing without replacement of the ball
The second draw is dependent on the first draw
1 1 1
p E 1| E 2 p E 1| E 2
p E 1 E 2 3 2 1
2 p E 2 1 2
3
11
Baye’s Rule
We know that
p A B p B A
Using Conditional Probability definition, we have
p A | B P B p B | A P A
13
Law of Total Probability
Event A {3}
Administrative issues
Groups Formation (mandatory to do it this week)
A random variable
X : S
Ei x i
Event Value
18
A random variable: Examples.
19
Random Variable Types
► Discrete Random Variable:
► possible values are discrete (countable sample space,
Integer values)
X : {1, 2,3, 4,...}
Ei x i
► Continuous Random Variable:
► possible values are continuous (uncountable space, Real
X : 1.4,32.3
values)
Ei x i
20
Discrete Random Variable
The probability distribution for discrete random variable
is called Probability Mass Function (PMF).
p xi P X xi
Properties of PMF
0 p xi 1 and pxi
i 1
Cumulative Distribution Function (CDF)
p X x x x
p (x i )
i
n
Mean value
X E X x
i 1
i p xi
21
Discrete Random Variable
Mean (Expected) value
n
X E X x
i 1
i p xi
Variance
V X X2 E X E X
2
E X
2
E X 2
General Equation
n
V X x i x pxi
2
i 1 For Discrete RV
2
n n
V X xi p xi xi pxi
2
i 1 i 1
22
Discrete Random Variable: Example
Random Variable: Grades of the students
Student ID 1 2 3 4 5 6 7 8 9 10
Grade 3 2 3 1 2 3 1 3 2 2
23
Discrete Random Variable: Example
Random Variable: Grades of the students
Student ID 1 2 3 4 5 6 7 8 9 10
Grade 3 2 3 1 2 3 1 3 2 2
px
i
i p 1 p 2 p 3 1
p X 3 x 2
p (x i ) p 1 p 2 p 3 1
i
24
Discrete Random Variable: Example
Random Variable: Grades of the students
Student ID 1 2 3 4 5 6 7 8 9 10
Grade 3 2 3 1 2 3 1 3 2 2
x p x
i
i i 1 0.2 2 0.4 3 0.4 2.2
Grade
i
2.2
10
25
Continuous Random Variable
The probability distribution for continuous random
variable is called Probability Density Function (PDF).
f x
The probability of a given value is always 0 p x x i 0
The sample space is infinite
For continuous random variable, we compute p a x b
Properties of PDF
1. f ( x) 0 , for all x in R X
2. f ( x)dx 1
RX
3. f ( x) 0, if x is not in RX
26
Continuous Random Variable
Cumulative Distribution Function (CDF)
p X x x x
p (x i )
i
x
p X x f t dt 0
Mean/Expected value b
p a X b f x dx
a
X E X
x f x dx
Variance
V X x f x dx
V X x 2 f x dx
2
x and x2
27
Discrete versus Continuous Random Variables
Discrete Random Variable Continuous Random Variable
3. f ( x) 0, if x is not in RX
p X x x
x
x
p (x i ) p X x f t dt 0
i
b
p a X b f x dx
a
28
Continuous Random Variables: Example
1 x
Exponential Distribution exp , x 0
f (x )
Exp (µ) 0,
otherwise
29
Continuous Random Variables: Example
1 x / 2
e , x0
f ( x) 2
0, otherwise
time
30
Continuous Random Variables: Example
Probability that the customer waits exactly 3 minutes is:
1 3 x /2
P (x 3) P (3 x 3) 3 e dx 0
2
Probability that the customer waits between 2 and 3 minutes is:
1 3 x /2
P (2 x 3) e dx 0.145
2 2
P(2 X 3) F (3) F (2) (1 e ( 3 / 2 ) ) (1 e 1 ) 0.145 CDF
31
Continuous Random Variables: Example
E (X )
1
xe x /2
dx xe x /2
e x / 2dx 2
2 0
0
0
Hence, the variance and standard deviation of the device’s life are:
V ( X ) 8 22 4
V (X ) 2
32
Two Minutes Break
Administrative issues
Groups Formation (mandatory to do it this week)
Variance
X 2
X V X s
34
Coefficient of Variation
V X X
CV X
E X X
35
End of lecture
There are some additional slides afterwards that may help to
explain some concepts
Discrete Probability Distribution
37
Probability Mass Function (PMF)
Formally
the probability distribution or probability mass function
(PMF) of a discrete random variable X is a function that
gives the probability p(xi) that the random variable equals xi,
for each value xi:
p xi P X xi
It satisfies the following conditions:
0 p xi 1
px
i
i 1
38
Continuous Random Variable
39
Probability Density Function (PDF)
For the case of continuous variables, we do not want to ask
what the probability of "1/6" is, because the answer is always
0...
Rather, we ask what is the probability that the value is in the
interval (a,b).
So for continuous variables, we care about the derivative of the
distribution function at a point (that's the derivative of an
integral). This is called a probability density function (PDF).
The probability that a random variable has a value in a set A is
the integral of the p.d.f. over that set A.
40
Probability Density Function (PDF)
The Probability Density Function (PDF) of a continuous
random variable is a function that can be integrated to obtain
the probability that the random variable takes a value in a
given interval.
More formally, the probability density function, f(x), of a
continuous random variable X is the derivative of the
cumulative distribution function F(x):
d
f x Fx
dx
Since F(x)=P(X≤x), it follows that:
b
F b F a P a X b f x dx
a
41
Cumulative Distribution Function (CDF)
x ,
Fx PX x
42
Cumulative Distribution Function (CDF)
Fx PX x P (X
x i x
xi ) p (x
x i x
i )
F a F b P a X b f x dx
a
43
Cumulative Distribution Function (CDF)
► Example
► Discrete case: Suppose a random variable X has the following
probability mass function p(xi):
xi 0 1 2 3 4 5
p(xi) 1/32 5/32 10/32 10/32 5/32 1/32
44
Mean or Expected Value
n
X E X x
i 1
i p xi
X E X
x f x dx
45
Example: Mean and variance
46
Variance
47
Variance
The Variance of the random variable X is defined as:
V X 2
X E X E X
2
E X E X
2 2
X X2 V X s
48