# Independent Variable vs. Dependent Variable in Statistics

Following are the definitions of independent variable and dependent variable I found on the internet:

<1> In statistical modelling, the dependent variable is studied to see if and how much it varies as the independent variables vary.

<2> Independent Variable: variable that causes the variation.

<3> Dependent Variable: a variable whose variation is being studied.

Here in the table above, the YouTuber is interested to know what kind of people come to his "fantasy" restaurant: teens, young adults, and so on. And, kindly notice that the age groups are not meaningful, but rather arbitrary. Clearly, this isn't an experiment: I am not interested in any cause-effect. It's a survey. The Youtuber mentioned the "age group" as an independent variable and "the number of people who dined in his restaurant last week" as a dependent variable.

My question is for the same: in what way, is the number of people visited dependent on the age group? In other words, how to know which variable is dependent and which is independent in a survey like this?

• (1) and (2) blatantly contradict each other. Consider, for instance, a regression in which you want to estimate the amount of sunlight that was available to a plant crop based on measurements of the dry weights of samples of the plants. According to (1), the amount of sunlight is the dependent variable, but according to (2), either the plants influenced the sun or else sunlight is also the independent variable! The Internet (generically) is an unreliable source of good or clear information about statistical concepts, so beware. Reading a basic book on regression might be worth your time.
– whuber
Jul 4 at 20:11
• Please visit stats.stackexchange.com/help/merging-accounts to merge your accounts. There is no need to post your question multiple times under multiple accounts -- and it is confusing and disrespectful to those who see only one of the posts.
– whuber
Jul 4 at 20:59

Your YouTuber is wrong, and "age group" is not an independent variable" here.

These terms come from experimental studies, where the independent variable is what's manipulated by the experimenter and the the dependant variable is the outcome that (hypothetically) changes as a result. They are also sometimes used in analogous non-experimental settings, where the independent variable is not controlled by the experimenter but varies for some other reason.

For instance, if these variables were "Age Group" and "Proportion of visitors ordering Coke", you then might treat age group as the independent variable and the proportion ordering Coke as dependent, in order to test the hypothesis that there is an effect of age on drinks orders.

• "Kinds" of variables in that sense doesn't make sense for a survey. Age is just a variable. Binning it into groups and counting the values is just a way of summarising that variable.
– Eoin
Jul 4 at 20:59
• If you like you could say that "Age Group" is a categorical variable and "Number of People" is a count variable, but that's not really what you're looking for here. Context is important.
– Eoin
Jul 4 at 21:00
• So, all am I doing is summarizing the variable "age"? And, just for curiosity, is what kind of variables are: name and age, and how? Jul 4 at 21:11
• Sorry, I don't understand your second question, but the answer to your first question is yes.
– Eoin
Jul 5 at 8:59