A random variable is discrete if it can assume at most a finite or countably infinite number of possible values
A random variable is continuous if it can assume any value in some interval or intervals of real numbers and the probability that it assumes any specific value is 0
Density Function
A function f is called a density for X if: (1) (2) (3) for x real
A function f is called a density for X if: (1) for x real (2) (3) for a and b real
Cumulative Distribution Function for x real
Ordinary Moments the kth ordinary moment for variable X is defined as:
Moment generating function (mgf)
Expected Value For descrete Random Variables
Recall, a random variable is a real-valued function defined over a sample space, usually denoted by or and is discrete if the space of is finite or countably infinite.
Note
If is a discrete random variable with probability function then the expected value of , denoted is The expected value is also called the mean of , and is often denoted as or if the random variable is understood.
Note
Let be a discrete random variable with probability function and suppose is a real-valued function of . Then the expected value of is
Variance
Note
If is a random variable with expected value the variance of , denoted is The variance of is often denoted or if the random variable is understood. Also, denoted or is called the standard deviation of .
Properties of Expected Value
Note
Suppose is a discrete random variable, is a constant, and and are functions of .
.
.
.
Let’s take the time to prove these properties. Each of them essentially follows by properties of summations.
Proof
Given a constant we can view this constant as a function of say . Then
Since the sum over all of is 1 for any probability model, the result follows.
Here appeal to Theorem:
Here we also appeal to Theorem and arithmetic:
Let be a discrete random variable with probability function and expected value . Then
Important
By definition,
Tchebysheff’s Theorem
Let be a random variable with mean and finite variance . Then for any constant Equivalently,
Important
We prove Tchebysheff’s inequality in the case for a discrete random variable, and we come back to this theorem after defining continuous random variables.
Let be given.
Then by the definition of variance. We can partition the space of into three disjoint sets, depending on the location of relative to :
Each of these three sums is non-negative, and for the first and third sums we can also say that for all in the given range, so it follows that So,
Dividing both sides of the inequality by the positive value gives us the result:
Expected Value for Continuous Random Variables
Note
If is a continuous random variable with probability density function then the expected value of , denoted is provided this integral exists. The expected value is also called the mean of , and is often denoted as or if the random variable is understood.
The expected value of the function of is provided this integral exists.
The variance of is provided this integral exists.
As in the discrete case, one can show a working formula for variance which is sometimes easier to use to calculate variance.
Find and where is the continuous random variable .
Recall has density function for .
Expected Value:
Variance: We first find :
Then,
The properties of expected value that held for discrete random variables also hold for continuous random variables.
Note
Suppose is a continuous random variable, is a constant, and and are functions of .
.
.
.
These results follow immediately from properties of integration. For instance, to prove property 1 we observe that for constant and the integral in the last expression equals 1 by definition of a valid probability density function.
Let be a random variable (discrete or continuous) with and and let be constants. Then
Proof.
This result follows immediately from properties of expected value .
Let . Then (a) says that so But by the definition of variance, so the result follows.
Moments and Moment-Generating Functions For Descrete Random Variables
Moment generating functions(MGFs), Probability generating functions (PGFs) and characteristic functions provide a way of representing pdfs/pmfs through functions of a single variable. The are useful in many ways and these include:
Provide an easy way of calculating the moments of a distribution. This helps in the computation of mean and variance functions for the different variables.
Provide some powerful tools for addressing certain counting and combinatorial problems
Provide easy way of characterizing the distribution of the sum of independent random variables.
Provide a bridge between complex analysis and probability, so the complex analysis methods can be brought to bear on probability problems.
Provide powerful tools for proving limiting theorems such as the law of large numbers and the central limit theorems.
We have seen that:
For random variable we have seen that and provide useful information:
gives the mean of the distribution
gives the variance of the distribution.
Important
Let be a random variable, and . The th moment of about the origin is . More generally, for any constant is called the th moment of about .
Often times we can encode all the moments of a random variable in an object called a moment-generating function.
Note
Let be a discrete random variable with density function . If there is a positive real number such that for all exists and is finite, then the function of defined by is called the moment-generating function of .
Suppose has the density function
Then, for any real number
and this sum exists as a finite number for any so the mgf for exists.
How does encode the moments?
Suppose is a random variable with moment-generating function which exists for in some open interval containing 0. Then the th moment of equals the th derivative of evaluated at :
Proof. Let’s say is discrete and Then the derivative of with respect to the variable is Then and letting we have which equals since .
The second derivative of is
Evaluating this at gives
Continuing in this manner, for any the th derivative of is which evaluates to the defintion of when .
The mgf for a geometric distribution
If is geometric with parameter then for and
The last step is true by the geometric series formula, provided . Since the series converges by the geometric series formula if and only if . Well,
In other words, yes, there exists an interval containing 0 for which exists for all in the interval.
The mgf for a Poisson distribution
Find the mgf of a Poisson random variable with parameter . Since we’re considering a Poisson distribution, our strategy for finding the mgf will be to work our expectation to look like a power series for .
Strategy: Work our series to include since this converges to .
Let’s derive our and formulas for a Poisson random variable using the mgf.
The first derivative is and
The second derivative is so
Now check! And, check again!
Moments and Moment-Generating Functions For Normal Random Variables
the moment-generating function (mgf) associated with a discrete random variable should it exist, is given by where the function is defined on some open interval of values containing 0. The same definition applies to continuous random variables. We have seen that this mgf encodes information about : the th derivative of evaluated at gives us the th moment. That is, for
In fact, it turns out that the mgf gives us all the information about a random variable per the following theorem, whose proof is beyond the scope of this course.
Let and denote the mgfs of random variables and respectively. If both mgfs exist and for all values of then and have the same probability distribution.
Find the mgf for the standard normal random variable .
The bracketed portion of this last expression equals 1, for all since it is the integral of the density function of a distribution, so for all .
More generally, for one can show its mgf is
We now return to the proof of Theorem , which we restate as the following lemma.
If is and then is .
Note
Let be and . Then the mgf for is
This last step follows because is the mgf of evaluated at . Then,
But hey! This mgf is the mgf for so by Theorem , since and have the same mgf, they have the same probability distribution.
If is then is .
The proof of this lemma is left for now.
Note
Let be independent random variables with mgfs respectively. If then
Sketch of Proof:
Note
Let be independent random variables coming from a distribution with mgf and distribution function . If then
That the distributes through the product in line 4 above follows since the are assumed to be independent.
Note
Let be independent normal random variables with and let be constants. If then is normally distribution with
Note
Since is has mgf For constant the random variable has mgf Then by Theorem and properties of exponents, for
But hey! This is the mgf for a normal distribution with mean and variance so we have proved the result.
Let be independent normal random variables with and for . Then is .
Note
Suppose the number of customers arriving at a particular checkout counter in an hour follows a Poisson distribution. Let record the time until the first arrival, the time between the 1st and 2nd arrival, and so on, up to the time between the st and th arrival. Then it turns out the are independent, and each is an exponential random variable with density for (and 0 else). Find the density function for the waiting time until the th customer arrives.
Well so by Theorem , But, hey! This is the mgf for a gamma random variable so by Theorem , is gamma. So for (and 0 else).
Note
If is and is and how is distributed, and what value marks the 90th percentile for ?
Theorem says that is normal with and so
The 90th percentile can be found in R with the qnorm() function:
Find the moment-generating function for and compute and .
The last integral above evaluates to 1 because it is the pdf for a distribution! After simplifying we obtain
With the mgf for a gamma random variable in hand, we can now derive its mean and variance, thus proving Theorem.
so Turning to the second derivative, so Thus,
Moment generating function
Moment generating function properties:
mgf Theorems
Let be random variables with moment-generating functions
If for all t in some open interval about 0, then and have the same distribution
If , then
If are independent and (where are real numbers), then
Suppose are independent normal random variables with means and variances . If (where are real numbers), then Y is normally distributed with mean and variance
Moment
Moment
Uncentered
Centered
1st
2nd
3rd
4th
Skewness(X) =
Kurtosis(X) =
Variate Transformations
Transformations and Expectations
Distributions of Functions of a Random Variable
If X is a random variable with cdf , then any function of X, say g(X), is also a random variable. We set Y=g(X), then for any set A
Formally, if we write y = g(x), the function g(x) defines a mapping from the original sample space of X, , to a new sample space, , the sample space of the random variable Y. That is,
We associate with g an inverse mapping, denoted by ,
If the random variable Y is now defined by Y = g(X), we can write for any set ,
If Y is a discrete random variable, the pmf for Y is
It’s easiest to deal with function g(x) that are monotone, that is those that satisfy either increasing or decreasing. It the transformation x –> g(x) is monotone, then it is one-to-one and onto from .
Theorem 2.1.3
Let X have cdf , let Y = g(X), and let , .
If g is an increasing function on ,
If g is a decreasing function on and X is a continuous random variable,
Theorem 2.1.5
Let X have pdf and let , where g is a monotone function. Let , . Suppose that is continuous on and that has a continuous derivative on . THen the pdf of Y is given by