0
$\begingroup$

I have data of 8 temperature points inside and 8 temperature points outside a city. What is the correct way to test whether there is a significant difference between the two groups of data?

Inside      
2.622213186
4.252151239
2.234700412
4.030813475
4.032630189
0.227646957
3.73592274
2.672609685

Outside
0.018780348
0.297691408
1.860159406
0.231511111
0.709386729
0.311395076
NaN
0.09834741
$\endgroup$
  • 2
    $\begingroup$ Are they matched, e.g. Pairs inside / outside on same day? $\endgroup$ – Björn Mar 21 '18 at 11:37
  • 2
    $\begingroup$ You have an amazingly precise thermometer. $\endgroup$ – whuber Mar 21 '18 at 13:31
  • $\begingroup$ user20637 took your question in a typical NHST way: (S)He answered the question whether the difference was significantly different from $0$, not whether the true difference is significant in the usualy sense of the term. It depends totally on why you are interested in the difference: How large would a difference have to be four you to call it "significant"? $\endgroup$ – Bernhard Mar 21 '18 at 13:43
  • $\begingroup$ There are 8 points in each group, each corresponding to 8 compass point directions. Does this mean paired t test is most appropriate? $\endgroup$ – Kieran Craddock Mar 21 '18 at 15:08
  • $\begingroup$ @Bernhard: I did say "If ... you really, really want a null hypothesis significance test" and referred to the inter ocular trauma test (which doesn't originate with me). I, too, dislike NHSTs. I like the term "substantial" to mean practically significant. $\endgroup$ – user20637 Mar 21 '18 at 20:20
3
$\begingroup$

If you're not satisfied by the "inter ocular trauma test" (a difference that hits you between the eyes) and you really, really want a null hypothesis significance test then you'll have to handle the fact that, although the data isn't very far from Normal (within groups), the variance is far from homogenous. enter image description here

The missing value for Outside (NaN) suggests that the data is paired, else you wouldn't have included it. We could look at 'Inside - Outside' but the missing value reduces us to 7 cases. The difference isn't very far from Normalenter image description here

so I'd be reasonably happy with a one-sample T-test of the null hypothesis that the difference is zero (this is identical to a paired T-test).

enter image description here

If you want to use all the data you'll have to ignore any pairing. To overcome the non-homogenous variance I'd use a non-parametric test, e.g. enter image description here


Edited to add: @Bernhard correctly commented that Wilcoxon's signed rank test is the common non-parametric alternative to the paired T-test. For completeness, here is that test with confidence interval. Because it's paired it only uses 7 pairs. enter image description here
Edited to add: @KieranCraddock commented "There are 8 points in each group, each corresponding to 8 compass point directions. Does this mean paired t test is most appropriate?"

On consideration, OH DEAR!!! This may invalidate any statistical significance test. Such tests assume that the observations are random, independent, samples from a population. If that were the case a single observation would consist of two values, one inside one outside. We have 8 observations (one has a missing value) and we might chart the data like this. enter image description here

But you say the pairs aren't random, they correspond to compass point directions. Arbitrarily assigning compass points we might then chart the data like this. enter image description here

A single observation now consists of 16 values, 8 inside and 8 outside, We only have one observation. We have no way of estimating the variation between repeated observations. We cannot apply any statistical significance test or calculate any confidence intervals.

$\endgroup$
0
$\begingroup$

If your data is normally distributed, you have met the assumption of homogeneity of variance and your data points are independent, you can use a T-test or a paired T-test if samples are paired inside and outside city.

$\endgroup$
  • 1
    $\begingroup$ This data seems to meet the "inter ocular trauma test" ["hit between the eyes"]. Could anyone convince you that there is not a difference between those groups? $\endgroup$ – user20637 Mar 21 '18 at 12:34
  • $\begingroup$ Lol agreed but he still may want a p value $\endgroup$ – OliverFishCode Mar 21 '18 at 12:35

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.