2. • Random Variable (RV):
A random variable is a function that assigns a real number
to each outcome in the sample space of a random
experiment
•
العشوائي المتغير
:
العينة فضاء على معرفه حقيقية قيمة ذات دالة هو
)
(S
Random Variables are denoted by upper case letters (X)
Individual outcomes for an RV are denoted by lower
case letters (x)
Concept of a Random Variable
Dr. Yehya Mesalam 2
3. Types of Random Variables
Number of sales
Number of calls
Shares of stock
People in line
Mistakes per page
• Length
• Depth
• Volume
• Time
• Weight
Random Variables RV
Qualitative RV
Quantitative RV
Discrete RV
Continuous RV Ordinal
Non Ordinal
Can be arranged
•Excellent
•Very Good
•Good
•
Can't be
arranged
Green
Blue
Red
Black
Dr. Yehya Mesalam 3
4. Discrete Probability Distribution
The probability distribution of a discrete
random variable is called a probability
function if
1
)
(
0
)
(
:
Function
(Mass)
y
Probabilit
all
x
x
f
x
x
f
Dr. Yehya Mesalam 4
6. Cumulative Probability Function
• The cumulative probability function, denoted
F(xn), shows the probability that X is less than or
equal to xn
• In other words,
)
x
f(X
)
F(x n
n
n
x
x
n f(x)
)
F(x
x
n dx
f(x)
)
F(x
Dr. Yehya Mesalam 6
7. Example
• Determine the value of K so that each of the
following functions can serve as a probability
distribution of the discrete random variable X:
Otherwise
0
3;
2,
1,
0,
X
for
)
4
(
)
(
2
X
K
x
f
X 0 1 2 3 Sum
f(x) 4k 5K 8K 13K 30K
Solution:
30K=1 , then K=1/30
3.;
2,
1,
0,
X
for
30
)
4
(
)
(
2
X
x
f
Dr. Yehya Mesalam 7
8. Example
• 1. Find the constant a
• 2. Find the probability
elsewhere
0
3
X
2
3a
aX
-
2
X
1
a
1
X
0
)
(
aX
x
f
Solution:
1
)
3
(
1
)
(
)
(
)
(
3
2
2
1
1
0
3
2
2
1
1
0
dx
a
ax
dx
a
dx
ax
dx
x
f
dx
x
f
dx
x
f
Dr. Yehya Mesalam 8
10. Example
• Required:
(a) P(x=4) (b)
(c) (d) P(x>-6)
otherwise
0
4
3,
2,
1,
0,
x
25
1
2
)
(
x
x
f
)
4
2
(
x
P
)
1
(
x
P
Solution:
x 0 1 2 3 4 sum
f(x) 0.04 0.12 0.2 0.28 0.36 1
Cumulative F(x) 0.04 0.16 0.36 0.64 1
(a) P(x=4)=0.36
or P(x=4) = F(4) – F(3) = 1- 0.64 = 0.36
Dr. Yehya Mesalam 10
11. Solution:
0.2+0.28+0.36=0.84
or = F(4) – F( 1) = 1 – 0.16 = 0.84
)
4
(
)
3
(
)
2
(
)
4
2
(
)
( p
p
p
x
P
b
16
.
0
)
1
(
)
(
x
P
c
(d) P(x>- 6) =1
Dr. Yehya Mesalam 11
12. Example
The probability mass function of the random variable X is given
as
Find the distribution function F(x) and graph this distribution
function.
Solution:
3
2
1
x
1/6
1/3
1/2
f(x)
3
3
2
2
1
1
1
6
5
2
1
0
x
x
x
x
x
F
Graph of F(x) (step function)
Dr. Yehya Mesalam 12
22. Example
Two ballpoint pens are selected at random from a box that
contains 3 blue pens, 2 red pens, and 3 green pens. If X is
the number of blue pens selected and Y is the number of
red pens selected, find
(a) the joint probability function f(x, y),
(b) P[(X, Y ) ∈ A], where A is the region {(x, y)|x + y ≤ 1}.
Dr. Yehya Mesalam 22
23. solution
X (blue) Y (red)
0 0
0 1
1 0
1 1
2 0
0 2
The
possible
pairs
of
values
Dr. Yehya Mesalam 23
24. solution
• f(0,0) = this represent the probability of getting
0 blue and 0 red means the two ballpoint pens
are green can be selected by 3 ways
• f(0,0 ) = 3/28
• The denominator (28) represents the number
of ways of selecting two ballpoint pens from
eight ballpoint pens
• f(0,1) = 0 blue, 1 red and 1 green (2*3 = 6)
• f(0,1 ) = 6/28
Dr. Yehya Mesalam 24
27. Solution
(b) The probability that (X, Y ) fall in the region A
is
P[(X, Y ) ∈ A] = P(X + Y ≤ 1) =
f(0, 0) + f(0, 1) + f(1, 0)
Dr. Yehya Mesalam 27
28. Example
Verify the following function is probability function, then
find
P[(X, Y ) ∈ A],
where A = {(x, y) | 0 < x < 0.25, 0.25< y < 0.5}.
Dr. Yehya Mesalam 28