Discrete & Continuous Random Variables, Probability Mass & Density Functions
There are two important types of probability measure that we will focus on.
Discrete, Probability Mass Function (pmf)
A probability measure on is discrete if there exists a finite or infinite sequence of numbers such that
A random variable is discrete if its distribution is discrete.
In this case, we call the function defined by the probability mass function of (pmf)
Crucial fact: pmf completely determines the distribution of a discrete random variable. Because .
Continuous, Probability Density Function (pdf)
A probability measure on is continuous if there exists an integrable function s.t.
A random variable is continuous if its distribution is continuous.
In this case, we call the probability density function (pdf) of .
Note
Crucial fact: pdf completely determines the distribution of continuous random variables.
Examples.
A fair coin is tossed 3 times. Let X = "number of heads". X is a discrete random variable. Find its pmf.
for all other values of
A point is chosen uniformly at random from the unit disk. Let X = "distance of the point from the cetner". X is a continuous random variable. Find its pdf.
take the derivative of each side Fundamental theorem of calculus
Uniform
We say that a random variable is uniform on [a,b] if is continuous and its pdf is given by
In this case we write .
Example. Suppose . Calculate .
In general,
Going from pmf/pdf to cdf
The formulas to go from the pmf/pdf of a discrete/continuous random variable to its cdf are straightforward:
If is discrete, .
If is continuous, .
Examples.
Suppose X is discrete w/ pmf pX(−π)=31,pX(2)=32. Find its cdf.
Suppose X∼Unif[−1,2]. Find its cdf.
Going from cdf to pmf/pdf
The formulas to go from the cdf to the pmf/pdf of a discrete/continuous random variable are slightly more involved.
Fact: Let be a random variable and its cdf.
If is piecewise constant, then is discrete and its pmf is found by calculating the magnitude of the jumps at the points on discontinuity.
If is continuous and piecewise continuously differentiable, then is continuous and its pdf is given by .
Examples.
Suppose X has cdf given by FX(s)=⎩⎨⎧0311s<−π−π≤s<22≤s. Is X discrete or continuous? If so, find its pmf/pdf.
Suppose X has cdf given by FX(s)=⎩⎨⎧0sins1s<00≤s<2π2π≤s. Is X discrete or continuous? If so, find its pmf/pdf.
is continuous + continuously piecewise differentiable is continuous and
Defining Properties of pdf’s, pmf’s, pdf’s
Fact
A function is the cdf of a random variable if and only if
and
Nondecreasing meaning
Right-continuous comes from right-continuous
not left-continuous
Fact
A function is the pmf of a discrete random variable if and only if there exists a finite or infinite sequence of numbers such that
for all
,
Fact
A function is the pdf of a continuous random variable if and only if is integrable and