Being in a preachy mood, I'll add this:
In books that deal with applied math, the terminology used in probability theory is often ambiguous and imprecise. (In statistics, the situation is even worse!). What are we to understand when someone uses the phrase "a function of a random variable". Is such a thing a "function"? - or is it a "variable"? or is it a "random variable"? There is the famous truism: "Random variables are not random and they are not variables".
The random variable Y is not a variable if you take "variable" to mean a symbol that represents a number. We abuse terminology when we say things like "Suppose the random variable Y is 3". What we should say is that "Suppose a realization of the random variable Y is 3". A random variable is not a particular realization, even if we think of that realization as being "unknown". The way to completely specify a random variable is to specify its distribution, so we might think of a"random variable" as simply being the distribution. However, when you must talk about two random variables that are related, you have to worry about the joint distribution. Anyway, the basic idea is that a random variable is just the information in some probability distributions.
Taking for granted that we know the meaning of "function", such as the function g(x) = x^2, we can use a "function" to define a random variable Y in terms of another random variable X. We can define Y as Y = g(X). However, Y is not the "function" g(x) even though it seems to make sense to say that "Y is a function of X". Saying that "Y = g(X) is a function of X" conveys the non-technical idea that Y is defined in terms of X using g(x). But technically, Y is not the function g(X) in the sense of being a mapping whose ordered pairs are of the form (x, g(x)). Y is a random variable. A random variable is essentially a function, but that function is its distribution. The distribution of Y is not g().
Liberal arts students are taught to analyze the meaning of phrases by analyzing the meaning of each word in the phrase. In mathematics, this often does not work. A spedific "random variable" is not "random" because it is defined by a specific distribution. It is not a "variable" if you mean a "variable" to be a symbol representing an unknown number. Mathematical definitions deal with the equivalence of two statements. There is no guarantee that you can break down a statement in a mathematical definiton into its component words and give each isolated word a specific interpretation. For example, the definition of "The limit of f(x) as x approaches a = L" does not define "approaches" nor does it define "x approaches a". Only the entire statement has a definition. When we say "the definition of limit", we arent' really talking about a definition of the single word "limit". We are using sloppy language to refer to a definition for a complete statement.