Say you have a random variable, X.
Suppose g(x) = x+3 for all x. In this case, g(X) is a random variable that takes a value g(x) when X=x.
I am a bit confused with this. g(X) is a function of X, and g(x) is a function of x. What is the difference between these statements? Essentially, they say the same thing?
When you think about X, you often think about an object that symbolizes complete information about some random experiment, such as rolling a dice. When you think about x, you often think about a concrete outcome of this experiment.
Now, sometimes you want to take an existing random experiment and change it in some way. Let us denote the "change" we want to make as (g). You want to make this change in a well-defined manner, so it's better to represent it as a function.
The new experiment you have here is g(X). Now, if you want to consider the outcome x in the new experiment, you denote it as g(x).