The example in that question, the age of Roger is the independent variable. This means that the variable left is granola bars. This make it the dependent variable since it depends on the age of Roger.
The age does not depend on the amount of granola bars eaten by Roger but the amount of granola bars may depend with age of Roger.