# Why is each observation in a sample considered a random variable in linear regression?

I have the following excerpt in my statistics textbook:

I am confused by the sentence: "Another way statisticians treat this model is that, assume $$X_1...X_n$$ are random variables, we make inferences conditional on their observed values."

Aren't $$X_1...X_n$$ simply observations of a random variable, $$X$$? For example let's say I have a random variable $$X$$ is a persons weight and random variable $$Y$$ is a persons blood pressure. Then $$(X_1, Y_1)$$ are an observation of those RVs. How could $$X_1$$ be a RV?

Maybe its an RV if that specific persons weight (person associated with $$X_1$$) is sampled multiple times?

• In my understanding you are correct. $X_1 \dots X_n$ are observations of random variable $X$. Mar 22, 2022 at 12:14
• Hi, there are blind and visually impaired users of this site who interact with it using screen readers. The screen readers can't handle the equation in your screenshot. Please edit the post to include the equation as LaTeX. If it helps, we have some resources on using LaTeX on Cross Validated. Mar 22, 2022 at 15:50

## 1 Answer

Aren't $$X_1...X_n$$ simply observations of a random variable, $$X$$?

NO. But this is a good question, as this certainly mystifies many ... and intuitive language such as observations of a random variable isn't really that helpful.

First, you need to understand what is a random variable, see some of the many posts discussing this:

(site search will give more). A random variable is a function. And, a mathematical function have only one value. So it does not make mathematical sense to speak of $$X_1, X_2, \dotsc, X_n$$ being different values of (or realizations of) one random variable $$X$$.

Each $$X_i$$ must be defined as a random variable itself. In terms of your example, where $$X$$ is a person's weight, and there is a sample of $$n$$ persons, then $$X_1$$ is weight of first person in sample, $$X_2$$ is weight of second person in sample, and so on.

Maybe not that central to your question, but you say confused by also

we make inferences conditional on their observed values

For that, see the following posts,

• Hi thank you for the answer. Could you maybe explain what X1...Xn could be in terms of my example of weight and blood pressure?
– Nova
Mar 22, 2022 at 20:17