Random Variables

Tags

What is a random variable?

A random variable XX is nothing more than a tuple containing p(x)p(x) distribution, and a range χ\chi. This xx in p(x)p(x) indexes into χ\chi, but that’s only an indexing property. So…as long as you have some set χ\chi and a valid probability distribution with the same cardinality, you’ve got yourself a random variable.

If XX has more than one variable, it is a joint distribution. When we express things like P(X)P(X), we are now talking about a distribution because XX isn’t an event. Therefore, we can also write stuff like P(XY)P(X | Y), which is a conditional probability distribution over two random variables. The chain rule and Bayes rule still applies

PMF, CDF, and PDF

The formal definition of density

So for continuous RV’s , we have the notion of density f(x)f(x). When defining the density, we always do it in terms of the CDF FF.

f(x)=ddxF(x)f(x) = \frac{d}{dx}F(x)

so this is a great first step when you’re dealing with proofs with density. And of course, remember that

F(x)=p(k<x)F(x) = p(k < x)

and you can apply functions inside the pp, like p(ϕ(k)<x)p(k<ϕ1(x))p(\phi(k) < x) → p(k < \phi^{-1}(x)).

Same RV, same parameters

Here’s a critical distinction. When we talk about some RV XX, it has an identity as well as parameters. If we set Y=XY = X, this means that every sample of YY is the same as XX.

However, there’s also the notion of sufficient statistics. If we have p(Y=y)=P(X=y)p(Y = y) = P(X = y), then we have the same distribution, but the identity of X,YX, Y are not the same. As a consequence, if you draw a sample from X, it may not be the same as the sample from Y.

Distributions over likelihoods

So XX is a random variable, and p(X)p(X) is also a random variable. This is because pp is just a function that takes in something and outputs a number between 0 and 1. Therefore, p(X)p(X) is feeding the sample back into its own likelihood fuction. This is perfectly valid, and in fact, this is exactly what entropy does! E[log1/p(X)]E[\log 1/p(X)].