# Random variable (What is the meaning of a $g(X)$ ?)

I am readin Ross's "A first course in probability" and I got to the chapter that talks about random variables.

I am tryng to understand the exact meaning of something of the form $g(X)$ where g is a real valued function and X is a r.v.

I can't figure the "form" of g, that is, I don't understand what to write in $g: ?\to ??$.

I saw an example that made me think $g:\mathbb{R}\to\mathbb{R}$, is this correct ?

-
You are right, $g$ would be a function from the reals to the reals, although it could be also on other sets and to other sets. But if $X$ is itself from $\Omega \to \mathbb{R}$, $g$ would need to be from $\mathbb{R}$. –  Raskolnikov Apr 23 '12 at 9:27

Some textbooks have the following framework. If $(\Omega,\mathscr{M},\mu)$ is a probability space and $X:\Omega\to\mathbb{R}$ is a r.v. (i.e., $\mu$-measurable function) and $g:\mathbb{R}\to\mathbb{R}$ (e.g. a continuous function), then $g(X):\Omega\to\mathbb{R}$ is a r.v. which is attained by the composition of $X$ and $g$, i.e. $g\circ X$.
why continuous ? by definition ? I don't see why if $g$ is not continuous $g(x)$ is not a r.v ... –  Belgi Apr 23 '12 at 9:30
You usually need to consider something from $g$ in order for $g(X)$ to be $\mu$-measurable. If $g$ is continuous, then $g(X)$ will be $\mu$-measurable function aswell, i.e. a random variable. –  Thomas E. Apr 23 '12 at 9:31
Here's small explanation. In this case, $g(X)$ is $\mu$-measurable if the preimage $g(X)^{-1}(U)=X^{-1}(g^{-1}(U))$ is $\mu$-measurable for all open $U\subset \mathbb{R}$. If $g^{-1}(U)$ is open, (which would require continuity), then the measurability of $X$ implies that $g(X)$ is measurable. Unless we know anything about $g$, then we don't know anything about $g^{-1}(U)$. –  Thomas E. Apr 23 '12 at 9:39
You could also merely ask $g$ to be measurable wrt. the Borel algebra. –  Najib Idrissi Apr 23 '12 at 10:04