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?

If continuous $X$ can predict continuous $Y$, continuous $Y$ can predict binary $X$.  So it is OK to reverse the problem and use logistic regression.  The main disadvantages are (1) the power of this approach relative to the $t$-test needs to be further explored and (2) interpretation of parameter estimates is harder.  But on the plus side you can turn a multivariate response problem into a univariate problem using this reversal.
This approach was described by O'Brien here.  Another advantage of the approach is that it extends past comparison of mean $Y$.  If you expand (now) predictor $Y$ into a quadratic polynomial, you are able to detect differences between $Y$ groups of both the mean and the variance of $X$.  Adding a cube term would allow the skewness to vary.
There is a relation to discriminant analysis.  When assumptions of linear discriminant analysis hold, a reversed binary logistic regression has to fit.   When using quadratic discriminant analysis, a quadratic logistic regression works.
