2
$\begingroup$

I am having a hard time distinguishing random variables from their realisations. (Please note that for the sake of simplicity of my question I use discrete values in my example below.) Usually, a random variable is shown with an upper case letter such as "$\boldsymbol{X}$" and its realisations are shown with a lower case letter such as "$\boldsymbol{x}$". For instance, if the experiment is to weigh a group of five objects then the random variable $X$ will be a set of five realisations of the weight random variable. So we can write $X_1:\{x_1 = 80, x_2 = 83, x_3 = 67, x_4 = 72, x_5 = 90\}$ in Kg. (Note that I wrote $X_1$ instead of just $X$ to emphasise that this is my first random variable and other random variables will be introduced below, shortly.)

If one would like to add another random variable such as "temperature" of the weighted objects we could, simply, write that as "$X_2$". Let us assume that realisations of the temperature variable (i.e. $X_2$) are $X_2:\{x_1 = 12, x_2 = 30, x_3 = 45, x_4 = 23, x_5 = 9\}$ in Kelvin. And we could go on and add as many random variables as we would like to (e.g. $X_3$: velocity of the objects, $X_4$: colour of the objects and so on where each of the variables will have five realisations). Things are fine until we come across statements such as "If $X_1, X_2, X_3, \dots, X_n$" are $n$ random variables, we find that"

$$E[\sum_{i=1}^{n} X_i] = \sum_{i=1}^{n} E[X_i]$$

I have come across this and similar equations in different textbooks (where there is some kind of a sum over "$n$" random variables)! The problem is that (given my example above) the units of random variables do NOT match so the whole sum does not make sense! Given my interpretation of random variable, I would write the right hand side of the equation above as follows,

$$ \sum_{i=1}^{n} E[X_i] = E[X_1] + E[X_2] + E[X_3] + ... + E[X_n].$$

In my example above $n = 2$ so we only have to deal with $E[X_1]+E[X_2]$. And I run into the problem of different random variables having different units (i.e. $E[X_1]$ in Kg and $E[X_2]$ in Kelvin). There is another question relevant to mine here where my interpretation of the answer to that question is that $X_1$, $X_2, \dots, X_n$ are not random variables but realisations! But if that is the case then $E[X] = \mu$ does not make sense! How can expected value of one realisation ($X$, that is a single observation/measurement) equal to the mean of the entire population ($\mu$)? If I were to summarise my question I would ask the followings,

  • What is the difference/connection between $x_i$, $X_i$, and a vector of random variables $\boldsymbol{X}$?

  • What is the connection between random variables {$x_i, X_i, \boldsymbol{X}$} and sample mean $\overline{X}$ and population mean $\mu$?

$\endgroup$
4
  • 2
    $\begingroup$ The answer you are referring to and my comment explicitly say that they are random variables, not realizations. $\endgroup$
    – Tim
    Nov 29, 2021 at 18:36
  • 4
    $\begingroup$ Using the tickets in a box metaphor, the random variable is a consistent numerical labeling of all the tickets, whereas a realization is a single ticket. Simple, right? ;-) $\endgroup$
    – whuber
    Nov 29, 2021 at 19:44
  • 2
    $\begingroup$ BTW, when variables are incommensurable (have different units that cannot be converted), their sum is just as nonsensical and undefined as the sum of two such numbers would be, and for identical reasons. After all, the sum of random variables is defined by summing the values in each possible realizations In the answer that you reference, the quantity is "water content." It can make sense to add or average such quantities even when they apply to different types of food. $\endgroup$
    – whuber
    Nov 29, 2021 at 20:53
  • 1
    $\begingroup$ @whuber I appreciate your comment! tickets in a box metaphor certainly helped me but it, also, raised some questions for me that I will ask on that page :) $\endgroup$
    – zhuser
    Nov 30, 2021 at 11:59

2 Answers 2

4
$\begingroup$

