What is domain and range of random variable?
Let S denote the sample space underlying a random experiment
with elements
s 2 S. A random variable, X, is defined as a function X(s) whose
domain is
S and whose range is a set of real numbers, i.e., X(s) 2 R1.
Example A: Consider the experiment of tossing a coin. The sample
space is
S = fH; Tg. The function
X(s) =
½
1 if s = H
¡1 if s = T
is a random variable whose domain is S and range is f¡1; 1g.
Example B: Let the set of all real numbers between 0 and 1 be
the sample
space, S. The function X(s) = 2s ¡ 1 is a random variable whose
domain is S
and range is set of all real numbers between ¡1 and 1.
A discrete random variable is one whose range is a countable
set. The
random variable defined in example A is a discrete randowm
variable. A continuous
random variable is one whose range is not a countable set. The
random
variable defined in Example B is a continiuos random varible. A
mixed random
variable contains aspects of both these types. For example, let
the set of
all real numbers between 0 and 1 be the sample space, S. The
function
X(s) =
½
2s ¡ 1 if s 2 (0; 1
2 )
1 if s 2 [ 1
2 ; 1)
is a mixed random variable with domain S and range set that
includes set of all
real numbers between ¡1 and 0 and the number 1.
Cummulative Distribution Function
Given a random variable X, let us consider the event fX · xg
where x is any
real number. The probability of this event, i.e., Pr(X · x), is
simply denoted
by FX(x) :
FX(x) = Pr(X(s) · x); x 2 R1:
The function FX(x) is called the probability or cumulative
distribution
fuction (CDF). Note that this CDF is a function of both the
outcomes of the
random experiment as embodied in X(s) and the particular scalar
variable x.
The properties of CDF are as follows:
² Since FX(x) is a probability, its range is limited to the
interval: 0 ·
FX(x) · 1.
² FX(x) is a non-decreasing function in x, i.e.,
x1 < x2 Ã! FX(x1) · FX(x2):
1
² FX(¡1) = 0 and FX(1) = 1.
² For continuous random variables, the CDF fX(x) is a unifromly
continuous
function in x, i.e.,
lim
x!xo
FX(x) = FX(xo):
² For discrete random variables, the CDF is in general of the
form:
FX(x) =
X
xi2X(s)
piu(x ¡ xi); x 2 R1;
where the sequence pi is called the probability mass function
and u(x) is
the unit step function.
Probability Distribution Function
The derivative of the CDF FX(x), denoted as fX(x), is called the
probability
density function (PDF) of the random variable X, i.e.
fX(x) = dF(x)
dx
; x 2 R1:
or, equivalently the CDF can be related to the PDF via:
FX(x) =
Z x
¡1
fX(u)du; x 2 R1:
Note that area under the PDF curve is unity, i.e.,
Z 1
¡1
fX(u)du = FX(1) ¡ FX(¡1) = 1 ¡ 0 = 1
In general the probability of a random variable X(s) taking
values in the range
x 2 [a; b] is given by:
Pr(x 2 [a; b]) =
Z b
a
fX(x)dx = FX(b) ¡ FX(a):
For discrete random variables the PDF takes the general
form:
fX(x) =
X
xi2X(s)
pi±(x ¡ xi):
Specifically for continuous random variables:
Pr(x = xo) = FX(x+
o ) ¡ FX(x¡o
) = 0:
2