Measure theory in practice

I am trying to unite my knowledge of statistics and measure theory by considering the following example.

Suppose we have a measurable space $(\Omega_1,B_1)$ and a random variable (measurable function) on the space, call it $X$: $\Omega_1 \rightarrow R$.

Suppose we know the distribution function of $X$, say it is normal $X \sim N(0,1)$. Now consider the random variable $$Y=X +5$$

We know from basic statistics that $Y\sim (5,1)$, but how can we prove that by using the definition of $X$ and composition of functions? Explanations that are step by step greatly appreciated!

In order to properly speak of a random variable's distribution, you need a measure space (with a measure), and specifically a probability space $(\Omega, \mathscr A, \mathbb P)$, where of course $\mathbb P (\Omega) = 1$.

The distribution of a random variable $X$ is the image measure $X(\mathbb P)$, i.e.

$$X(\mathbb P)(A) :=\mathbb P(X^{-1}(A)) \quad \text{for }A\in\mathscr A,$$

Outside of the measure-theory context, I first encountered this as the 'cumulative distribution function' of a random variable, i.e. the function that gives the probability of $X$ being less than or equal to $x$:

$$F_X(x) = \mathbb P (X \leq x) = \mathbb P \left(X^{-1} (-\infty, x]\right).$$

You may recognise $(-\infty, x]$ as being the sets that generate the Borel sets on $\mathbb R$.

A random variable has normal distribution $N(0,1)$ when this image measure is given by:

$$X(\mathbb P)(A) = \int_A e^{-x^2/2} \, \mathrm \lambda(\mathrm dx),$$

where $\lambda$ is the one dimensional Lebesgue-measure. Phrased in less measure-theory heavy terms,

$$F_X(x) = \int_{-\infty}^x e^{t^2/2} \, \mathrm dt.$$

If $Y = X+5$, then we have $Y(\mathbb P)(A)=X(\mathbb P)(A-5)$, giving

$$Y(\mathbb P)(A) = \int_{A-5} e^{x^2/2} \, \lambda(\mathrm dx)\\ =\int_A e^{(x-5)^2/2} \, \lambda(\mathrm dx),$$

which is the definition of $Y$ having $N(5,1)$ distribution. Here we used the fact that $x \mapsto x +5$ is measurable (because it is continuous) to justify the last step.

As S. van Nigtevecht says, when you say $X\sim N(0,1)$ you are saying there is a probability measure added to the setup, so we have in all a measure space $(\Omega, B, P)$, and a pair of functions $X$ and $Y$ such that $Y(\omega)=X(\omega)+5$ for all $\omega\in\Omega$. If you want, $Y$ is the composition of $X$ with the "add to 5" function. We also know also that $P(\{\omega: X(\omega)\le a\})=\int_{-\infty}^a \phi(t)\,dt$, where $\phi$ is the $N(0,1)$ density function. So $Y^{-1}([-\infty,x]) = X^{-1}([-\infty,x+5]),$ and $$P(Y\le x) = P(X\le x+5 ) = P(\{\omega: X(\omega)\le x+5\}) = \int_{-\infty}^{x+5}\phi(t)\,dt$$ and so on. (I have dropped the subscript $1$ here & there.)

Is this what you want?

As other have mentioned, you first need a probability measure on $\Omega_1$. The statement $Z \sim N(\mu,\sigma^2)$ can then be defined as saying that for any bounded measurable function $\phi: \Bbb R \to \Bbb R$, we have that $$E[\phi(Z)] = (2\pi \sigma)^{-1/2}\int_{\Bbb R} \phi(z)e^{-(z-\mu)^2/(2\sigma^2)}dz$$ or in simpler terms, the density of $Z$ (more technically the Radon-Nikodym derivative of the law of $Z$ with respect to Lebesgue measure) is a multiple of $e^{-(z-\mu)^2/(2\sigma^2)}$.

Now let $X \sim N(0,1)$ and $Y:=X+5$. Given any bounded measurable $\phi$ we define $\psi(x):=\phi(x+5)$ and we find that $$E[\phi(Y)] = E[\psi(X)] = c\int_{\Bbb R} \psi(x)e^{-x^2/2}dx = c\int_{\Bbb R} \phi(x+5)e^{-x^2/2}dx=c\int_{\Bbb R} \phi(y)e^{-(y-5)^2/2}dy$$ where $c= (2\pi)^{-1/2}$. This shows that the density of $Y$ is $e^{-(y-5)^2/2}$, or in other words, $Y \sim N(5,1)$.