> Home > Statistics Notes > Probability > Transformed Random Variables

## Transformed random variables

Suppose that I have a binomial random variable X, which as always tells us the probability that we will obtain X successes in N independent Bernoulli trials.  For instance, if the number of trials is 3 and the success probability per trial is 0.6, then we can use the Binomial formula to calculate what the probability of getting 0, 1, 2, or 3 successes is.  These are the only possible outcomes of the experiment; the sample space is {0,1,2,3}.
Now suppose that I transform this random variable in some way.  For instance, suppose that I square it.  Now I have a new random variable, Y.  Whenever Xis 0, Yis 0; whenever X is 1, Y is 1; whenever X is 2, Y is 4, and whenever X is 3, Y is 9.  This goes the other way too: whenever Y is 9, X is 3; whenever Y is 4, X is 2; whenever Y is 1, X is 1, and whenever Y is 0, X is 0.  The sample space of Y is {0,1,4,9}, and for every element in the sample space of X, there is exactly one element in the sample space of Y.  If we know the value of X, then we also know the value of Y; if we know the value of Y, we know the value of X.
We know the probability distribution of X.  What can we say about the probability distribution of Y?  Note that the event "X=0" happens when, and only when, "Y=0", so the probability that Y=0 must be the same as the probability that X=0.  Similarly, the event X=1 happens when and only when Y=1, so the probability that Y=1 must be the same as the probability that X=1.  And the event X=2 happens when and only when Y=4, so the probability that Y=4 must be the same as the probability that X=2.  And finally, X=3 happens when and only when Y=9, so the probability that Y=9 must be the same as the probability that X=3.
But we know the probability that X=0, X=1, X=2, and X=3.  These came from the Binomial formula.  And so we know the probability that Y=0, Y=1, Y=4, and Y=9.  The notation P(X=x) represents the probability that the random variable X will take the particular value represented by x.  For instance, P(X=2) would represent the probability that X would equal 2.  We can summarize this information about the new random variable Y and its relation to the random variable X in this table:
 Possible value of X, called x Possible value of Y, called y P(X=x) which is P(Y=y) also 0 0 (0.4)3 1 1 3(0.6)(0.4)2 2 4 3(0.6)2 (0.4) 3 9 (0.6)3

On to the sample mean as a random variable.