Let’s now run a statistical test!
Given our research question, which should we run? A one-sample or a two-sample (independent) t-test? why?
Let’s calculate t manually first
t = ____
Once we have t, we can also retrieve the corresponding p-value, right?
pt(t=___, df=___, lower.tail=_) # this is going to be the one-tailed p-value, how to I get the two-tailed p-value?
Then, we can use the t.test function to prove ourselves we grasped the calculations under the hood.
t.test(dv ~ iv, data=___, alternative.hypothesis="_____") # let's look at the help and see how the function works!
Finally, Let’s calculate the standardized effect size (Cohen’s d)?
d =
Remember that we could retrieve d
directly from our t
to.
d.fromt = abs(t)*sqrt(2/nrow(spiderData))