Lecture 4
Lecture 4
Lecture 4
Probability Distributions
Random Variables
A random variable (RV) is a function that associates
( assigns) a real number with each element in the sample
space. i.e. A random variable is a mapping ( function) from the
sample space S to the set of real numbers R
X: S → R
•The range of X is the set of real numbers R, i.e. it may take positive,
negative or zero values
Discrete Random Variables
1) The Probability Density Function:
If a variable X takes a discrete set of values x1, x 2 ,..., x n with
respective probabilitiesnP(x1) , P(x2 ) , …, P(xn) , where
P( x i ) 1
i 1
then the real function i=1,2,…,n, is called the
probability density function (p.d.f) for the random
variable X and satisfies :
f(xi) ≥ 0 .
And we say that a discrete probability distribution for X
has been defined .
f(x)
4
3
Series 1
2
0
0 1 2 3
Graph of P(x)
Example (2): Suppose that X, the score on the uppermost face
of a loaded die has a probability function
P(x) = k x ; x = 1, 2, 3, 4, 5, 6.
(a) Find k,
(b) write P(x) in tabular form, and find the probability that
X ≥ 3.
Solution:
6
(a) Since P( x ) 1
x 1
then,
k + 2k + 3k + … + 6k = 1
so, 21k = 1
then, k =1/21 , x = 1, 2, 3,4,5,6.
Then,
P( x ) x ; x 1, 2, 3, 4, 5, 6
21
X 1 2 3 4 5 6
P(x) = P(X = x) 1/21 2/21 3/2 4/2 5/2 6/21
1 1 1
(b) P(X 3) 3 4 5 6 6
21 21 21 21 7
2- The Cumulative distribution
function ( Distribution function F)
satisfying
•0 ≤ F (x) ≤ 1
•F (x) is non-decreasing
•P(a ≤ X ≤ b) = F (b) – F (a)
•F(-∞)= 0 F(∞ ) = 1
Example (3): Consider a random variable X that is equal to
1, 2, or 3. If we know that : P(1) = ½ and P(2) = 1/3
Then it follows (since P(1) + P(2) +P(3) = 1 ) that
P(3) = 1/6 .
A graph of P(x) is presented in the following figure.
Graph of P(x)
Note that : If X is a discrete random variable whose set of
possible values are x1, x2, x3,… , where x1< x2< x3<… then, its
distribution function F is a step function . That is, the value of
F is a constant in the interval [xi-1, xi) and then takes a step
(or jump) of size f (xi) at xi .
Then the cumulative distribution function F of X is given by
X 1 2 3
P(X = x)=f (x) 1/2 1/3 1/6
F(x) 1 115 1 1 1 1
2 2 3 6 2 3 6
0 x 1
1 1 x 2
2
F( x )
5
6 2 x 3
1 x3
This is graphically presented in the following figure .
Graph of F(x)
3) Mean, Variance & Standard
Deviation: .
Variance
.
•Standard Deviation
Mathematical Expectation
Definition : Let X be a discrete variable with the probability
distribution f(xi) = P (X = xi) , i = 1 , 2 , …, n .
The mean or expected value of X is
n
E ( X ) xi f ( xi )
i 1
Example (3): A shipment of 8 similar microcomputers to a
retail outlet contains 3 that are defective. If a school makes a
random purchase of 2 of these computers,
(a) Find the probability distribution for the number of
defectives.
(b) Find the expected value of the random variable X
Solution: Let X be a random variable whose values x are the
possible numbers of defective computers purchased by the
school. Then x = 0, 1, 2. Now
3 5
0 2 10
(a) P ( 0) P ( X 0)
8 28
2
3 5
1 1 15
P(1) P( X 1)
8 28
2
3 5
2 0
P ( 2) P ( X 2 ) 3
8 28
2
Thus , the probability distribution of X is
X 0 1 2
P(X = x) 10/2 15/28 3/28
8
x -3 -1 1 3 5
f(x) a 2a 4a 3a 2a
→ a+2a+4a+3a+2a =1
12a =1 → a=1/12
x f(x) xf(x) x2f(x)
-3 1/12 -3/12 9/12
-1 2/12 -2/12 2/12
1 4/12 4/12 4/12
3 3/12 9/12 27/12
5 2/12 10/12 50/12
Sum 1 18/12 92/12
Properties of Expectation
1- E(a) = a ; ( a is a constant )
Proof:
E (a ) a P( x ) a P( x ) a.(1) a
x x
Proof:
E(aX) ax P( x ) a xP( x ) a.E(X)
x x
3- E(a X +b) = a E(X) + b ; ( a , b are constants )
Proof:
E (aX b) (ax b) P( x )
x
axP(x) bP(x)
x x
a xP( x ) b P( x )
x x
aE(X) b
2
Example (4): Find E[ X 1] for example (3)
Solution:
2 2 2
E[X 1] E[X 2X 1] E[X ] 2E[X] 1
1- Var(a) = 0 ; ( a is a constant )
Proof:
Var (a ) E (a ) E (a ) a a 0
2 2 2 2
2- Var(a X ) = a2 Var(X) ; ( a is a constant )
Proof:
Find
(a) E(X) (b) E(X2 )
(c) Var(X) (d) E( 2X -1)
(e) Var( 3X +1)
Solution:
(b) E(X 2 ) (0)2 (0.51) (1)2 (0.38) (2)2 (0.10) (3)2 (0.01) 0.87
3 3 3 5
2 1 1 2
P(X 1) 11
165
39
3
P( X 2) P( 2 white and 1 black )
3 5
2 1
P( X 2) 11
15
165
3
P( X 3) P( 3 white )
3
3
P ( X 3) 11
1
165
3
P( X 1) P(1 white and 2 red ) P(1 red and 2 black)
3 3 3 5
1 2 1 2
P( X 1) 11
165
39
3
3
3
P( X 3) 11
165
1
3
X -3 -2 -1 0 1 2 3
E (X 1) 2 E (X 2 2X 1) E (X 2 ) 2E (X) 1
1.31 1 2.31
V (X ) E (X ) E (X ) 1.31
2 2
(iii)
Then we have
2
V(0.5X 1) (0.5) V(X) 1.431 0.33