0% found this document useful (0 votes)
140 views38 pages

Understanding Random Variables and Distributions

This document defines and provides examples of random variables, probability distributions, probability mass functions, probability density functions, and distribution functions. A random variable is a function that assigns a numerical value to each outcome in the sample space. Probability distributions define the probabilities associated with different possible values of a random variable. Probability mass functions are used for discrete random variables while probability density functions are used for continuous random variables. Distribution functions give the probability that a random variable is less than or equal to a value.

Uploaded by

rajesh adhikari
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)
140 views38 pages

Understanding Random Variables and Distributions

This document defines and provides examples of random variables, probability distributions, probability mass functions, probability density functions, and distribution functions. A random variable is a function that assigns a numerical value to each outcome in the sample space. Probability distributions define the probabilities associated with different possible values of a random variable. Probability mass functions are used for discrete random variables while probability density functions are used for continuous random variables. Distribution functions give the probability that a random variable is less than or equal to a value.

Uploaded by

rajesh adhikari
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

RANDOM VARIABLE (X)

A random variable (RV) X is a real valued function defined on


the sample space, i.e., for each element of the sample space, the RV
takes a unique real number.
This defines a one dimensional random variable.

Example: Let us consider throwing of two coins simultaneously. The


sample space associated with this experiment shall be S = {HH, HT,
TH, TT}. Here H represents the appearance of head and T represents
the appearance of tail. We can define a random variable for this
sample space as:
{(HH, 2), (HT, 1), (TH, 1), (TT, 0)}
This random variable can also be represented as:
X(HH) = 2; X(HT) = X(TH) = 1; X(TT) = 0.
Please note that this definition of RV defined on the given
sample space is not unique.

We can define a number of other random variables on


this given sample space.
PROBABILITY DISTRIBUTION
With a random variable X, we can associate a
probability distribution. We will define the probability
distributions of discrete and continuous random variables
separately.

Discrete Random Variable


A set of numbers {pn} is the probability distribution of a
random variable X taking values x1, x2, …, xn, … if it satisfies the
following properties.
(i) pi ≥ 0, i = 1, 2, …
(ii) σ∞
𝑖=1 𝑝𝑖 = 1
We also write this as
p(x) = pi, for x = xi;
= 0, otherwise

This function p(x) is also called the probability


mass function (pmf) of the random variable X. This
notation also means that,
P(X = xi) = pi, i = 1, 2, …
We also say that a function that satisfies (i) and (ii)
above is a legitimate pmf.

There is a general convention of the notations here that


random variables are represented by capital letters and
their values are represented by small letters.
Example: we considered throwing two dice
simultaneously in which the sample space is
S = {HH, HT, TH, TT}
Let us define here the random variable X as number of
heads that appear in these two simultaneous throws. As
such, X takes the values 0, 1 and 2. We can associate a
pmf with this random variable as
P(X = 0) = 1/4, P(X = 1) =1/2, P(X = 2) = 1/4.
This probability function is depicted in following Figure.
Probability Mass Function
Continuous Random Variable

When we deal with a continuous random variable, we do not have the


values of the variable at discrete points rather the random variable takes
the values from an interval. This interval can be considered as a subset of
the real line. Here, instead of probability mass function, we define
probability density function. Probability of an event depends upon the
starting point and the length of the interval. Probability density function
(pdf) is defined as the function that gives us the probability per unit
interval. This can be illustrated with the following.
𝑃(𝑥 < 𝑋 < 𝑥 + ℎ)
𝑓 𝑥 = lim
ℎ→0 ℎ

As such, for a continuous random variable X, we define


a pdf. A function f(x) is said to be a pdf if it satisfies the
following properties.

(i) f(x) ≥ 0, -∞ < x < ∞



(ii) ‫׬‬−∞ 𝑓 𝑥 𝑑𝑥 = 1
It means that pdf always takes nonnegative values and the
integral of this function over the interval under consideration for
the random variable should be 1. We also say that a function that
satisfies (i) and (ii) above is a legitimate pdf.

Notes:
𝑏
(i) Here, P(a ≤ X ≤ b) is defined as ‫𝑓 𝑎׬‬ 𝑥 𝑑𝑥.
(ii) For a continuous random variable, the probability that the
variable takes a specific value is 0.
Example: Let us consider that f(x) = 2x, 0 < x < 1;
= 0, elsewhere
Show that this is a legitimate pdf.

(i) We can see that f(x) ≥ 0 for all x such that 0 < x < 1.
∞ 1
(ii) ‫׬‬−∞ 2𝑥 𝑑𝑥 = ‫׬‬0 2𝑥 𝑑𝑥 = [𝑥 2 ]10 = 1.

As such, this function is a legitimate pdf.


Graph of this function is given below. This can be noted that the area
bounded by the function f(x), line x = 0, line x = 1 and x-axis is 1
here.

Probability Density Function


Distribution Function (or, Cumulative
Distribution Function)
The distribution function (df) of a random variable X is
defined as,
F(t) = P(X ≤ t), -∞ < 𝑡 < ∞
For a discrete random variable, we can see that this function
will be of the following form,
F(t) = σ𝑥≤𝑡 𝑝(𝑥), -∞ < 𝑡 < ∞
And for a continuous random variable, this function shall be,
𝑡
F(t) = 𝑃 𝑋 ≤ 𝑡 = ‫׬‬−∞ 𝑓 𝑥 𝑑𝑥
Example: Let us consider the pmf considered earlier and
given as:
P(X = 0) = 1/4, P(X = 1) =1/2, P(X = 2) = 1/4.
The distribution function for this random variable X can be
given as below.
𝐹 𝑡 = 0, −∞ < 𝑡 < 0
0.25, 0 ≤ 𝑡 < 1
0.75, 1 ≤ 𝑡 < 2
1, 𝑡 ≥ 2
Distribution Function for a Discrete Variable
Let us now consider the pdf, f(x) = 2x, 0 < x < 1;
= 0, elsewhere.
Distribution function for the random variable following this pdf
shall be:
𝑡 𝑡
𝐹 𝑡 = ‫׬‬−∞ 2𝑥 𝑑𝑥 = ‫׬‬0 2𝑥 𝑑𝑥 = [𝑥 2 ]𝑡0 = 𝑡 2 .
The distribution function shall thus be defined as,
𝐹 𝑡 = 0, 𝑡 < 0
𝑡 2, 0 ≤ 𝑡 ≤ 1
1, 𝑡 > 1
The graph of this function is:

Distribution Function for a Continuous Random Variable

One can note that this is a continuous function defined over


the interval (-∞, ∞).
=1/36
Probability function Distribution function

You might also like