2
$\begingroup$

I am trying to do a paired t-test but one of the variables is not normally distributed (vegetarian enhanced), as you can see from the boxplot.

I tried to do a log transformation but it made the p value in a Shapiro-Wilk test even smaller.

The other variable (meat enhanced) however is normally distributed.

The ratings are based on a Likert scale between 1 and 10.

What can I do in this situation?

meat    veg 

4   2.5 
6.25    8.5 
6.5 7.75    
7.25    6.25    
4.5 5.25    
5.5 3.75    
7.75    6.25    
7   1.25    
3.5 2   
7.5 8.5 
8.25    5   
5   7.5 
8.5 7.75    
9.25    4.5 
5.75    6   
9   8   
8   5.5 
4   5.5 
7.25    8.25    
5.75    8.25    
7   8.25    
6.5 6   
7.25    5.5 
3.5 8   

enter image description here

$\endgroup$
  • $\begingroup$ I think you forgot to put in the boxplot. $\endgroup$ – Peter Flom - Reinstate Monica Feb 12 '19 at 11:46
  • $\begingroup$ Apologies - thats it added now! $\endgroup$ – Holly Miller Feb 12 '19 at 11:48
  • $\begingroup$ Box plots show median, quartiles, etc., so it's not clear why you think that is relevant if you are comparing means. You seem to have meat vs vegetarian, basic vs enhanced. Which comparison is the focus of your t test? Can you post the raw data? $\endgroup$ – Nick Cox Feb 12 '19 at 11:57
  • $\begingroup$ A t-test only looks at differences across one variable, you have two. $\endgroup$ – Peter Flom - Reinstate Monica Feb 12 '19 at 11:59
  • 1
    $\begingroup$ The t-test makes an assumption on the distribution of the differences, not the data. $\endgroup$ – user2974951 Feb 12 '19 at 12:14
1
$\begingroup$

I wouldn't be worried about a standard $t$ test being especially inapplicable here. The differences are more nearly normally distributed than the original data. As noted in comments, the group distributions aren't crucial, but the distribution of the differences. (If within-group non-normality were an issue, vegetarian is slightly left-skewed, so logarithms are not the way to go at all: they would make skewness worse.)

You don't really have a large enough sample to see much here except that there isn't much agreement between meat and vegetarian, or a systematic difference either. The mean difference on scores is about 0.4 and swamped by larger individual differences of both signs.

Results from Stata, but any environment should serve.

. ttest meat == veg

Paired t test
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
    meat |      24    6.447917    .3477344    1.703544    5.728573     7.16726
     veg |      24    6.083333    .4350128    2.131119    5.183441    6.983226
---------+--------------------------------------------------------------------
    diff |      24    .3645833    .4866839    2.384254    -.642199    1.371366
------------------------------------------------------------------------------
     mean(diff) = mean(meat - veg)                                t =   0.7491
 Ho: mean(diff) = 0                              degrees of freedom =       23

 Ha: mean(diff) < 0           Ha: mean(diff) != 0           Ha: mean(diff) > 0
 Pr(T < t) = 0.7693         Pr(|T| > |t|) = 0.4614          Pr(T > t) = 0.2307

Banal moral: If differences are of interest, look at them directly. Side-by-side box plots are oversold here, as they suppress most of the information. Side-by-side histograms, etc., would not be better.

enter image description here

enter image description here

The quantile normal plots would show straight-line configurations for normal samples.

$\endgroup$
1
$\begingroup$

1) You most definitely CANNOT determine that a variable is normally distributed based on a boxplot.

2) more importantly, it's not the variables themselves that need to be normally distributed, it's the difference between the two variables, when you're doing a paired t-test. It's possible for one of the individual variables to have an arbitrary distribution while the difference is normally distributed.

3) Finally, the normality assumption of the t-test is a little overrated--in small samples you'll often have too little power to reject a null hypothesis of normality, and in larger samples, where you'll be powered to detect non-normality, the normality assumption doesn't really matter anymore because the sampling distribution of the t-statistic will be approximately normal anyway.

$\endgroup$
  • 1
    $\begingroup$ I like the spirit of 1) but it's incorrect. Sometimes, indeed quite often, a box plot will make clear that a variable isn't normally distributed. It's a lousy tool for the purpose, but it's not always completely useless. 2) and 3) are fine. $\endgroup$ – Nick Cox Feb 12 '19 at 16:19
  • $\begingroup$ @NickCox, Fair enough. How about saying that you can't conclude normality from a boxplot? $\endgroup$ – beta1_equals_beta2 Feb 12 '19 at 16:38
  • $\begingroup$ Same point. You can sometimes refute normality. You can't confirm it. $\endgroup$ – Nick Cox Feb 12 '19 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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