In this post we will be discussing about the probability distribution function for discrete as well as for continuous random variables which would be defined later. The difference is not that much, it is just that integration becomes summation for discrete cases and other way round. And naturally so, this post is going to highlight some discrete and continuous random variables with their respective probability density functions (pdfs) as well as cumulative distribution functions (cdfs). The main non-mathematical motivation behind studying these things is statistical modeling. These are the building blocks of statistical applications in many fields of data science and machine learning as well as in engineering and finance.
The following are the questions we are going to discuss:
- What are discrete and continuous random variables?
- What are probability distribution and density / mass functions?
- Few discrete and continuous random variables with respective distribution functions.
Discrete and Continuous random variables
A discrete random variable is a function from a sample space
of a set
into
which takes only countable discrete values. Let me make it precise what discrete means here, in simple language it means for every value that the random variable takes there is some jump. A random variable is said to be continuous if it can take any real value within an interval in
or on the whole
(with certain conditions which would be mentioned later). For example, if r.v. X takes values as
or
then it is discrete but if it takes any value between the interval
then it is continuous. Generally,
etc. denote rv and
etc. denote their values.
Probability Mass and Distribution function for discrete random variables
For a discrete rv X, the probability mass is defined as , it is the probability of all the events which is assigned the value
by
. It is called as the probability mass function (pmf) if
for any discrete rv
taking
‘s as values. The simplest example is the rv
which takes a value of
when head comes up and a value of
when tail shows up for a singe coin toss experiments with probability of head being
. So we have
and
. The probability mass function can be thought of as the mass of the particle at that point. Another useful concept is the probability distribution function of a random variable
which is defined as
. We can see that
for any discrete rv
taking
‘s as values, because this is nothing but the probability of the whole sample space. We write the probability mass function as
and the probability distribution function (also called cumulative distribution function) as
. The random variable
defined above for the single coin toss with probability of head (or success) as
with the probability mass function defined as
where
, is called as the Bernoulli distribution with parameter
, denoted as
. It is used in classification problems.
Probability Distribution and density function for continuous random variables
Often in mathematics, first certain specific properties are discovered then based on it a general definition is defined. The same story is true of continuous random variables. So the definition we gave above of a continuous rv is not complete. Let’s make it precise (omitting technicalities involved which may not be of interest to most people, for readers interested in more technical aspects involved search for absolutely continuous functions). We say is a continuous rv if there exists a non-negative continuous function
defined on
such that for any interesting subset
(for example, intervals and their unions or intersections), we have
. The function
is called as the probability density function if
, which is similar to the case of discrete rv where sum of the probability mass function (pmf) is unity. In this case cumulative distribution function (cdf)
is given by
. In general when
is differentiable everywhere and
is continuous then
, which is what is assumed in most cases of interest or applications. We would be mentioning more properties of the pdf and cdf of a rv as we go along in future blogs. Consider a random variable
which takes values in
such that
, which has pdf
for all
and
and
for all
. We can see that
. Then this defines a continuous rv and the distribution defined by it is called as the uniform distribution on the interval
.
Some more random variables
Consider a rv which gives the number of heads (successes) in
coin tosses where the probability of success is
. We know that this can happen in
ways and multiplying it with the probability gives us the number of successes that is, we have
. By binomial theorem we know that
, hence it is a pmf. This pmf defines what is called as the Binomial distribution.
Consider another rv which has pdf
. It is a good exercise to solve this integral over
and see that it is
. It defines a distribution function which is seen throughout statistics, it is called as the standard normal distribution. We would be discussing this and some other distributions in more detail like their expectation and variance and uses in forthcoming blogs.
References:(If you click from the link provided here and buy books it would help me. Thanks.)
- George Casella and Roger Berger, Statistical Inference
- F.M. Dekking et.al., A Modern Introduction to Probability and Statistics
- Sheldon Ross, A First Course in Probability
Leave a comment