5
$\begingroup$

My friend told me to use Levene's test to check the assumption of homoskedasticity before applying the two sample t-test. I think most people that use linear models don't do that. They check the residual plot to eye ball it instead, and it would be enough. If you look at a two sample t-test as a kind of linear model then you would not check for homoskedasticity by Levene's test.

Why do we need to check only before a t-test or Anova?

I appreciate advice with theoretical reasons.

$\endgroup$
3
  • $\begingroup$ Your friend is indeed right. The distribution of the t-test depends on whether variances are equal or not and known or not. $\endgroup$
    – utobi
    Commented Dec 3, 2016 at 12:32
  • 4
    $\begingroup$ If you use Levene's test and based on its results you decide whether to use or not the two samples t-test, you're effectively running a composite test of unknown properties. The Type I-II error rates may not be what you expect from theory. $\endgroup$
    – DeltaIV
    Commented Dec 3, 2016 at 13:15
  • $\begingroup$ I know it depends on the outcome of Levene's test if you do Welch's t-test. But you would not do Levene's before multiple linear regression. I am asking why you do not check Levene's test before multiple regression. $\endgroup$
    – oneko
    Commented Dec 3, 2016 at 13:23

1 Answer 1

10
$\begingroup$

Regardless of the good points made in the comments above about whether you condition your testing procedure on the results of preliminary investigation (e.g. choosing Welch vs. standard t-tests based on the outcome of Levene's test) I suspect that the reason for this difference between ANOVA/t-test (i.e., linear models where all of the predictors are categorical) and other linear models such as regression, ANCOVA, etc. (i.e., linear models with at least one continuous predictor) is that questions of heteroscedasticity etc. apply to the conditional distribution of the data, i.e. the distribution of the $\epsilon$ in $y=\beta_0 + \beta_1 x + \ldots + \epsilon$.

  • if you have all-categorical predictors, you can test for heteroscedasticity (and other issues such as non-Normality) by dividing the data into unique combinations of categories (i.e., in the t-test, compare the variability in each group).
  • if you have continuous predictors, then the only way to test the conditional distribution is to fit the model first, then evaluate the distribution of the residuals. Furthermore, even after you have the residuals, there generally aren't discrete groups in the data to which you could apply Levene's test.
$\endgroup$
1
  • 1
    $\begingroup$ Thank you. I understand if you do Levene's test or not depends on if predictors have continuous variables or all discrete variables. Since F-test is comparing the chi-squared statistics of within variability and between variability of different levels, calculation of residuals cannot be done for continuous variables beforehand. But still I am not convinced. Same manner should apply for t-test if you do not check Levene's for model with continuous variable. But thank you answering. $\endgroup$
    – oneko
    Commented Dec 4, 2016 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.