Continuous random variables
What follows is the general definition of a random variable.
Definition 1.
Let be a probability space. A function is a random variable if for all .
It follows from the definition that for all intervals of the form , , is in . Since is closed under countable intersections, it follows that the preimages of all intervals of all types are in (including singletons). Additionally, since every open set in is an at most countable disjoint union of open intervals, the preimage of every open set is in . It follows that the preimage of every closed set is also in .
Note that this definition is compatible with our earlier definition of a discrete random variable.
Recall our definition of the distribution function of a random variable and its properties. In particular, we showed that . We motivate the definition of a continuous random variable by our desire for the distribution function to be continuous:
Definition 2.
A random variable is called a continuous random variable if for all .
Observe that is a continuous random variable iff its distribution function is continuous at every .
Densities of continuous random variables
Definition 3.
A density function with respect to integration is a nonnegative integrable function such that
Note that if is a density function, then the function defined by
is a continuous function (follows from a generalization of this theorem) satisfying all the properties of a distribution function. Thus, is a continuous distribution function. We say that this distribution function has density . Further, if is continuous at a point , then is differentiable at , and . In other words, where ever is continuous.
Given a distribution function , we say that it admits a density if there exists a function satisfying . Note that if admits a density, does not uniquely determine , as one can always change the value of at finitely many points and not affect the integral.
Given a distribution function , consider the case when is differentiable. Then, satisfies due to the fundamental theorem of calculus (But isn’t that only on finite intervals?) (How do we know that is integrable here?).
Not all continuous distribution functions have densities. A continuous distribution function admits a density iff is absolutely continuous (ANA 3 stuff). (So does differentiability imply absolute continuity?)
If is a random variable having density , then
Densities of functions of continuous random variables
Example 4.
Let be a continuous random variable having density . Let . What is the density of ?
Let and denote the distributions of and . Then for . For ,
Everything till this point is totally rigorous. Now, differentiate.
Thus has density given by
Note that and may not be differentiable at all points. To rigorously establish the validity of the above result, define as above, and integrate it to obtain (subtleties: show that is a density function: non negativity and integrability. Showing that shows that and that is indeed a density of ).
Example 5.
Take , , in the previous example. If we let and denote the distributions of and ,
Differentiate.
The following theorem provides a general solution for some functions of .
Theorem 6.
Let be a differentiable and strictly monotonic function on an interval . Let be a continuous random variable having density such that for . Then has density given by for and
Common density functions
Symmetric densities
Definition 7.
A density function is called symmetric if for all .
A random variable is called symmetric if and have the same distribution function.
Theorem 8.
Let be a random variable that has a density. Then has a symmetric density iff is a symmetric random vairable.
We prove this for continuous random variables; the proof for discrete random variables is similar.
Proof of
Let have a symmetric density . Then,Thus, .
Proof of
Let be a symmetric random variable, that is, and have the same distribution function. Now, if is a density of , it follows that is also a density of . From the previous theorem, we have .
If a continuous distribution function has a symmetric density , then . The values of negative s can be calculated using the values of positive s : .
Uniform density
Definition 9.
Let a and be constants with . The uniform density on the interval is the density defined by
Note that proving the existence of a uniformly distributed random variable requires measure theory.
Theorem 10(Proposition).
Let be a continuous random variable with differentiable strictly increasing distribution and density . Then and have the uniform distribution .
Proof
for not in . If ,The fact that is an increasing function has been used.
This can also be proved without using the density (and thus without assuming is differentiable): for ,
It follows from monotonicity that if , , and if , .
Next, let again be a continuous strictly increasing distribution function, and let . Then, is a random variable with distribution function : for all ,
Thus, given any continuous strictly increasing distribution function, there exists a random variable with that distribution.
Normal density
Definition 11.
The standard normal density is usually denoted by , and is defined by
Its distribution is denoted by .
If is any non-negative function such that
Then can be normalized by dividing by the value of the above integral to yield a density function. For example, if ,
so the function is a density function. (Nobody seems to know a way to evaluate the above integral besides this whacky trick).
Let be a random variable having the standard normal density and let , where . Then, by the preceding example, has the density given by
is called the normal density with mean and variance , and is denoted by . From the same example, we know that the distribution function of is given by
So, If is distributed as and , then
If a random variable is distributed as , then the random variable , is distributed as
where .
Exponential density
Definition 12.
The exponential density with parameter is the density defined by
The corresponding distribution function is
An important property of exponentially distributed random variables is the following:
or, equivalently,
This result is similar to the one obtained here for geometrically distributed random variables.
The above property actually characterizes the family of exponential distributions:
Theorem 13.
Let be random variable such that holds for all . Then either or is exponentially distributed.
Cauchy density
Definition 14.
The Cauchy density is the density given by
Theorem 15(Proposition).
If , then .
It can be easily shown that if , does not have finite expectation.
Gamma density
Consider functions of the form
Here, we require and in order that be integrable (how do I show that is integrable under these conditions?). In normalizing to make it a density we must evaluate
On making the change of variable , we get
There is no simple formula for this integral. Instead, it is used to define what is called the Gamma function:
Definition 16.
So, . Note the formula
The normalized function is called the gamma density with parameters and , denoted by .
Definition 17.
The gamma density is defined as follows.
Important
The exponential density is a special case of the gamma density. Specifically, the exponential density with parameter is the same as the gamma density .
Properties of the gamma function
Let . If is the density of , using the formula we derived previously, we get to be
Note that
with and . Since is a density, it follows that the normalization constant for is equal to . Thus,
The third property can be derived by integrating by parts:
There is no simple formula for the distribution function corresponding to except when is a positive integer , in which case
On repeating times, we get
This formula provides a connection between a random variable and a random variable having a Poisson distribution with parameter :
Expectation of the gamma distribution
Let . Then,
Thus, has finite expectation, and .