# Why is $x + x = 2x$, but $X + X \neq 2X$?

At this AP central page Random Variables vs. Algebraic Variables, the author, Peter Flanagan-Hyde draws a distinction between algebraic and random variables.

In part he says

$x + x = 2x$, but $X + X \neq 2X$

-- in fact it's the subtitle of the article.

What is the basic difference between an algebraic variable and a Random Variable?

• After a thought: -1 since the question was drastically changed after it already got two answers including one that was long and detailed what makes the answers detached from the original question. Moreover, your second question asking what is random variable was already answered on this site and marked as duplicate - in response you modified this question to the closed one. – Tim Sep 20 '16 at 9:43
• In its current form (which did not change for almost a week now), this question is not a duplicate. I have voted to reopen. I hope Glen_b will undelete his answer too. – amoeba says Reinstate Monica Sep 25 '16 at 23:00

So, let’s address this question first: ''What is the basic difference between an algebraic variable and a Random Variable?''

A random variable $X$ is not at all an algebraic variable. Formally, it is defined as a function from a probability space $\Omega$ to $\mathbb R$.

OK... What that really means is that you perform random experiments (eg throwing a dice, choosing a random human), and you make measures on these experiments (eg number on dice upper face, height, sex, cholesterol level of the human). The set $\Omega$ is the set of all possible experiments. On a particular experiment $\omega\in\Omega$, you make a measure $X(\omega)$: that’s why formally it is a function from $\Omega$ to $\mathbb R$.

Now in general we totally forget about $\Omega$. The random variables are defined in term of their probability law. In the case of a fair dice, you just say

• $\mathbb P(X = k) = {1\over 6}$ for $k=1,\dots,6$ (the probability of $X$ equal to $k$ is 1/6 for $k$ from 1 to 6),

• $\mathbb P\left( \bigl\{ \omega \in \Omega \ : \ X(\omega) = k\bigr\}\right)$ (the set of dice throws on which the measure $X$ — upper face — is $k$ has probability 1/6)...

It’s simpler. You can even totally avoid bothering the students with $\Omega$.

I hope this sheds some kind of light.

Now what this guy means by $X + X \ne 2X$ isn’t that the sum of such a measure with itself is not twice this measure — unfortunately, it is what he writes. What he means is that the sum of two such measures, performed on different experiments, has not the same law than twice a measure. This could be written as $X_1 \sim X_2 \not\Rightarrow X_1 + X_2 \sim 2X_1$ (the fact that $X_1$ and $X_2$ have the same distribution does not imply that $X_1 + X_2$ has the same distribution as $2 X_1$).

• Wasn't it an answer to stats.stackexchange.com/questions/235688/… rather then this question..? – Tim Sep 19 '16 at 7:26
• @Tim, Yes that was. But, this question was posed here first. Then, I changed it again. – user366312 Sep 19 '16 at 7:54
• @anonymous but as it stands now, the answer is totally unrelated to your question while the two other answers give a direct answer to it. – Tim Sep 19 '16 at 8:00
• @Tim, I apologize for that. I raised the issue to the answerers, but they didn't respond. So, I deleted the comments and posted another question. But, now I see this answer and I accepted it. – user366312 Sep 19 '16 at 8:02
• @Tim As anonymous tells above, at the time this question was appearing here. I completed my answer, I think that if anonymous make a small change to his/her question it won’t puzzle future readers. – Elvis Sep 19 '16 at 9:56

[An earlier version of the question asked for an answer that completely avoided mathematics; this answer was an attempt to give some intuitive motivation, at a similar level to the document being asked about.]

The linked page is wrong when it says that $X+X\neq 2X$.

In the example $X$ is a random variable represents the number showing on the face of a die -- the result of an experiment like "roll a six-sided die once and record at the number on the face of the die."

So you roll a die and write down what you saw. Whatever number you would record is $X$... so $X+X$ represents the result added to itself. If you roll another die, that number you would have written down before doesn't change.

Later on the page it says:

When two dice are rolled, though, the results are different. Call the random variable that represents the outcomes of the two-dice process $T$ (for "two"). We could write $T = X + X$. This equation represents the fact that $T$ is the result of two independent instances of the random variable $T$

The very end of that quote is presumably a typographical error, they mean $X$ not $T$ there (since if it was $T$ they just said $T$ was the result of two instances of itself). But with that replacement it's still incorrect.

If you have two independent instances of the experiment (roll a die, record the number showing) you're dealing with two different random variables.

So imagine I have a red die and a blue die. Then I can say "Let the result on the red die be $X_1$ and the result on the blue die be $X_2$". Then we can follow the example at that linked page by defining $T$ to be the sum of the numbers showing on those two dice, so $T=X_1+X_2$. If the dice and the die-rolling process is fair then the distribution of $X_1$ and $X_2$ are the same, but $X_1$ and $X_2$ -- the random variables -- are distinct.

[There's an excellent discussion by whuber of random variables (and sums of them) here, and the concept of random variables is covered in slightly more detail (if in places more technical) here. I recommend you at least read the answer at the first link.]

This problem has come because the author has confused the random variable with its distribution. You can see that here:

In this case, students do think of the random variable X as representing a single, unknown value, in the same way that they think about algebraic variables. But X really refers to the distribution of possible values and the associated probabilities.

He explicitly conflates the random variable with its distribution.

In fact random variables are in many ways just like other algebraic variables and may often be manipulated in the same manner. In particular, a single univariate random variable doesn't stand for two distinct quantities (like the outcome from two different die rolls) at the same time. $X+X$ really is $2X$.

The page you linked to is flat out wrong. He writes $T = X + X$ even though he states that he is rolling two seperate independent dice. This means he should write $T = X + Y$ where $X$ and $Y$ are the results of the two dice.

Calling both $X$ is flat out wrong, as the random variable $X$ must be the realization of observing $one$ dice throw, not two or more.

For a random variable it is indeed true that $X+X=2X$