Is logistic regression an alternative to t-test? The analysis I am dealing with consists in determining whether some gene is differentially expressed between two groups of people. To this end, 20 people from each group were sampled and the expression of the gene was measured on each person. Let's assume that the expression follows a normal distribution within each group.

*

*Analysis 1: t-test with gene expression as response;

*Analysis 2: Logistic regression with group as binary response and gene expression as explanatory variable.

Are both analyses valid? Is one of them more appropriate?

The t-test will treat the group memberships as fixed and the gene expression as random. The logistic regression has the group memberships as random variable to be "explained" from the gene expression. But if I understand the design correctly, you have chosen 20 people from each group based on known group membership, so the group should not be treated as random outcome. Therefore the logistic regression seems inappropriate.
Responding to some comments, it seems that despite my objection against logistic regression for such data, in a (maybe not small) number of case-control studies it is applied in this way. I'd insist that (in a situation as given here, where the number of observations in the two groups, i.e., the number of regression outcomes taking a certain value, is fixed in advance) this is problematic, as even if such outcomes are treated as random (which is already questionable but may not cause problems with the results), they can't be independent. I don't know the literature enough to know whether this is discussed somewhere - it could be seen as acceptable if somebody has shown that potential bias introduced in this way is (maybe under some conditions) negligible. Surely I accept that logistic regression does something that is roughly in line with what is required in such case-control studies, and will therefore likely produce results that point in the right direction (if there is a true and clear enough "right direction").
