# When analyzing data from an experiment, is each $x_i$ a random variable?

When we perform one experiment we have to measure several quantities and take some number of measurements for each of them. Those quantities can be things like positions, instants of time, and so forth.

The point is that we usually end up with a list of measurements $x_1,\dots,x_n$, being $n$ the number of measurements we made.

The important thing is: each $x_i$ corresponds actually to the same thing being measured. It is just that we measure the same thing several times and write down the values.

Once we have this list of measurements we take means, compute standard deviations and so on.

Now, when I asked this question on the answer it was said that when we make the measurements, each $x_i$ is a random variable and the mean is actually another random variable.

I didn't understand that. In truth, my understanding of random variables is quite limited (all I remember of what I once studied on the topic is that random variables are functions defined in a probability space).

Now, I've always thought that on one experiment there was actually just one random variable $x$ which is a discrete random variable with possible values $x_i$ being the values we measured.

But now I see I was wrong all along and each $x_i$ is a random variable. But still, $x_i$ is a measured value, so it should be a number!

I'm quite confused with all of this. What I want to know is: why in one experiment, when we measure $x_1,\dots,x_n$ values of the same quantity, each $x_i$ is itself a random varaible? What is the correct way to reason about this?

In probability and statistics, a "random variable" is basically a quantity which can take on different values. It's like any other variable in physics: position $\vec x$, mass $m$, angular momentum $\vec{J}$, etc., except that instead of possibly assigning a value to the variable as you might do in a theoretical problem, you get the value from a measurement or some other random process.

The individual values are samples, not variables in their own right.

So if $\{x_i\}$ (this means "the set of $x_i$ for all $i$") represents different values of the same measurement, then $x$ is the random variable, and each $x_i$ is a sample value, not a random variable itself. If someone said otherwise, they were wrong, according to the definitions I've described.

However, do keep in mind that people are generally sloppy with terminology, and someone else may not be using the term "random variable" in the same way I am here.

why in one experiment, when we measure x1,…,xnx1,…,xn values of the same quantity, each xixi is itself a random varaible?

Each time you measure something, your measurement result will be the sum of the actual value plus some error term.

$$x_i = x + \epsilon_i$$

Depending on the nature of the measurement, it could be a good model that the $\epsilon_i$ are (samples of a1) random variable with some distribution. Thus the sum of the error with some fixed number ($x$) is also a random variable.

1Thanks to DavidZ for pointing out the terminological nuance,

In theory if you took a very, very large number of readings you would get what is called a population mean.

The word "random" in this context means that when you take a reading you do not know exactly where from within the population of possible readings your value is, that is, you do not know how close or far your reading is from the population mean.
So all values are possible although values within a certain range of values might be more probable than values within another range; it is more likely that you measure a value which is closer to the population mean than one which is further away from the population mean.
An individual reading is a random variable.

Now instead of taking one reading you decide to take 10 readings (the sample) and find the mean of those ten readings which is called the sample mean.
Each of those ten readings was chosen at random from the population and hence it must follow that the mean of those 10 readings chosen at random must also be random.
However it is more likely that you find a sample mean which is close to the population mean than one which is further away from the population mean.
A sample mean is a random variable.

• I think you missed a word there: "very, very number". Also "i.e." – David Z Sep 2 '16 at 12:41