0% found this document useful (0 votes)
11 views28 pages

STAT112 Lecture 2

The document discusses continuous random variables and their probability distributions, emphasizing that unlike discrete random variables, continuous random variables cannot have non-zero probabilities assigned to all points on an interval. It introduces key concepts such as distribution functions, probability density functions (pdf), and expected values, along with relevant theorems and examples. The document also outlines properties of distribution functions and provides methods for calculating probabilities and expected values for continuous random variables.

Uploaded by

niisigma707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views28 pages

STAT112 Lecture 2

The document discusses continuous random variables and their probability distributions, emphasizing that unlike discrete random variables, continuous random variables cannot have non-zero probabilities assigned to all points on an interval. It introduces key concepts such as distribution functions, probability density functions (pdf), and expected values, along with relevant theorems and examples. The document also outlines properties of distribution functions and provides methods for calculating probabilities and expected values for continuous random variables.

Uploaded by

niisigma707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

STAT 112:Elementary Probability

LECTURE TWO

Prof. E.N.N Nortey & Dr. R. Minkah

Department of Actuarial Science and Statistics Department

May 2024
Continuous Variables and Their Probability Distributions

Reflecting on random variables encountered in the real world, we are


convinced that not all random variables of interest are discrete random
variables. Examples of random variables that are continuous are:

amount of rainfall measured over time

length of life in years

the yield of an antibiotic in a fermentation process

The probability distribution for a discrete r.v can always be given by


assigning a non-negative probability to each of the possible values, the
variable may assume. In every case of course, the sum of all the
probabilities that we assign must be equal to 1.
Unfortunately, the probability distribution for a continuous r.v cannot be
specified in the same way. It is mathematically impossible to assign
non-zero probabilities to all points on a line segment/interval while
satisfying the requirement that the probabilities to all the points on a line
interval while satisfying the requirement that the probabilities of the distinct
possible values sum to 1. As a result, we must develop a different method
to describe the probability distribution for a continuous random variable.
Probability Distribution for a Continuous Random Variable

Definition 2.1
Let X denote any random variable. the distribution function of X , denoted
by F (x), is such that F (x) = P(X ≤ x) for −∞ < x < ∞
Example 2.1
Suppose that X is a discrete r.v with pmf
   2
2 1
p(x) = , x = 0, 1, 2.
x 2

Obtain the cdf of X, F (x) and graph it


Solution
p(0) = 41 , p(1) = 12 , p(2) = 1
4

0, for x < 0







 1 , for 0 ≤ x < 1

4
F (x) = P(X ≤ x) =
3
4 , for 1 ≤ x < 2







1, for x ≥ 2

∴ F (−2) = P(X ≤ −2) = 0

1 1 3
F (1.5) = P(X ≤ 1.5) = P(X = 0) + P(X = 1) = + =
4 2 4
Properties of a Distribution Function
Theorem 2.1
Given that F(x) is a distribution function, then the following properties
hold:

1. F (−∞) = limx→−∞ F (x) = 0

2. F (∞) = limx→∞ F (x) = 1

3. F (x) is a non decreasing function of x. That is if x1 and x2 are any


values such that x1 < x2 , then F (x1 ) ≤ F (x2 ).
Definition 2.2
A random variable X with distribution function F (x) is continuous, for
−∞ < x < ∞. If X is a continuous r.v, then for any real number
x, P(X = x) = 0.
Definition 2.3
Let F (x) be the distribution function for a continuous r.v X. Then f (x),
the pdf of X, is given by
d
f (x) = F (x) = F ′ (x)
dx
whenever the derivative exists.
It follows from Definitions 2.2 and 2.3 that F(x) can be written as
Zx
F (x) = f (t)dt,
−∞
where f (·) is the pdf of X and t is used as a variable of integration.
Graphically, we have

Theorem 2.2(Properties of a Density function)


Given that f (x) is a density function for a continuous r.v X, then

(i). f (x) ≥ 0 for all x, −∞ < x < ∞


R∞
(ii). −∞ f (x)dx = 1
Example 2.2
Suppose that




0 for x < 0

F (x) = x for 0 ≤ x ≤ 1




1 for x > 1

Find the pdf for X and graph it.


Solution
Since the pdf f (x) is the derivative of the cdf F (x), when the derivative
exists, we have

d

 dx

 (0), for x < 0
d 
f (x) = F (x) = d (x), for 0 ≤ x ≤ 1
dx 
 dx

 d (1), for x > 1

dx

d 1, for 0 ≤ x ≤ 1

f (x) = F (x) =
dx 0, otherwise

Example 2.3
Let X be a continuous r.v with pdf given by

3x 2 , for 0 ≤ x ≤ 1

f (x) =
0,

elsewhere

Find F(x). Graph both f(x) and F(x)


By definition,
Rx
F (x) = ∞ f (t)dt

Rx
 0dt, for x < 0
 −∞



3 x
R0 Rx 2 3
= for 0 ≤ x ≤ 1
 −∞ 0dt + 0 3t dt = 0 + t 0 = x ,

R 0 0dt + R 1 3t 2 dt + R x 0dt = 0 + t 3 1 + 0 = 1, for x > 1


−∞ 0 1 0




0, for x < 0

