In statistics, we can either use a "one-tailed" or "two-tailed" hypothesis.
By default, JASP uses the two-tailed (or non- directional) hypothesis test. But what if
you want to do a one-tailed test in JASP? I'm going to show you this
procedure using a one sample t-test, but you will use this same procedure
with all directional hypothesis tests in JASP.
For this example we are going to test the research question: "Does Ritalin
improve the attention span of kids with ADHD?" We find a journal article that
tells us the average attention span of kids with ADHD is mu = 105.
No information is given on Sigma (or the standard deviation). Now, you may ask:
"105 what?" and I have no idea. I created this data simply to illustrate
THIS concept. I'm pretty sure that attention is not measured in units that
would add up to 105, so just play along to learn the concept. The population
value is 105. We do not have a standard deviation, as is usually the case.
So you randomly select a sample of 30 ADHD kids - whom you expect would have an
average attention span of 105 - but you give them Ritalin and then you measure
their attention span. Is the attention span for ADHD kids given Ritalin
significantly longer than 105? Has attention improved? So is this a
directional or a non-directional test? We are asking: does Ritalin IMPROVE
attention? So it is DIRECTIONAL. It's a on- tailed test. The reason that we are
using a one-tailed test is because there is only one direction of change that is
valuable to us. If the drug does not work - if it makes no difference - or if it makes
attention span worse, both of those are undesirable outcomes. The only direction
of change that we are interested in is if attention span is significantly
LONGER than 105. We are looking in only one direction, and we will use Student's
t-table to find the critical value. Calculating a one-tailed t-test in
JASP is as easy as the click of a button.
Everything about the test is done in exactly the same way as with the
two-tailed variety. Once you have JASP open on your computer,
and the data set on your desktop, we will open the file by going to our main menu
icon, Open -> Computer -> Desktop... locate the data set and click Open
JASP will read the file and show you the data. JASP has correctly interpreted
the level of measurement as Scale, so we are ready to go.
But first let's walk through the five steps of hypothesis testing so that we
know what we are doing with this test.
Step 1: select the appropriate statistic. We will use a one sample t-test, looking
only to the upper or right direction. Step 2: state the null and alternative
hypothesis. Now here we're going to start with the alternative hypothesis.
It is always easier to write the alternative hypothesis for a one-tailed test, first,
and then do the null hypothesis. We are asking whether attention will be GREATER
than 105. We are looking in the Right or "greater than" direction.
So the alternative hypothesis is H1: mu > 105. Now that we have
used the "greater than" sign what does that leave us?
It leaves us with "less than" and it leaves us with "equal to", so our null
hypothesis will be H0: mu is less than or equal to 105. Again, if the
attention span is the same - or gets worse - we conclude that the drug does not work.
Whenever you are using a one-tailed test, write the alternative hypothesis first,
and then what is left over, will be your null hypothesis. Step 3: Select a level of
significance. We have already established that we are doing a one-tailed test.
The Alpha level is set to .05, so all that we need are the degrees of
freedom. Degrees of freedom = n - 1,
where n is the number of people (or the sample size) of 30, so the answer for Step 3
is one-tailed test, alpha = 0.05, degrees of freedom equals 29. To find the
critical value, we go to Student's t-distribution table. Remember that this
is the table of critical values that was developed for us by William Sealy Gosset,
a scientist and master brewer at Guinness Brewing Company in Dublin,
Ireland, back in 1908. We are using a one- tailed test, so we will focus on the
columns on the right. The Alpha level is .05 with 29 degrees of freedom
So the critical value is positive 1.699. So any
T values exceeding 1.699 indicate that the sample of
children with ADHD who were given Ritalin have a statistically
significantly longer attention span. Let's see what happens.
Step 4: calculate the statistics. Using the data set Ritalin.csv, we conduct a one
sample t-test on these data by clicking on T-tests -> One sample t-test. The only
variable that we have is Ritalin. Move Ritalin into the Variables pane. Now here
is something very important! We have to tell JASP what is our comparison value!
By default, the comparison value is zero, but we want to compare our sample mean
to the mean attention span of ADHD children without Ritalin - which we have
already established is 105 - our alternative hypothesis is that if
Ritalin works, the attention span will be greater than 105. So enter "105" into Test
value. In order to get our one tailed test, we will look at the settings for
the alternative hypothesis. By default, JASP uses a two-tailed test, in which our
alternative hypothesis is that our sample mean is DIFFERENT than our test
value of 105. We would like to know if our sample mean is "greater than" our test
value of 105, so we will click on the "greater than" option... and that is all that
you need to do to choose a directional test. This same technique works for any
JASP alternative hypothesis setting. So while we are here, let's finish the test.
Under Additional Statistics, select Location parameter, and with it, the
Confidence interval. Select the Effect Size and the descriptive statistics.
We can also get a Plot of the descriptive statistics here. In the Results window, we
can see that the p-value is a.041, which is less than .05.
The confidence interval does not cross zero, and the t-value is 1.797,
slightly above the critical value of 1.699.
All of these findings converge on the conclusion that the means are
statistically significantly different. Before we write up the findings, however,
I want to show you something about the difference in power between a one-tailed
test and a two tailed test. Remember that our t-value is 1.797.
This is a t-distribution. It looks like our old friend the Normal Curve, but
with a subtle difference in its shape, that will not affect what we are
doing here. If we were doing a two tailed test with 29 degrees of freedom, the
critical values would be positive and negative 2.045, but we
are doing a one tailed test with 29 degrees of freedom, so the critical value
is positive 1.699. Now, let's add our t-value.
The t = 1.797, would NOT be significant in a two-tailed test
( with the blue fences) but it WAS significant with a one-tailed test (the red fence).
Using a one tailed test increases the POWER of the test to find significant
results, where those results exist. In other words, to avoid a Type II error.
We will discuss more about the power and effect size in a later lecture.
Returning to our five steps of hypothesis testing, our t of 1.797,
which we should round up to 1.80, exceeds the
critical value of 1.699.
Step 5: Make the decision. ADHD children given Ritalin show significant improvement in
their ability to concentrate, t with twenty nine degrees of freedom
equals 1.80, probability .04. Notice that that I have also
included the mean and standard deviation for our sample in parentheses. And here
is how we would write up these results in APA style: if you are writing this up
for a paper the last line (interpreting the meaning
of your findings) would go in your Discussion section.