# What do these definitions have to do with random variables?

(This is a full rewrite of the original question I asked. The original was very poorly phrased - I'm hoping this rewrite gets at the central question more directly.)

(Take two of the rewrite because I am bad at expressing myself.)

A random variable is defined as a map $$X : \Omega \to E$$ from a sample space $$\Omega$$ to a measurable space $$E$$. I mostly get the concrete definition. But I'm really struggling to understand how random variables are related to the ways they get used.

For instance, the textbook I'm referencing (All Of Statistics) has a section titled "Some Important Continuous Random Variables", with entries like

The Uniform Distribution: $$X$$ has a $$\text{Uniform}(a,b)$$ distribution, written $$X \sim \text{Uniform}(a,b)$$, if

$$f(x) = \begin{cases}\frac{1}{b-a} & \text{for } x \in [a,b]\\0&\text{otherwise}\end{cases}$$

I don't see the connection to random variables. Isn't this just defining a distribution where the sample space is $$\mathbb{R}$$?

Or take the cumulative distribution function. The book describes

Given a random variable $$X$$, we define the cumulative distribution function (or distribution function) as follows.

2.5 Definition. The cumulative distribution function, or CDF, is the function $$F_X:\mathbb{R} \to [0,1]$$ defined by

$$F_X(x) = \mathbb{P}(X \leq x).$$

Why does this definition invoke the concept of a random variable? I see $$X$$ getting used to define a particular event, namely $$X \leq x$$, but that's just an event. We can define events without resorting to measurable maps. It seems like we are again just talking about a specific feature of probability spaces over $$\mathbb{R}$$.

Or how about the definition of expected value

The mean, or expectation, of a random variable $$X$$ is the average value of $$X$$.

3.1 Definition. The expected value, or mean, or first moment, of $$X$$ is defined to be

$$\mathbb{E}(X) = \int x dF(x) = \begin{cases}\sum_x xf(x) & \text{if } X \text{ is discrete}\\\int xf(x)dx&\text{if } X \text{ is continuous}\end{cases}$$

Again, this seems intuitively to me like a property shared by any distribution over the real numbers. What has this got to do with random variables?

There is a common thread here. A number of things defined over random variables seem like they don't have anything to do with random variables. A lot of the times I see the words "random variable" all I'm greeted with is something that looks to me like a probability distribution over $$\mathbb{R}$$. I can see how you could use a random variable with range $$\mathbb{R}$$ to obtain a distribution over the reals from some other distribution. All these statements certainly apply to such an induced distribution. But it seems these statements apply to any distribution on $$\mathbb{R}$$, regardless of whether we got it by passing through a random variable or by directly defining the distribution manually.

What am I missing? Is there a reason we have to invoke the concept of a random variable for all these definitions? What parts of the definitions fail if we are only talking about a distribution over $$\mathbb{R}$$?

(Edit, one more try at explaining my question)

For an even more concrete example of what I'm talking about, suppose I define a distribution $$D$$ in the following way. I take the sample space to be $$\mathbb{R}$$. We use standard Borel sets of $$\mathbb{R}$$ to determine the class of events. And we define probability measure $$P$$ on the space of events by

$$P(E) = \begin{cases}1 & 1 \in E \\ 0 & \text{Otherwise}\end{cases}$$

I believe everything up until this point is standard. And I haven't used and RVs to define this distribution $$D$$.

Nevertheless it seems to me that, by virtue of $$D$$ being defined over a sample space $$R$$, it has a sensible notion of expectation. In particular the expected value for $$D$$ is 0. Likewise it has a sensible notion of CDF. In particular it is the Heaviside step function.

Perhaps the use of expectation and CDF are confusing here, so I'll call these expectation' and CDF'. The same concepts, but defined without reference to random variables and instead applying to all distributions over the reals.

Are expectation' and CDF' mathematically coherent? I think they are nonstandard, but is there a reason we couldn't define expectation' and CDF' in such a way that my analysis here makes sense? Or am I implicitly invoking something about RVs without noticing?

• Real-valued random variables map into the reals, but the image of a random variable doesn't need to be a set of numbers at all. Commented Apr 22 at 1:07
• Projections have a lot of applications, but why limit random variables to projections? Commented Apr 22 at 1:07
• @Galen I'm a way outside my expertise, but a RV always maps into a measurable set, right? I was using the reals as an example of measurable set because that is how the textbook I'm using defines random variable, but if you'd like you could substitute "measurable set" in the place of "reals" and "random measurement" for "random number" and "measurable projection" for "numeric projection". Commented Apr 22 at 1:40
• Also re:projections I might be using nonsense terminology. I don't mean projection in any formal sense, just in the sense that a random variable "projects" a distribution on some sample space into a distribution on a measurable space. Commented Apr 22 at 1:44
• Fair enough. I do recommend using formal definitions. It greatly clarifies communication. Perhaps what you're referring to as projection is the notion of a pushforward measure. Commented Apr 22 at 2:54

Gandering at the comments and your post, there seems to be a huge set of confusion and misleading usage of terms like "measurable distributions don't change...", "$$\Omega$$ is measurable" (which, while not wrong, isn't used in correct context) etc. Two comments, particularly, by whuber and Galen should have provided the necessary insight.

Nevertheless, let us go back and see formally what the definitions are.

Let $$(\Omega, \boldsymbol{ \mathfrak A}, \mathbf P)$$ be a probability space. Let $$(\Omega^\prime, \boldsymbol{ \mathfrak A^\prime})$$ be another measure space. A measurable map $$X:\Omega\to\Omega'$$ is a random element; it is when $$(\Omega^\prime, \boldsymbol{ \mathfrak A^\prime}) = (\mathbb R, \boldsymbol{ \mathfrak B}_\mathbb R),$$ we call $$X$$ a random variable. It is this later space, the whole discussion revolves around and the underlying probability space $$(\Omega, \boldsymbol{ \mathfrak A})$$ isn't of considerable interest (but not at all irrelevant).

The cumulative distribution function is defined based on the probability measure induced by the random variable $$X,$$ that is,

$$\mathrm F_X(x) :=\mathbf P_X((-\infty,x])=\mathbf P(X^{-1}(-\infty,x]),~~\forall x\in\mathbb R;$$

here $$\mathbf P_X$$ is the Lebesgue-Stieltjes measure determined by $$\mathrm F_X$$ on $$\mathbb R,$$ namely $$\mu_{\mathrm F_X}$$ (cf. $$\rm[I, ~Def. 22.5]$$).

Now assume $$\mathrm F_X$$ is absolutely continuous on $$\mathbb R.$$ Then $$\mu_{\mathrm F_X}$$ is absolutely continuous with respect to the Lebesgue measure $$\lambda$$ on $$\boldsymbol{ \mathfrak B}_\mathbb R$$ (cf. $$\rm[I, ~Th. 22.21]$$) and the corresponding RN derivative is $${\mathrm F^\prime_X}=: f_X,$$ the density of the random variable $$X$$ (cf. $$\rm[I, ~Th. 22.22]$$).

Expectation of a real-valued $$\boldsymbol{ \mathfrak B}_\mathbb R$$–measurable function $$g$$ of random variable $$X$$ is defined by $$\mathbf E[g\circ X]:=\int_\Omega (g\circ X) (\omega) ~\mathbf P(\mathrm d\omega) ;$$ by integration of image measure (cf. $$\rm[I, ~Th.~9.34]$$), we have

\begin{align}\mathbf E[g\circ X]&=\int_\mathbb R g (y) ~\mathbf P_X(\mathrm dy)\\&=\int_\mathbb R g (y) ~\mu_{\mathrm F_X}(\mathrm dy)\\&=: \int_\mathbb R g (y) ~\mathrm F_X(\mathrm dy)\tag 1\label 1,\end{align} which is the Lebesgue-Stieltjes integral of $$g$$ with respect to $$\mathrm F_X.$$

By the assumption of absolute continuity of $$\mathrm F_X$$ on $$\mathbb R,$$ we can write $$\eqref 1$$ as (cf. $$\rm[I, ~Prop. 22.23]$$)

\begin{align}\mathbf E[g\circ X]=\int_\mathbb R g (y) f_X(y) ~\lambda(\mathrm dy).\tag 2\end{align}

The random variable $$X$$ dictates what its expectation would be and its other properties, via the induced probability measure $$\mathbf P_X.$$

--

## Reference:

$$\rm [I]$$ Real Analysis: Theory of Measure and Integration, J. Yeh, World Scientific, $$2014.$$

• Ok so if I'm getting you we might have our underlying space $(\Omega,\boldsymbol{\mathfrak A},\mathbf P)$ and a random variable $X:\Omega\to\mathbb{R}$. Using $X$ we can induce a distribution on $R$ from the underlying space to get a new space $(\mathbb{R},\boldsymbol{\mathfrak A'},\mathbf P_X)$. It is over this new space where expectation and CDF and so on are defined. But why go through an RV at all? Wouldn't EV and CDF etc be defined for any $(\mathbb{R},\boldsymbol{\mathfrak A'},\mathbf P)$, regardless of how $\mathbf P$ was generated? Commented Apr 23 at 18:22
• EV (I am assuming it stands for expected value) and cdf are defined for random variable and not a probability space. The former is the integral of a measurable function $\int_\Omega X(\omega) ~\mathbf P(\mathrm d\omega)$ while cdf is defined in terms of the push forward measure $\mathbf P_X$ (note carefully the former is defined on the underlying probability space and the latter is defined on the space $X$ takes values on). Commented Apr 23 at 19:47
• Sorry, I realize I'm being unclear. I get that CDF and expectation are defined on random variables. I'm wondering if you could define similar concepts for distributions themselves? For example it seems like we could compute something quite a lot like the CDF for any distribution $D$ over $R$ using $F_D(x) := \mathbf P_D((-\infty,x])$. This is clearly not the CDF because it has nothing to say about RVs, but it seems quite similar to the CDF. Am I implicitly using RVs without realizing it? Or perhaps this isn't well defined? Or is my pseudo-CDF fully acceptable mathematically, just irrelevant? Commented Apr 24 at 1:27
• Exactly. You answered it yourself. You are implicitly using a random variable $X\sim D.$ Commented Apr 24 at 2:23
• Perhaps take a pause. Read again. Ponder over it. At least, you are unfolding things in the right direction. Commented Apr 24 at 5:29