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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

null hypothesis<br />

μ<br />

alternative hypothesis<br />

μ 1 μ 2<br />

value of X<br />

value of X<br />

Figure 13.8: Graphical illustration of the null <strong>and</strong> alternative hypotheses assumed by the Student t-test.<br />

The null hypothesis assumes that both groups have the same mean μ, whereas the alternative assumes<br />

that they have different means μ 1 <strong>and</strong> μ 2 . Notice that it is assumed that the population distributions<br />

are normal, <strong>and</strong> that, although the alternative hypothesis allows the group to have different means, it<br />

assumes they have the same st<strong>and</strong>ard deviation.<br />

.......................................................................................................<br />

Now that we’ve assigned weights to each sample, we calculate the pooled estimate of the variance by<br />

taking the weighted average of the two variance estimates, ˆσ 2 1 <strong>and</strong> ˆσ 2 2<br />

ˆσ 2 p “ w 1ˆσ 2 1 ` w 2ˆσ 2 2<br />

w 1 ` w 2<br />

Finally, we convert the pooled variance estimate to a pooled st<strong>and</strong>ard deviation estimate, by taking the<br />

square root. This gives us the following <strong>for</strong>mula <strong>for</strong> ˆσ p ,<br />

d<br />

w 1ˆσ 1 2 ˆσ p “ ` w 2ˆσ 2<br />

2<br />

w 1 ` w 2<br />

And if you mentally substitute w 1 “ N 1 ´ 1<strong>and</strong>w 2 “ N 2 ´ 1 into this equation you get a very ugly<br />

looking <strong>for</strong>mula; a very ugly <strong>for</strong>mula that actually seems to be the “st<strong>and</strong>ard” way of describing the pooled<br />

st<strong>and</strong>ard deviation estimate. It’s not my favourite way of thinking about pooled st<strong>and</strong>ard deviations,<br />

however. 9<br />

13.3.4 The same pooled estimate, described differently<br />

I prefer to think about it like this. Our data set actually corresponds to a set of N observations,<br />

which are sorted into two groups. So let’s use the notation X ik to refer to the grade received by the i-th<br />

student in the k-th <strong>tutorial</strong> group: that is, X 11 is the grade received by the first student in Anastasia’s<br />

class, X 21 is her second student, <strong>and</strong> so on. And we have two separate group means ¯X 1 <strong>and</strong> ¯X 2 ,which<br />

we could “generically” refer to using the notation ¯X k , i.e., the mean grade <strong>for</strong> the k-th <strong>tutorial</strong> group. So<br />

far, so good. Now, since every single student falls into one of the two <strong>tutorial</strong>s, <strong>and</strong> so we can describe<br />

their deviation from the group mean as the difference<br />

X ik ´ ¯X k<br />

9 Yes, I have a “favourite” way of thinking about pooled st<strong>and</strong>ard deviation estimates. So what?<br />

- 393 -

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

Saved successfully!

Ooh no, something went wrong!