06.09.2021 Views

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>for</strong> the difference “(mean 1) minus (mean 2)”, which will be the reverse of what you’d get if you were<br />

calculating the confidence interval <strong>for</strong> the difference “(mean 2) minus (mean 1)”.<br />

Okay, that’s pretty straight<strong>for</strong>ward when you think about it, but now consider our t-test comparing<br />

Anastasia’s class to Bernadette’s class. Which one should we call “mean 1” <strong>and</strong> which one should we<br />

call “mean 2”. It’s arbitrary. However, you really do need to designate one of them as “mean 1” <strong>and</strong> the<br />

<strong>other</strong> one as “mean 2”. Not surprisingly, the way that R h<strong>and</strong>les this is also pretty arbitrary. In earlier<br />

versions of the book I used to try to explain it, but after a while I gave up, because it’s not really all that<br />

important, <strong>and</strong> to be honest I can never remember myself. Whenever I get a significant t-test result, <strong>and</strong><br />

I want to figure out which mean is the larger one, I don’t try to figure it out by looking at the t-statistic.<br />

Why would I b<strong>other</strong> doing that? It’s foolish. It’s easier just look at the actual group means, since the R<br />

output actually shows them!<br />

Here’s the important thing. Because it really doesn’t matter what R printed out, I usually try to<br />

report the t-statistic in such a way that the numbers match up <strong>with</strong> the text. Here’s what I mean...<br />

suppose that what I want to write in my report is “Anastasia’s class had higher grades than Bernadette’s<br />

class”. The phrasing here implies that Anastasia’s group comes first, so it makes sense to report the<br />

t-statistic as if Anastasia’s class corresponded to group 1. If so, I would write<br />

Anastasia’s class had higher grades than Bernadette’s class (tp31q “2.1,p“ .04).<br />

(I wouldn’t actually underline the word “higher” in real life, I’m just doing it to emphasise the point that<br />

“higher” corresponds to positive t values). On the <strong>other</strong> h<strong>and</strong>, suppose the phrasing I wanted to use has<br />

Bernadette’s class listed first. If so, it makes more sense to treat her class as group 1, <strong>and</strong> if so, the write<br />

up looks like this:<br />

Bernadette’s class had lower grades than Anastasia’s class (tp31q “´2.1,p“ .04).<br />

Because I’m talking about one group having “lower” scores this time around, it is more sensible to use<br />

the negative <strong>for</strong>m of the t-statistic. It just makes it read more cleanly.<br />

One last thing: please note that you can’t do this <strong>for</strong> <strong>other</strong> types of test statistics. It works <strong>for</strong> t-tests,<br />

but it wouldn’t be meaningful <strong>for</strong> chi-square testsm F -tests or indeed <strong>for</strong> most of the tests I talk about<br />

in this book. So don’t overgeneralise this advice! I’m really just talking about t-tests here <strong>and</strong> nothing<br />

else!<br />

13.3.8 Assumptions of the test<br />

As always, our hypothesis test relies on some assumptions. So what are they? For the Student t-test<br />

there are three assumptions, some of which we saw previously in the context of the one sample t-test (see<br />

Section 13.2.3):<br />

• Normality. Like the one-sample t-test, it is assumed that the data are normally distributed. Specifically,<br />

we assume that both groups are normally distributed. In Section 13.9 we’ll discuss how to<br />

test <strong>for</strong> normality, <strong>and</strong> in Section 13.10 we’ll discuss possible solutions.<br />

• Independence. Once again, it is assumed that the observations are independently sampled. In the<br />

context of the Student test this has two aspects to it. Firstly, we assume that the observations<br />

<strong>with</strong>in each sample are independent of one an<strong>other</strong> (exactly the same as <strong>for</strong> the one-sample test).<br />

However, we also assume that there are no cross-sample dependencies. If, <strong>for</strong> instance, it turns<br />

out that you included some participants in both experimental conditions of your study (e.g., by<br />

accidentally allowing the same person to sign up to different conditions), then there are some cross<br />

sample dependencies that you’d need to take into account.<br />

- 397 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!