In the previous scenario about being charged for every text message, we said that the independent variable was the number of text messages sent because we control this variable. The dependent variable, then, would have to be the total monthly bill because the total monthly bill depends on the number of text messages sent.
Deciding which is the independent and dependent variable can be tricky, so I'll tell you my secret for always getting it right. Anytime you read a scenario, just rewrite the situation as "The _________ depends on the _________." The first blank is the dependent variable (since it depends), and the second blank is the independent variable (it can be whatever you want it to be). Let's try this on the previous example.
If we were to reword the text message example, we would say "The _total bill depends on the _number of text messages ." As we predicted, the first blank (total bill) is the dependent variable, and the second blank (number of text messages) is the independent variable.