# Testing for statistically significant difference between two groups

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

• Are they matched, e.g. Pairs inside / outside on same day? Mar 21 '18 at 11:37
• You have an amazingly precise thermometer.
– whuber
Mar 21 '18 at 13:31
• 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"? Mar 21 '18 at 13:43
• There are 8 points in each group, each corresponding to 8 compass point directions. Does this mean paired t test is most appropriate? Mar 21 '18 at 15:08
• @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. Mar 21 '18 at 20:20

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.

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 Normal

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).

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.

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.
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.

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.

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.

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.

• 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? Mar 21 '18 at 12:34
• Lol agreed but he still may want a p value Mar 21 '18 at 12:35