# How to determine which variables are dependent or independent?

I'm new to this, and am struggling with the concept of how to determine what is the independent variable and what is the dependent variable.

Here's an example that I think would go a long way for me: I'm studying baseball, specifically the home run rate for all players over the course of the season. Is the player the independent variable, and the home run rate dependent on the player?

-
Look at it this way: how could you formulate the relationship in the other direction? Do you have in mind, say, a mathematical formula that will give you a player's name when you plug in their home run rate? And if you somehow succeeded in doing that, what would it tell you (that just looking up the data in a table doesn't)? –  whuber Sep 10 '12 at 19:42

There are two sides to this question: the mathematical aspect, and the causal (inferential) aspect.

In the mathematical sense, a dependent variable y is a function f of an independent variable x: $y = f(x), f \subset X \times Y$. In this sense, the set X is the set of all players, and the set Y is the set of home run rates. The function f connects the chosen player and his (or her) home run rate. However, this relation can be inversed by use of the inverse function $f^{-1}$, in the sense of $y=f(x) \Leftrightarrow x = f^{-1}(y)$

However, I understand your question as pertaining to the inferential structure. In terms of your question, what depends on what? Clearly, the home run rate depends on the player, because it is a function of some characteristics of the player - his speed, striking prowess, etc. In that sense, the data itself is imbued by a causal structure: if the player changed - say, went into heavy training or used enhancing drugs - he or she could improve performance.

Think of this in terms of a regression function y=a$_1$ X$_1$+a$_2$ X$_2$+...+a$_k$ X$_k$. The X$_i$s are the independent variables used to predict the value of y. You can think of the result for y as depending on the values of the Xs. That is why y is called the dependent variable. The X$_i$s are called the independent variables because in collecting the data we choose their values independently and look to see what we get for y. So in your example the player home run percentage is the dependent variable and the independent variables would be characteristics that the player has which would help determine whther the percentage is high, low or somewhere in the middle.