= x 3 , for 0 ≤ x ≤ 1




1, for x > 1
Definition 2.4
Let X denote any r.v. If 0 < p < 1, the pth quantile of X denoted γp , is
the smallest value such that

P(X ≤ γp ) = F (γp ) ≥ p

If X is continuous, γp is the smallest value such that

F (γp ) = P(X ≤ γp ) = p

Some prefer to call γp , the 100pth percentile of X.


Theorem 2.3
Given that the r.v X has pdf f(x) and a < b, then the probability that X lies
within the interval [a, b] is
Z b
P(a ≤ X ≤ b) = f (x)dx
a

This probability is shaded in the diagram below:


If X is a continuous r.v and a and b are constants such that a < b, the
P(X = a) = 0 and P(X = b) = 0
Theorem 2.3 implies that

P(a < X < b) =P(a ≤ X < b) = P(a < X ≤ b)


Z b
=P(a ≤ X ≤ b) = f (x)dx
a

Example 2.5
A continuous r.v X has pdf given by

cx 2 , for 0 ≤ x ≤ 2

f (x)
0,

elsewhere
Find the value of c for which f(x) is a valid density function. Hence find
P(1 < X < 2)
Solution
We obtain the value of c such that
Z ∞ 2 2
x3
Z
F (∞) = f (x)dx = cx 2 dx = c
−∞ 0 3 0
8
c =1
3
Thus
3
c=
8
3
∴ f (x) = x 2 , 0 ≤ x ≤ 2
8
Z 2
3 2 2 7
Z
∴ P(1 < X < 2) = f (x)dx = x dx =
1 8 1 8
Expected Values for Continuous Random Variables

Definition 2.5
The expected value of a continuous r.v X is given by
Z ∞
E (X ) = xf (x)dx
−∞

provided the integral exists.


Theorem 2.4
Let g(X) be a function of X: then the expected value of g(X) is given by
Z ∞
E [g (X )] = g (x) · f (x)dx
−∞

provided that this integral exists


Theorem 2.5
Let c be a constant and let g (X ), g1 (X ), g2 (X ), . . . , gk (X ) be functions of
a continuous r.v X and let c, c1 , c2 , . . . , ck be constants. Then the
following results hold:

1. E (c) = c

2. E [cg (X )] = cE [g (X )]

3. E [g1 (X )+g2 (X )+· · ·+gk (X )] = E [g1 (X )]+E [g2 (X )]+· · ·+E [gk (X )]

4. E [c1 g1 (X ) + c2 g2 (X ) + · · · + ck gk (X )] =
c1 E [g1 (X )] + c2 E [g2 (X )] + · · · + ck E [gk (X )]
Example 2.6
Let the r.v X has density given by:

 3 x 2 , for 0 ≤ x ≤ 2

8
f (x)
0,

elsewhere
Find the mean and variance of X
Solution
By definition,

∞ 2  
3
Z Z
E (X ) = xf (x)dx = x x 2 dx
−∞ 0 8
Z 2  2
3 3 3 1 4 3
= x = x = = 1.5
0 8 8 4 0 2
To find the variance, we find

∞ 2
 
3
Z Z
2 2 2
E (X ) = x f (x)dx = x x 2 dx
−∞ 0 8
3 4 3 2 4 3 1 5 2
Z 2 Z  
2
E (X ) = x = x = x = 2.4
0 8 8 0 8 5 0

∴ σ 2 = Var (X ) = E (X 2 ) − E 2 (X )

σ 2 = 2.4 − 1.52 = 0.15


Example 2.7
If X is a continuous r.v with distribution function

0, for x ≤ 0







x ,

for 0 < x < 2
8
F (x) =
x2
16 , for 2 ≤ x < 4







1, for x ≥ 4

Solution
Clearly the distribution function F(x) is continuous on the interval
0 ≤ x ≤ ∞, therefore, its density function, f(x) is given by

d
dx (0), for x ≤0







d x ,

for 0<x <2

d dx 8
f (x) = F (x) =
dx
 2
d x
dx 16 , for 2≤x <4






 d (1),

for x ≥4

dx

0, for x ≤ 0







 1 , for 0 < x < 2

8
=
x
8 , for 2 ≤ x < 4







0, for x ≥ 4


0, for x ≤ 0







1,

for 0 < x < 2
8
x
8 , for 2 ≤ x < 4







0, elsewhere

By definition,
Z ∞
E (X ) = xf (x)dx
−∞
Z 2 Z 4 2
1 x
= xdx + xdx
0 8 2 8
 2  2
1 x2 1 x3
= +
8 2 0 8 3 4
1 13
=
+
4 128
32 + 13 45
E (X ) = =
128 128
Also
Z ∞
E (X 2 ) = x 2 f (x)dx
−∞
Z 2
1 x3 4 3
Z
= x 2 dx + x dx
8 0 8 2
 2  2
1 x3 1 x4
= +
8 3 0 8 4 4
 
1 8 13
= + (64 − 4)
8 3 128
1 15 47
E (X 2 ) = + =
3 2 6
Var (X ) = E (X 2 ) − E 2 (X )
45 2 378949
 
47
∴ Var (X ) = − = ≈ 7.7097
6 128 49152

You might also like