The independent variable is the one that does not change depending on other variables - so here it would be the presence or the absence of caffeine - this is dependent on Tina's actions, but not on other variables in the experiment. The dependent variable is the heart rate - it is assumed to depend on the presence or absence of caffeine. A hypothesis could be that "Caffeine causes an increase of heart rate in earthworms" - and this hypothesis is what the experiment is testing.