The t-test assumes the data is approximately normally distributed. With a sample size of 40, the Central Limit Theorem begins to apply. This theorem states that the sampling distribution of the mean will be approximately normally distributed, even if the underlying population isn't perfectly normal, *provided the sample size is sufficiently large*. 40 is generally considered large enough for the Central Limit Theorem to provide a reasonable approximation, especially if the population distribution isn't drastically skewed or has extreme outliers.
However, if your sample of 40 shows strong evidence of non-normality (e.g., significant skewness or kurtosis), you might consider:
* Transforming your data: Applying a transformation (like a log transformation) can sometimes make the data more normally distributed.
* Using a non-parametric test: Non-parametric tests, like the Wilcoxon signed-rank test or the Mann-Whitney U test (depending on your specific test type), don't assume normality and can be used as an alternative.
In short: A t-test with a sample size of 40 is often acceptable, but you should always check your data for normality. If normality is seriously violated, consider the alternatives mentioned above.