Independent/Dependent variables & type of statistical test

If someone is investigating differences in means between 2 groups, does it matter which we consider to be the IV and the DV? For example, can I use a t test to examine the difference in the age of children who have attained a certain developmental milestone and those who have not? Imagine the IV is milestone (Yes/no) and the DV age (mean). But clearly, the milestone does not cause the age. Is it reasonable to use a t test in this manner? Does presumption of causality matter?

And secondly, is it reasonable to switch round IVs and DVs in order to look at the data in different ways? E.g. to run some t tests with group (e.g. milestone) as the IV, and then run a logistic regression with all the continuous predictor variables (with group as the DV)?

Is there a better way to approach such analyses?

Many thanks

• A restricted version of this question is analyzed at stats.stackexchange.com/questions/66430.
– whuber
Oct 20 '14 at 18:39
• It is difficult even to conceive of what your data would look like in order for that t-test to make sense. How are you choosing the children? How can you do this in a way that meets the t-test assumptions, which include (a) the group not attaining the milestone was randomly sampled among some population of non-attaining children and (b) the groups were sampled independently? Note, too, that for the non-attainers a numerical age has a much different meaning than the ages for the attainers: a non-attainer later on could be an attainer, so the age really represents an interval bounded below.
– whuber
Oct 20 '14 at 18:47
• Thank you. This was just an example - I do not have this particular data. My understanding was that t tests are often used on non-random samples as long as the data is normally distributed? Thank you very much for the helpful answers.
– user59078
Oct 22 '14 at 8:47