Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Probability & Statistics for Scientist and Engineers

Dr. M. M. Bhatti

College of Mathematics and Systems Science, Shandong University of Science and


Technology, Qingdao, China
mmbhatti@sdust.edu.cn, mubashirme@yahoo.com

March 27, 2023

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 1 / 17


Outline

1 Random Variables and Probability Distributions


Graphical Interpretations
Continuous random variables and probability distributions

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 2 / 17


Continuous Random Variables

Example 2.5
(a) Find the constant c such that the function
 2
cx 0<x<3
f (x) =
0 otherwise

is a density function, and (b) compute P (1 < X < 2).

(a) Since f (x) satisfies Property 1 if c ≥ 0, it must satisfy Property 2


in order to be a density function. Now
∞ 3
3
cx3
Z Z
2
f (x)dx = cx dx = = 9c (1)
∞ 0 3 0

and since this must equal 1, we have c = 1/9.

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 3 / 17


Continuous Random Variables

(b)
2
2
x2 x3
Z
8 1 7
P (1 < X < 2) = dx = = − = (2)
1 9 27 1 27 27
27

N.B: In case f (x) is continuous, which we shall assume unless otherwise


stated, the probability that X is equal to any particular value is zero. In
such case we can replace either or both of the signs < in (8) by ≤. Thus,
in Example 2.5,
7
P (1 ≤ X ≤ 2) = P (1 ≤ X < 2) = P (1 < X ≤ 2) = P (1 < X < 2) =
27

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 4 / 17


Continuous Random Variables

Example 2.6
(a) Find the distribution function for the random variable of Example 2.5.
(b) Use the result of (a) to find P (1 < x ≤ 2).

(a) We have
Z x
F (x) = P (X ≤ x) = f (u)du (3)
−∞

If x < 0, then F (x) = 0. If 0 ≤ x < 3, then


Z x Z x 2
u x3
F (x) = f (u)du = du = (4)
0 0 9 27

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 5 / 17


Continuous Random Variables

If x ≥ 3, then
3 x 3 x
u2
Z Z Z Z
F (x) = f (u)du + f (u)du = du + 0du = 1 (5)
0 3 0 9 3

Thus the required distribution function is



 0 x<0
F (x) = x3
0 ≤ x<3
 27
1 x≥3

Note that F (x) increases monotonically from 0 to 1 as is required for a


distribution function. It should also be noted that F (x) in this case is
continuous.
Monotone Increasing: Always increasing; never remaining constant or de-
creasing. Also called strictly increasing.

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 6 / 17


Continuous Random Variables

(b) We have

P (1 < X ≤ 2) = P (X ≤ 2) − P (X ≤ 1)
23 13 7
= F (2) − F (1) = − = (6)
27 27 27
as in Example 2.5.
The probability that X is between x and x + ∆x is given by
Z x+∆x
P (x ≤ X ≤ x + ∆x) = f (u)du (7)
x

so that if ∆x is small, we have approximately.

P (x ≤ X ≤ x + ∆x) = f (x)∆x (8)

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 7 / 17


Continuous Random Variables
We also see from (equation given for continuous random variable) on differentiating
both sides that
dF (x)
= f (x) (9)
dx
at all points where f (x) is continuous; i.e., the derivative of the distribution
function is the density function.
In order to obtain (9), we used the basic property
Z x
d
f (u)du = f (x) (10)
dx a

which is one version of the Fundamental Theorem of Calculus.


It should be pointed out that random variables exist that are neither discrete nor
continuous. It is indeed a mixed random variable.

A random variable X is continuous if F (x) is continuous in x.


A random variable X is discrete if F (x) is a step function of x.

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 8 / 17


Continuous Random Variables

Example 2.7
Let c be a constant and

0 x<0
Fc (x) =
1 − ce−3x x≥0

For what values of c, Fc is a cdf?

Clearly,

lim Fc (x) = 0, lim Fc (x) = 1,


x→−∞ x→∞

0 x<0
Fc0 (x) =
−3ce−3x x>0

