3 PDF
3 PDF
3 PDF
Outline
1 Random Variables
Outline
1 Random Variables
Definition 1
If S is a sample space with a probability measure and X is a
real-valued function defined over the elements of S, then X is
called a random variable (or stochastic variable).
Random Variables Discrete Probability Distributions Continuous Random Variables
Definition 1
If S is a sample space with a probability measure and X is a
real-valued function defined over the elements of S, then X is
called a random variable (or stochastic variable).
In this course we shall always denote random variables by capital
letters such as X , Y etc., and their values by the corresponding
lowercase letters such as x and y , respectively.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 2
Suppose that a coin is tossed twice so that the sample space is
S = {HH, HT , TH, TT }. Let X represent the number of heads
that can come up.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 2
Suppose that a coin is tossed twice so that the sample space is
S = {HH, HT , TH, TT }. Let X represent the number of heads
that can come up. With each sample point we can associate a
number for X as shown in the table:
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 2
Suppose that a coin is tossed twice so that the sample space is
S = {HH, HT , TH, TT }. Let X represent the number of heads
that can come up. With each sample point we can associate a
number for X as shown in the table:
Sample Point HH HT TH TT
1 1 1 1
Probability 4 4 4 4
x 2 1 1 0
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 2
Suppose that a coin is tossed twice so that the sample space is
S = {HH, HT , TH, TT }. Let X represent the number of heads
that can come up. With each sample point we can associate a
number for X as shown in the table:
Sample Point HH HT TH TT
1 1 1 1
Probability 4 4 4 4
x 2 1 1 0
Example 2
Suppose that a coin is tossed twice so that the sample space is
S = {HH, HT , TH, TT }. Let X represent the number of heads
that can come up. With each sample point we can associate a
number for X as shown in the table:
Sample Point HH HT TH TT
1 1 1 1
Probability 4 4 4 4
x 2 1 1 0
Example 3
Example 3
Example 3
1 4
Thus, we can write P(X = 0) = 16 , P(X = 1) = 16 ,
6 4 1
P(X = 2) = 16 , P(X = 3) = 16 and P(X = 4) = 16 .
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 4
Example 4
Example 4
Outline
1 Random Variables
Definition 5
If X is a discrete random variable, the function given by
f (x) = P(X = x)
Definition 5
If X is a discrete random variable, the function given by
f (x) = P(X = x)
Definition 5
If X is a discrete random variable, the function given by
f (x) = P(X = x)
Definition 5
If X is a discrete random variable, the function given by
f (x) = P(X = x)
Example 7
Find a formula for the probability distribution of the total number
of heads obtained in four tosses of a balanced coin.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 7
Find a formula for the probability distribution of the total number
of heads obtained in four tosses of a balanced coin.
1 4
Solution. We know that P(X = 0) = 16 , P(X = 1) = 16 ,
6 4 1
P(X = 2) = 16 , P(X = 3) = 16 and P(X = 4) = 16 .
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 7
Find a formula for the probability distribution of the total number
of heads obtained in four tosses of a balanced coin.
1 4
Solution. We know that P(X = 0) = 16 , P(X = 1) = 16 ,
6 4 1
P(X = 2) = 16 , P(X = 3) = 16 and P(X = 4) = 16 . Observing
that the numerators of these
4 five
4 fractions,
4 4 1, 4,46, 4, and 1, are
the binomial coefficients 0 , 1 , 2 , 3 , and 4 , we find that
the formula for the probability distribution can be written as
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 7
Find a formula for the probability distribution of the total number
of heads obtained in four tosses of a balanced coin.
1 4
Solution. We know that P(X = 0) = 16 , P(X = 1) = 16 ,
6 4 1
P(X = 2) = 16 , P(X = 3) = 16 and P(X = 4) = 16 . Observing
that the numerators of these
4 five
4 fractions,
4 4 1, 4,46, 4, and 1, are
the binomial coefficients 0 , 1 , 2 , 3 , and 4 , we find that
the formula for the probability distribution can be written as
4
x
f (x) = for x = 0, 1, 2, 3, 4.
16
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 8
Check whether the function given by
x +2
f (x) = for x = 1, 2, 3, 4, 5
25
can serve as the probability distribution of a discrete random
variable.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 8
Check whether the function given by
x +2
f (x) = for x = 1, 2, 3, 4, 5
25
can serve as the probability distribution of a discrete random
variable.
3
Solution. Substituting the different values of x, we get f (1) = 25 ,
4 5 6 7
f (2) = 25 , f (3) = 25 , f (4) = 25 , and f (5) = 25 .
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 8
Check whether the function given by
x +2
f (x) = for x = 1, 2, 3, 4, 5
25
can serve as the probability distribution of a discrete random
variable.
3
Solution. Substituting the different values of x, we get f (1) = 25 ,
4 5 6 7
f (2) = 25 , f (3) = 25 , f (4) = 25 , and f (5) = 25 . Since these
values are all nonnegative, the first condition of Theorem 6 is
satisfied,
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 8
Check whether the function given by
x +2
f (x) = for x = 1, 2, 3, 4, 5
25
can serve as the probability distribution of a discrete random
variable.
3
Solution. Substituting the different values of x, we get f (1) = 25 ,
4 5 6 7
f (2) = 25 , f (3) = 25 , f (4) = 25 , and f (5) = 25 . Since these
values are all nonnegative, the first condition of Theorem 6 is
satisfied, and since
3 4 5 6 7
f (1) + f (2) + f (3) + f (4) + f (5) = + + + + =1
25 25 25 25 25
the second conditions of Theorem 6 is satisfied.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 8
Check whether the function given by
x +2
f (x) = for x = 1, 2, 3, 4, 5
25
can serve as the probability distribution of a discrete random
variable.
3
Solution. Substituting the different values of x, we get f (1) = 25 ,
4 5 6 7
f (2) = 25 , f (3) = 25 , f (4) = 25 , and f (5) = 25 . Since these
values are all nonnegative, the first condition of Theorem 6 is
satisfied, and since
3 4 5 6 7
f (1) + f (2) + f (3) + f (4) + f (5) = + + + + =1
25 25 25 25 25
the second conditions of Theorem 6 is satisfied. Thus, the given
function can serve as the probability distribution of a random
variable having the range {1, 2, 3, 4, 5}.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 9
Suppose that a pair of fair dice are to be tossed, and let the
random variable X denote the sum of the points. Obtain the
probability distribution for X .
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 9
Suppose that a pair of fair dice are to be tossed, and let the
random variable X denote the sum of the points. Obtain the
probability distribution for X .
Second
Die
x 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 5 4 3 2 1
f (x) 36 36 36 36 36 36 36 36 36 36 36
Random Variables Discrete Probability Distributions Continuous Random Variables
Definition 10
If X is a discrete random variable, the function given by
F (x) = P(X ≤ x) = f (t) for − ∞ < x < ∞
t≤x
Example 12
Find the distribution function of the total of heads obtained in four
tosses of a balanced coin.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 12
Find the distribution function of the total of heads obtained in four
tosses of a balanced coin.
1 4 6 4
Solution. Given f (0) = 16 , f (1) = 16 , f (2) = 16 , f (3) = 16 , and
1
f (4) = 16 from Example 3, it follows that
1
F (0) = f (0) = ,
16
5
F (1) = f (0) + f (1) = ,
16
11
F (2) = f (0) + f (1) + f (2) = ,
16
15
F (3) = f (0) + f (1) + f (2) + f (3) = ,
16
F (4) = f (0) + f (1) + f (2) + f (3) + f (4) = 1.
Random Variables Discrete Probability Distributions Continuous Random Variables
Observe that this distribution function is defined not only for the
values taken on by the given random variable, but for all real
5
numbers. For instance, we can write F (1.7) = 16 and F (100) = 1,
although the probabilities of getting at most 1.7 heads or at most
100 heads in four tosses of a balanced coin may not be of any real
significance.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 13
Find the distribution function of the random variable X of Example
4 and plot its graph.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 13
Find the distribution function of the random variable X of Example
4 and plot its graph.
Example 13
Find the distribution function of the random variable X of Example
4 and plot its graph.
Example 13
Find the distribution function of the random variable X of Example
4 and plot its graph.
F (x)
36/56
6/56
x
0 1 2
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 14
Find the distribution function of the random variable that has the
probability distribution
x
f (x) = for x = 1, 2, 3, 4, 5.
15
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 14
Find the distribution function of the random variable that has the
probability distribution
x
f (x) = for x = 1, 2, 3, 4, 5.
15
1 2 3 4
Solution. Since f (1) = 15 , f (2) = 15 , f (3) = 15 , f (4) = 15 , and
5
f (5) = 15 , then
⎧
⎪
⎪ 0 for x < 1,
⎪
⎪
⎪
⎪ 1
1 ≤ x < 2,
⎪
⎪ for
⎪
⎨3
15
15 for 2 ≤ x < 3,
F (x) =
⎪
⎪
6
for 3 ≤ x < 4,
⎪
⎪ 15
⎪ 10
⎪ 4 ≤ x < 5,
⎪
⎪ for
⎪
⎩1
15
for x ≥5
Random Variables Discrete Probability Distributions Continuous Random Variables
Theorem 15
If the range of a random variable X consists of the values
x1 < x2 < x3 < · · · < xn , then f (x1 ) = F (x1 ) and
Example 16
If X has the distribution function F (1) = 0.25, F (2) = 0.61,
F (3) = 0.83, and F (4) = 1 for x = 1, 2, 3, 4, find the probability
distribution of X .
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 16
If X has the distribution function F (1) = 0.25, F (2) = 0.61,
F (3) = 0.83, and F (4) = 1 for x = 1, 2, 3, 4, find the probability
distribution of X .
Solution. We have
f (1) = F (1) = 0.25,
f (2) = F (2) − F (1) = 0.61 − 0.25 = 0.36,
f (3) = F (3) − F (2) = 0.83 − 0.61 = 0.22,
f (4) = F (4) − F (3) = 1 − 0.83 = 0.17.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 17
If X has the distribution function
⎧
⎪
⎪ 0 for x < −1,
⎪
⎪
⎪
⎪ 1
− 1 ≤ x < 1,
⎨ 4 for
F (x) = 12 for 1 ≤ x < 3,
⎪
⎪
⎪ 3 for
⎪ 3 ≤ x < 5,
⎪
⎪ 4
⎩
1 for x ≥ 5.
find
1 P(X ≤ 3), P(X = 3), P(X < 3);
2 P(X ≥ 1);
3 P(−0.4 < X < 4);
4 P(X = 5);
5 the probability distribution of X .
Random Variables Discrete Probability Distributions Continuous Random Variables
⎧
⎪
⎪0 for x < −1,
⎪
⎪
⎪
⎪ 1
for − 1 ≤ x < 1,
⎨4
F (x) = 1
for 1 ≤ x < 3,
⎪
⎪
2
⎪
⎪ 3
for 3 ≤ x < 5,
⎪
⎪ 4
⎩
1 for x ≥ 5.
Solution.
1
3
P(X ≤ 3) =
4
3 1 1
P(X = 3) = − =
4 2 4
1
P(X < 3) =
2
Random Variables Discrete Probability Distributions Continuous Random Variables
⎧
⎪
⎪0 for x < −1,
⎪
⎪
⎪
⎪ 1
for − 1 ≤ x < 1,
⎨4
F (x) = 1
for 1 ≤ x < 3,
⎪
⎪
2
⎪
⎪ 3
for 3 ≤ x < 5,
⎪
⎪ 4
⎩
1 for x ≥ 5.
⎧
⎪
⎪0 for x < −1,
⎪
⎪
⎪
⎪ 1
for − 1 ≤ x < 1,
⎨4
F (x) = 1
for 1 ≤ x < 3,
⎪
⎪
2
⎪
⎪ 3
for 3 ≤ x < 5,
⎪
⎪ 4
⎩
1 for x ≥ 5.
⎧
⎪
⎪0 for x < −1,
⎪
⎪
⎪
⎪ 1
for − 1 ≤ x < 1,
⎨4
F (x) = 1
for 1 ≤ x < 3,
⎪
⎪
2
⎪
⎪ 3
for 3 ≤ x < 5,
⎪
⎪ 4
⎩
1 for x ≥ 5.
⎧
⎪
⎪0 for x < −1,
⎪
⎪
⎪
⎪ 1
for − 1 ≤ x < 1,
⎨4
F (x) = 1
for 1 ≤ x < 3,
⎪
⎪
2
⎪
⎪ 3
for 3 ≤ x < 5,
⎪
⎪ 4
⎩
1 for x ≥ 5.
4 P(X = 5) = 1 − 34 = 14 .
5 f (−1) = 14 , f (1) = 12 − 14 = 14 , f (3) = 3
4 − 1
2 = 14 ,
f (5) = 1 − 34 = 14 , and 0 elsewhere.
Random Variables Discrete Probability Distributions Continuous Random Variables
Outline
1 Random Variables
f (x)
x
a b
f (x)
x
a b
Theorem 20
If X is a continuous random variable and a and b are real
constants with a ≤ b, then
Example 22
The probability density of the continuous random variable X is
given by
1
for 2 < x < 7,
f (x) = 5
0 elsewhere.
1 Draw its graph and verify that the total area under the curve
(above the x-axis) is equal to 1.
2 Find P(3 < X < 5).
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 22
The probability density of the continuous random variable X is
given by
1
for 2 < x < 7,
f (x) = 5
0 elsewhere.
1 Draw its graph and verify that the total area under the curve
(above the x-axis) is equal to 1.
2 Find P(3 < X < 5).
Solution.
f (x)
1
5
x
2 7
Random Variables Discrete Probability Distributions Continuous Random Variables
1
5 for 2 < x < 7,
f (x) =
0 elsewhere.
1
5 for 2 < x < 7,
f (x) =
0 elsewhere.
5 5
1 1 5 1
P(3 < X < 5) = f (x)dx = dx = x = (5 − 3)
3 3 5 5 3 5
2
= .
5
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 23
The pdf of the random variable X is given by
√c
x
for 0 < x < 4,
f (x) =
0 elsewhere.
Find
1 the value of c,
2 P(X < 0.25) and P(X > 1).
Random Variables Discrete Probability Distributions Continuous Random Variables
√c
x
for 0 < x < 4,
f (x) =
0 elsewhere.
Solution.
1 To satisfy the second condition of Theorem 21, we must have
∞
0
4
∞
f (x)dx = f (x) dx + f (x) dx + f (x) dx
−∞ −∞
0
4
0 √c 0
x
4 4
4 − 12 +1
c x
cx − 2 dx = c 1
1
= √ dx =
0 x 0 −2 + 1
0
√
= 2c x|40 = 4c = 1
1
√
4 x
for 0 < x < 4,
f (x) =
0 elsewhere.
0.25
0
0.25
P(X < 0.25) = f (x)dx = f (x) dx + f (x) dx
−∞ −∞
0
0 1
√
4 x
0.25
1 1 √ 0.25 1 √
= √ dx = 2 x = ( 0.25 − 0)
0 4 x 4 0 2
1
= .
4
Random Variables Discrete Probability Distributions Continuous Random Variables
1
√
4 x
for 0 < x < 4,
f (x) =
0 elsewhere.
∞
4
∞
P(X < 1) = f (x)dx = f (x) dx + f (x) dx
1 1
4
1
√ 0
4 x
4
1 1 √ 4 1
= √ dx = 2 x = (2 − 1)
1 4 x 4 1 2
1
= .
2
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 24
Example 24
t
∞ ∞
−3x e −3x
f (x)dx = ke dx = k lim
−∞ 0 t→∞ −3
0
k k k
= − lim (e −3t − e 0 ) = − (0 − 1) = = 1
3 t→∞ 3 3
and it follows that k = 3.
Random Variables Discrete Probability Distributions Continuous Random Variables
3e −3x for x > 0,
f (x) =
0 elsewhere,
Definition 25
If X is a continuous random variable and the value of its
probability density at t is f (t), then the function given by
x
F (x) = P(X ≤ x) = f (t)dt for − ∞ < x < ∞
−∞
Definition 25
If X is a continuous random variable and the value of its
probability density at t is f (t), then the function given by
x
F (x) = P(X ≤ x) = f (t)dt for − ∞ < x < ∞
−∞
Theorem 26
If f (x) and F (x) are the values of the probability density and the
distribution function of X at x, then
dF (x)
f (x) =
dx
where the derivative exists.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 27
Find the distribution function of the random variable X of Example
24, and use it to reevaluate P(0.5 ≤ x ≤ 1).
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 27
Find the distribution function of the random variable X of Example
24, and use it to reevaluate P(0.5 ≤ x ≤ 1).
0 for x ≤ 0,
F (x) =
1 − e −3x for x > 0.
Example 28
Find the distribution function of the random variable X whose
probability density is given by
⎧
⎪
⎨x for 0 < x < 1,
f (x) = 2 − x for 1 ≤ x < 2,
⎪
⎩
0 elsewhere.
Random Variables Discrete Probability Distributions Continuous Random Variables
⎧
⎪
⎨x for 0 < x < 1,
f (x) = 2 − x for 1 ≤ x < 2,
⎪
⎩
0 elsewhere.
for 1 ≤ x < 2,
x
1
x
1
x
F (x) = f (t)dt = f (t)dt + f (t)dt = tdt + (2 − t)dt
−∞ 0 1 0 1
x
t
2 1 t2 1 x2 1 x2
= + 2t − = + 2x − − 2 + = − + 2x − 1,
2 0 2 1 2 2 2 2
So, we have
⎧
⎪
⎪0 for x ≤ 0,
⎪
⎪
⎨ x2 for 0 < x < 1,
F (x) = 2
⎪
2
⎪
⎪− x2 + 2x − 1 for 1 ≤ x < 2,
⎪
⎩1 for x ≥ 2.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 29
Find a probability density function for the random variable whose
distribution function is given by
⎧
⎪
⎨0 for x ≤ 0,
F (x) = x for 0 < x < 1,
⎪
⎩
1 for x ≥ 1.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 29
Find a probability density function for the random variable whose
distribution function is given by
⎧
⎪
⎨0 for x ≤ 0,
F (x) = x for 0 < x < 1,
⎪
⎩
1 for x ≥ 1.
Example 29
Find a probability density function for the random variable whose
distribution function is given by
⎧
⎪
⎨0 for x ≤ 0,
F (x) = x for 0 < x < 1,
⎪
⎩
1 for x ≥ 1.
Example 30
The distribution function of the random variable Y is given by
1 − y92 for y > 3,
F (y ) =
0 elsewhere.
Solution.
P(Y ≤ 5) = F (5) = 1 − 9
52
= 16
25 ,
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 30
The distribution function of the random variable Y is given by
1 − y92 for y > 3,
F (y ) =
0 elsewhere.
Solution.
P(Y ≤ 5) = F (5) = 1 − 9
52
= 16
25 ,
P(Y > 8) = 1 − P(Y ≤ 8) = 1 − F (8) = 1 − 1 + 9
64 = 9
64 ,
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 30
The distribution function of the random variable Y is given by
1 − y92 for y > 3,
F (y ) =
0 elsewhere.
Solution.
P(Y ≤ 5) = F (5) = 1 − 9
52
= 16
25 ,
P(Y > 8) = 1 − P(Y ≤ 8) = 1 − F (8) = 1 − 1 + 9
= 9
64 ,
64
d
1 − 9
y2
= 18
y3
for y > 3,
f (y ) = dy
0 elsewhere.
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 31
The distribution function of the random variable X is given by
⎧
⎪
⎨0 for x < −1,
F (x) = x+1 for − 1 < x < 1,
⎪
⎩
2
1 for x ≥ 1.
Find P − 12 < X < 12 and P(2 < X < 3).
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 31
The distribution function of the random variable X is given by
⎧
⎪
⎨0 for x < −1,
F (x) = x+1 for − 1 < x < 1,
⎪
⎩
2
1 for x ≥ 1.
Find P − 12 < X < 12 and P(2 < X < 3).
Solution.
1
+1 − 12 +1
P − 12 < X < 12 = F 12 − F − 12 = 2
2 − 2 =
4 − 4 = 2.
3 1 1
Random Variables Discrete Probability Distributions Continuous Random Variables
Example 31
The distribution function of the random variable X is given by
⎧
⎪
⎨0 for x < −1,
F (x) = x+1 for − 1 < x < 1,
⎪
⎩
2
1 for x ≥ 1.
Find P − 12 < X < 12 and P(2 < X < 3).
Solution.
1
+1 − 12 +1
P − 12 < X < 12 = F 12 − F − 12 = 2
2 − 2 =
4 − 4 = 2.
3 1 1
Thank You!!!