The realization of a random variable is the value that was observed (though, as noticed in the comments, you can have random variables for non-observable things). For example, you treat the result of throwing a fair dice as a random variable $X$. Say that the result is five dots, $x=5$ is the realization. The “five objects” that you call “realizations” are all random variables that together form multivariate random variable. In this framework, it doesn’t make sense to discuss a single random variable with multiple realizations.

You can throw a dice $n$ times and treat the results as $X_1,X_2,\dots,X_n$ random variables with $n$ observed realizations accordingly. $E[X_1]$ could be an expected value of the random variable for the result of first throw $X_1$, where the realization $x_1$ would be a number, for example, $3$. So

$$ \bar X = \frac{1}{n} \sum_{i=1}^n X_i $$

is a random variable, as a function of $n$ random variables, and in

$$ \bar x = \frac{1}{n} \sum_{i=1}^n x_i $$

$\bar x$ is a realization of $\bar X$ calculated from realizations $x_i$ random variables $X_i$.

A random vector $\mathbf{X} = (X_1,X_2,\dots,X_n)$ is just a shorthand for writing them all each time.

Finally, you would see different notations used by different authors and in different contexts, so each time you need to make sure what is described rather than assuming things from notation alone.

You should probably refresh your knowledge on random variables to make things clearer. Given the multiplicity of issues mentioned by you, I'd recommend also a probability and statistics handbook or leactures.

$\endgroup$
5
  • 2
    $\begingroup$ I have some trouble with language like "what was observed" or (in other contexts) "what is known," because that would make it impossible to discuss latent-variable models, stochastic processes, and many other important situations where random variables and their realizations are involved but they are not observed or otherwise known to the analyst. $\endgroup$
    – whuber
    Nov 29, 2021 at 19:46
  • 3
    $\begingroup$ @whuber agree, but I don’t feel like it’s a good idea to go into nuances here since the question is on basic concepts. $\endgroup$
    – Tim
    Nov 29, 2021 at 20:01
  • 4
    $\begingroup$ I'm not suggesting you do that. I'm only concerned that if, at the very outset, you use terms that are unnecessarily limited in application or can lead to confusion, it will eventually lead to frustration or confusion. Moreover, when an elementary intuitive explanation doesn't hold up to such examination, that tends to indicate it's not really conveying the key idea. Nothing need be said about nuances at all--but consider offering an explanation that works even in more general situations than that immediately facing the student. $\endgroup$
    – whuber
    Nov 29, 2021 at 20:38
  • $\begingroup$ Thank you for the answer :) $\endgroup$
    – zhuser
    Dec 1, 2021 at 19:03
  • $\begingroup$ Given that $x_5 = 5$, is the mean of the sum of $x_1, .. x_5$ equal to $(5 + 4 + 3 + 2 + 1) / 5 = 3$? $\endgroup$ Apr 19, 2022 at 17:23
5
$\begingroup$

The difference is like between the value of a function $f(x)$ given its argument $x$ and the definition of a function $f()$.

You can think of a random value (rv) as a mapping from events to real numbers, quite similar to mapping that a typical function $f(x)$ represents from $x$ to some numbers. In case of a rv the argument is an event (or a set of events), and the realization is a real number that corresponds to the event that happened.

Suppose, you're forecasting rain occurrence, then you mark the rainy days with 1, and other days with 0. So, the rv here is "rainy_day" that has outcomes of 1 and 0. You collect data for a week like (0,0,1,1,0,0,0), which are realizations of "rainy_day" rv on a particular week. The rain itself is the event, to which your rv associates a real number, 0 or 1. The formal language of probability theory uses constructs on top of events, e.g. sets of events, so that the rv actually maps sets to real numbers, not teh events themselves, but you can ignore this nuance in the beginning.

$\endgroup$
1
  • 1
    $\begingroup$ @ Aksakal, thank you for the answer and the example. It was a simple and clear example :) $\endgroup$
    – zhuser
    Nov 30, 2021 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.