If c < 0, Fc is decreasing.
If c > 1, Fc (0) = 1 − c < 0.
If 0 ≤ c ≤ 1, then Fc is nondecreasing.
Fc is always right-continuous.
Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 9 / 17
Continuous Random Variables

Hence, Fc is a cdf iff 0 ≤ c ≤ 1.


If c = 1, then Fc is continuous.
If c = 0, then Fc is a special discrete cdf.
If 0 < c < 1, then Fc is neither continuous nor discrete.
It can be shown that the random variable X with the following distribution
function is also another example.

 0 x<1
x
F (x) = 1 ≤ x<2
 2
1 x≥2

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 10 / 17


Graphical Interpretations
If f (x) is the density function for a random variable X, then we can represent
y = f (x) graphically by a curve as in Fig. 2-2. Since f (x) ≥ 0, the curve
cannot fall below the x axis. The entire area bounded by the curve and
the x− axis must be 1 because of Property 2 (see continuous random
variable). Geometrically the probability that X is between a and b, i.e.,
P (a < X < b), is then represented by the area shown shaded, in Fig. 2-2.

(a) (b)

The distribution function F (x) = P (X ≤ x) is a monotonically increasing


function which increases from 0 to 1 and is represented by a curve as in Fig.
2-3.
Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 11 / 17
Continuous random variables and probability distributions

Problem 2.5
A random variable X has the density function f (x) = c/(x2 + 1), where
−∞ < x < ∞. (a) Find the value of the constant c. (b) Find the probability
that X 2 lies between 1/3 and 1.
R∞
(a) We must have −∞ f (x)dx = 1, i.e.,
Z ∞

c −1
h π  π i
dx = c tan x = c − − =1 (11)
−∞ x2 + 1
−∞ 2 2

so that c = 1/π.
π π
N.B: tan = ∞ ⇒ tan−1 ∞ = .
2 2

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 12 / 17


Continuous random variables and probability distributions

√ √
1 3 3
(b) If ≤ X 2 ≤ 1, then either ≤ X ≤ 1 or −1 ≤ X ≤ − . Thus
3 3 3
the required probability is

3
Z − 3 Z 1 Z 1
1 dx 1 dx 2 dx
2
+ √
2
= √
π −1 x +1 π 3 x +1 π 3 x2+1
3 3
" √ !#
2 3
= tan−1 (1) − tan−1
π 3
2 π π  1
= − = (12)
π 4 6 6

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 13 / 17


Continuous random variables and probability distributions

Problem 2.6
Find the distribution function corresponding to the density function of
Problem 2.5.

x
1 x
Z Z
du 1h −1 x
i
F (x) = f (u)du = = tan x −∞
−∞ π −∞ u2 + 1 π
1  −1  1 h πi
= tan x − tan−1 (−∞) = tan−1 x +
π π 2
1 1
= + tan−1 x (13)
2 π

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 14 / 17


Continuous random variables and probability distributions
Problem 2.7
The distribution function for a random variable X is
1 − e−2x

x≥0
F (x) =
0 x<0

Find (a) the density function, (b) the probability that X > 2, and (c) the
probability that −3 < X ≤ 4.
d
(a) f (x) = F (x).
dx
2e−2x

d x>0
F (x) =
dx 0 x<0
(b)
Z ∞

−2u −2u
= e−4

P (X > 2) = 2e du = −e (14)
2 2
Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 15 / 17
Continuous random variables and probability distributions

(c)
Z 4 Z 0 Z 4
P (−3 < X ≤ 4) = f (u)du = 0du + 2e−2u du
−3 −3 0
4
= −e−2u 0 =1−e −8
(15)

Another method to solve (c) part

P (−3 < x ≤ 4) = P (X ≤ 4) − P (X ≤ −3)


= F (4) − F (−3)
= (1 − e−8 ) − 0 = 1 − e−8 (16)

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 16 / 17


Thank you for your kind attention!

Dr. M. M. Bhatti (SDUST) Chapter 2: Lecture # 8 March 27, 2023 17 / 17

You might also like