Discrete Distributions and Moments
Week 4
Lecture Notes
We will be covering discrete random variables this week.
A discrete random variable is one whose image is a finite/countable subset of .
First thing we introduce is the probability mass function (pmf).
It is basically the probability measure assigned to a single value:
Because of the law of total probability, the probability of all outcomes must sum to 1:
Next thing is the cumulative distribution function (cdf).
Usually use the capital F to denote this:
A simple example for a discrete random variable is that if you roll a die, the outcome of the die will give you a discrete random variable. If Iβm interested in
Another example:
We denote as the number of times we roll the die until we get the outcome 6. If weβre lucky and roll the die once to get a 6, whatβs the probability? For a fair die itβs . For the second roll, : the first roll is not 6 and the second roll is 6.
The outcome of the first roll does not affect the second roll.
More difficult one,
You can prove by induction that the formula is
This is a simple example.
I want to say a property of the cdf:
If you have is a discrete r.v., the cdf is piecewise constant and has finite/countable jumps.
If you think about cdf, itβs a probability that lies from 0 to 1.
The graph of discrete cdf is exclusive coming from the right side, so the hole is on the bottom of the jump, not the top. We accumulate in a discrete ways, which makes it like a staircase. Each piece corresponds to a constant value, and there are finite jumps.
For simplicity, we will denote the following notations:
Moments
Moments are expectations, expectations are kind of like intervals in calculus. Here we are talking about discrete random variables, so our integration is basically a summation. In the next class we are going to talk about continuous, where the integral is an integral. Integrals is approximated by the Riemann sum, and there are many techniques for evaluating them. But right now we are sticking to summations.
Letβs define the expectation, by definition 4.7.
If you have a discrete r.v. , we say is integrable if
If you map this to what you learned in calculus, this is absolute integrability. You know that if you are absolutely integrable, you are regular integrable. Why absolute value? This can take positive or negative values. If this holds, we can define expectation as
In order to help you understand this from a discrete random variable notation, you can put this in a table format.
This will be a handy tool when doing calculations.
This summation is purely rigorous.
We need the non-absolute value sum to be less, because the probability cannot be negative. Iβm not just saying that the expectation is finite. Iβm saying that the expectation is bounded by something finite. is very different from . The second one means that the value is bounded away from infinity, where is the ceiling. The first one means you can approach infinity. This is important for mathematical analysis.
Proposition 4.8 says a property of the expectation is that expectation is linear. If you learn functional analysis (calculus on functions), you understand that expectation is a linear operator. The statement is this: where and are constants in .
How do we prove this?
We want to first establish that
There are two cases. When , this is trivial because becomes 0. How do you prove for ?
We will define . From the definition of a discrete random variable, its image set must be a countable subset of . Therefore, is a discrete random variable. This implies that is countable. This is important because anything countable can be represented as a sum. is uncountable and cannot be represented by a summation.
by the simple definition of expectation.
Iβm going to factor out the , which we can do because we know
Based on our definition 4.7, we can say that this is less than infinity.
Then we can formally write down without absolute value, since itβs bounded finitely.
This might seem silly, but we need to be rigorous in math when proving things.
Now we want to prove
The proof is too long, has too much rigor, uses some techniques of interchanging the summation signs.
Second part of proposition is that if , then . If the random variable is greater than 0, then the expectation is greater than 0. The simple proof is that
If , then , where we can show that the difference is positive
Theorem 4.9 the transfer formula says that for discrete r.v., where is a measurable function, then is a r.v. and is integrable iff
In this case I can formally write down the expectation to be the sum
Examples
Here are some examples:
If we have a discrete r.v.
You multiply horizontally and add them all up.
Represented in the cases format,
For a measurable function ,
You only change the outcome, not the probability.
In this example,
.
What if we take ?
The square is a measurable function, so we can consider
We can go a little crazier and talk about
In all our examples, all of our functions are measurable. In terms of mathematical analysis, you might be interested in functions that are not measurable. But we donβt have to worry about that in our class.
Variance
The variance of a r.v. is defined to be
There is an intuitive explanation for this definition. How do you measure the variability if numbers in a set? What you do is take the expected value of the numbers in the set.
Letβs say we have a sequence
We want to measure the distance from each data point to the middle point. The distance of each variable to that middle point is what we are counting. We square them because the difference might be positive or negative, so it makes them all 0.
What happens if we donβt square it?
If you do some simple arithmetics, you can see the simple binomial expansion as
and if we apply this to our variance, we get
expected value of an expected value is the same thing because itβs just a constant
This is Jensenβs inequality, which shows the convexity of variance.
There are two operations, we take square, then expectation, and for the other, we take expectation first, then square. And this difference must be greater than or equal to 0.
Eventually, everything becomes calculus.
Definition 4.12 is of standard deviation, or std dev.
This identity is very important:
This is very convenient for our calculations. Letβs think about calculating the variance for the cases format. Assuming this format, we can represent
Thatβs it. This is the formula to use on homework. USEFUL
This has all been theoretical, abstract concepts. From now on we are going to talk about examples of discrete random variables.
We are going to go through several classes of random variables.
Discrete Uniform Distribution
The discrete uniform distribution has all the values being the same.
and pmf is given by
we denote this as
If you roll a fair die, the outcome of a die is a discrete uniform distribution. What is our cdf?
Letβs look at expected value (in general, not just for fair die)
Letβs make this clear that the image set is
Then we can determine the high school mathematics by taking the variable outside.
Now letβs look at the variance.
By the same summation property
To get the full variance we have
Bernoulli Distribution
We will denote .
The most obvious example is flipping a coin. Our expectation is very simple.
For variance, it is
Binomial Distribution
This can be thought of as the sum of independent Bernoulli random variables. We will consider our pmf as
Denote
is the combinatorial number, selecting items out of without caring about order
The formula is
The factorial is
There is a property of the factorial that
which comes from the definition of the factorial.
We will consider more generally that
This fact will become more important.
The binomial expansion formula is that
We will use this in many places.
The expectation of the binomial distribution
Letβs prove this.
We will use the technique of factoring out what we want to prove, and then showing that the rest is equal to 1. This is a common and powerful technique. By definition of choose,
Now we can factor out
We can simplify out that and rewrite our for future rearranging and rewrite our for future rearranging
Next technique will be the change of variables in summations. Wherever I see , I will change it to a dummy variable.
Weβre almost there, now we can rewrite as a choose
We can now use the binomial expansion formula here.
For variance we will use a slightly different formulation.
We will consider , which is equivalent to , because I want to cancel the factorial in a certain way., which is equivalent to , because I want to cancel the factorial in a certain way.
I can safely start from 2 because of this minus 1 Iβm using. Now letβs do some cancellations/substitutions.
Now we can divide into its factorial.
Let me take out the thing I want to prove, and use the technique. technique.
Using the technique for .
By the binomial expansion formula this is
Plugging this back into variance, we can show that
You have to cancel a few things, use a change of variable, and group the sum into the binomial expansion formula. Those are the main techniques.
Stochastic calculus is less tedious but more conceptually difficult.
We have proposition 4.22: if , , and and are independent, then their sum is binomial:
Geometric Distribution
The distribution has no cap, can go to infinity.
We can verify that this is in fact a probability distribution. We want to prove that
We can expand this summation to
Based on the geometric formula, we can show that
We will show some lemmas here, some results.
The power series is
This is calculus:
We can also show
We can start calculating the expected value now, this is from proposition 4.26
I want to make this formula into my power series. Let . Then .
.
Then we have expected value as the infinite sum of this
For variance, we will use the same intermediate value of
Take out what we want
This follows from our third power series lemma
So for our variance, we get
Poisson will be beginning of next class