Continuous Random Variables: Dr. Hiranmoy Pal

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

Continuous Random Variables

Dr. Hiranmoy Pal

IIIT Bhagalpur

January 16, 2020

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 1 / 13
Introduction

We discuss continuous r.v.s, which can take on any real value in an


interval (possibly of infinite length, such as (0, ∞) or the entire real line).

An r.v. has a continuous distribution if its CDF is differentiable. We also


allow there to be endpoints (or finitely many points) where the CDF is
continuous but not differentiable, as long as the CDF is differentiable
everywhere else. A continuous random variable is a random variable
with a continuous distribution.

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 2 / 13
Probability Density Function (PDF)

Definition
A random variable X is said to be a continuous r.v. if there exists a
non-negative function f , defined for all real x ∈ (−∞, ∞), having the
property that, for any set B of real numbers,
Z
P (X ∈ B) = f (x) dx.
B

The function f is called the probability density function of the random


variable X .

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 3 / 13
Probability Density Function (PDF)

Definition
A random variable X is said to be a continuous r.v. if there exists a
non-negative function f , defined for all real x ∈ (−∞, ∞), having the
property that, for any set B of real numbers,
Z
P (X ∈ B) = f (x) dx.
B

The function f is called the probability density function of the random


variable X .
Note: For a PDF f , the quantity f (x) is not a probability, and in fact it is
possible to have f (x) > 1 for some values of x. To obtain a probability, we
need to integrate the PDF.

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 3 / 13
Properties of PDF

R∞
1 P (X ∈ R) = f (x) dx = 1.
−∞

Rb
2 P (a ≤ X ≤ b) = f (x) dx.
a
Ra
3 P (X = a) = f (x) dx = 0.
a
Ra
4 P (X < a) = f (x) dx.
−∞
Ra
5 P (X ≤ a) = f (x) dx.
−∞

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

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 4 / 13
Cumulative Distribution Function (CDF)

definition
Let X be a continuous r.v. with PDF f . Then the CDF of X is given by
Zx
F (x) = P (X ≤ x) = f (t) dt.
−∞

Properties:

1 F (x) is non-decreasing. 4 P(a < X ≤ b) = F (b) − F (a).


