# Thread: Linear Regression Models (1)

1. ## Linear Regression Models (1)

1) "In regression models, there are two types of variables:
X = independent variable
Y = dependent variable
Y is modeled as random.
X is sometimes modeled as random and sometimes it has fixed value for each observation."
I don't understand the meaning of the last line. When is X random? When is X fixed? Can anyone illustrate each case with a quick example?

β
ε

note: also under discussion in "Talk Stats Forum" & "SOS math cyberboard"

2. In design of experiments, these two are called the fixed effects model and the random effects model.
Most tests in regressoin are the same, but NOT all are.
It really comes down to whether or not you're tying to make an inference about all x's and in that case you're randomly picking a subset of those x's. In the fixed case, you selct which x's you want BUT you cannot make any inferences about the x's you did not select, because you didn't randomly pick the x-values.

3. 1) For example, if we have height v.s. age (Y v.s. X), is X fixed or random?

I can't understand how the INDEPENDENT VARIABLE X can possibly be random, can you please provide an example?

Thank you!

4. 2) If X is FIXED, does this ALWAYS imply that X and Y are INDEPENDENT and E(Y)=E(Y|X=x)?? Why or why not?

For simple linear regression model, we typically write Y= β0 + β1*X + ε as
E(Y) = β0 + β1*X
However, I have seen occasionally that Y= β0 + β1*X + ε is written as
E(Y|X) = β0 + β1*X which looks a bit inconsistent to the above...how come?