2 lim F (x) = 1. 5 F (x) is a continuous function.
x→∞
d
Rx d
3 lim F (x) = 0. 6 f (x) = dx f (t) dt = dx F (x).
x→−∞ −∞

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 5 / 13
Valid PDFs: The PDF f of a continuous r.v. must satisfy:
f (x) ≥ 0.
R∞
f (x) dx = 1.
−∞
Example: Suppose X is a continuous r.v. whose PDF is given by
(
C 4x − 2x 2 , 0 < x < 2

f (x) =
0, Otherwise.

1 What is the value of C ?


2 Evaluate P(X > 1).
3 Find the CDF of X .

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 6 / 13
Solution:
R∞
1 Since f is a PDF f (x) dx = 1.
−∞

Z2
3
4x − 2x 2

C dx = 1 ⇒ C = .
8
0

3
R∞ 3
R2
4x − 2x 2 dx = 21 .

2 P(X > 1) = 8 f (x) dx = 8
1 1
3 CDF is given by 
0,
 x ≤0
F (x) = ???, 0<x <2

1, x ≥ 2.

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 6 / 13
Uniform Random Variable

Definition
A random variable is said to be uniformly distributed over the interval
(α, β), denoted by X ∼ Unif(α, β), if its probability density function is
(
1
, α<x <β
f (x) = β−α
0, otherwise.

Note that f (x) is indeed a PDF.


Q: Calculate the CDF of an r.v. X uniformly distributed over (α, β).

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 7 / 13
Uniform Random Variable

Definition
A random variable is said to be uniformly distributed over the interval
(α, β), denoted by X ∼ Unif(α, β), if its probability density function is
(
1
, α<x <β
f (x) = β−α
0, otherwise.

Note that f (x) is indeed a PDF.


Q: Calculate the CDF of an r.v. X uniformly distributed over (α, β).
Solution: 
0,
 x ≤α
x−α
F (x) = β−α , α < x < β

1, x ≥ β.

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 7 / 13
Example:

If X is uniformly distributed over (0, 10), calculate the probability that


1 X <3
2 X >7
3 1 < X < 6.

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 8 / 13
Example:

If X is uniformly distributed over (0, 10), calculate the probability that


1 X <3
2 X >7
3 1 < X < 6.
Solution:
R3 1 3
1 P(X < 3) = 10 dx = 10 .
0
R10 1 3
2 P(X > 7) = 10 dx = 10 .
7
R6 1
3 P(1 < X < 6) = 10 dx = 12 .
1

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 8 / 13
Exponential Random Variable
A Geometric random variable counts the number of failures before the
first success in a sequence of Bernoulli trials.
Exponential distribution is analogous to Geometric distribution
(discrete), but we are now waiting for a success in continuous time,
where successes arrive at a rate of λ successes per unit of time.
An Exponential random variable represents the waiting time until the
first arrival of a success.
Definition
A continuous r. v. whose probability density function is given, for some
λ > 0, by (
λe −λx , x > 0
f (x) =
0, x ≤0
is said to be an exponential random variable with parameter λ.
We denoted this by X ∼ Expo(λ).
Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 9 / 13
CDF of Exponential r.v.

Q: Find the CDF of a exponential r. v. X with parameter λ.

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 10 / 13
CDF of Exponential r.v.

Q: Find the CDF of a exponential r. v. X with parameter λ.

Zx
F (x) = λe −λt dt = 1 − e −λx , x > 0.
0
Rx
λe −λt dt = lim 1 − e −λx = 1.

Of course, F (∞) = lim
x→∞ 0 x→∞

X
Q: If X ∼ Expo(1) then find the CDF of Y = λ.

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 10 / 13
CDF of Exponential r.v.

Q: Find the CDF of a exponential r. v. X with parameter λ.

Zx
F (x) = λe −λt dt = 1 − e −λx , x > 0.
0
Rx
λe −λt dt = lim 1 − e −λx = 1.

Of course, F (∞) = lim
x→∞ 0 x→∞

X
Q: If X ∼ Expo(1) then find the CDF of Y = λ.

 
X
P(Y ≤ y ) = P ≤y = P(X ≤ λy ) = 1 − e −λy , y > 0.
λ
Conversely, if Y ∼ Expo(λ) then λY ∼ Expo(1).
Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 10 / 13
Gamma Random Variable
A continuous r.v. whose density is given by
( −λx α−1
λe (λx)
Γ(α) , x >0
f (x) =
0, x ≤0

for some α > 0, λ > 0 is said to be a gamma r.v. with parameters α, λ,


denoted by X ∼ Gamma(α, λ). The quantity Γ(α) is called the gamma
function and is defined by
Z∞
Γ(α) = e −x x α−1 dx.
0

Of course Γ(n) = (n − 1)!, n ∈ N.

Q: Notice that Gamma(1, λ) ∼ Expo(λ).


Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 11 / 13
Normal Random Variable
Definition
We say that X is a normal random variable (or simply that X is normally
distributed) with parameters µ and σ 2 , denoted by X ∼ N µ, σ 2 , if the


density of X is given by

1 (x−µ)2
f (x) = √ e − 2σ2 , − ∞ < x < ∞.
2πσ
Q: If µ = 0 and σ = 1 then check the validity of the PDF.
Z∞ 2
Z∞ 2
Z∞ Z∞ 2 2
Z2π Z∞
r2
− x2 − y2 − x +y
e dx e dy = e 2 dxdy = e − 2 rdrdθ
−∞ −∞ −∞ −∞ 0 0
Z2π Z∞ Z2π
 
−u
=  e du dθ = dθ = 2π.

0 0 0
Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 12 / 13
CDF of a normal r.v.

The CDF of N µ, σ 2 is


Zx
1 (t−µ)2
F (x) = √ e − 2σ2 dt.
2πσ
−∞

Check: If X is normally distributed with parameters µ and σ 2 then


Y = αX + β is normally distributed with parameters αµ + β and α2 σ 2 .

Dr. Hiranmoy Pal (IIIT Bhagalpur) MA203: Probability and Statistics January 16, 2020 13 / 13

You might also like