A quick look at comparing averages (means) in JASP!
Sep 30, 2025
Quick introduction to comparing two averages with a t-test in the free statistics program JASP.
View Video Transcript
0:00
Hi there. Today we're going to talk
0:02
about how to find differences in
0:05
averages. We're going to do the actual
0:08
analyses in JASP. And and here's JASP.
0:11
And I'm going to open
0:13
this students database. And let's see,
0:16
I'll make it a little bigger. And here
0:18
we go. So this is what it looks like. It
0:21
looks like a spreadsheet at first,
0:22
right? I mean, you've all seen
0:23
spreadsheets. We're going to go to
0:25
classical independent samples t test.
0:28
JASP does a lot of basian statistics.
0:30
You don't have to know about those right
0:32
now.
0:33
So I want to ask the question, is the
0:36
average grade higher for students who
0:39
have children versus students who do not
0:41
have children? Well, if you have
0:43
children, then you have less time and
0:46
more interruptions for stud with
0:48
studying. Or you can say if you have
0:50
children, you're going to take classes a
0:51
lot more seriously. So let's see what we
0:53
get. So it comes up immediately with
0:56
this answer uh where P is 0.91 that's
1:00
very not significant.
1:03
So the lower P is remember P is the
1:05
chance that you're seeing this result
1:08
due to random chance. So if P is really
1:12
high in this case P is 0.91. So there's
1:15
a 91% chance that this is just random
1:19
that that the difference that you see
1:21
here of1 in GPA is just random.
1:25
And that makes sense because it's only
1:27
25 people. And if we click on
1:29
descriptives here, then you can see that
1:32
there's 24 people in one group and three
1:34
people in the other group. So really,
1:35
it's going to be hard to make any
1:37
difference clear in statistics because
1:40
there's so few people in this group.
1:44
But if I was to interpret this chart,
1:46
you can see that uh the two groups are
1:49
listed. This is the no group for uh
1:52
doesn't have kids. This is the yes group
1:53
for has kids. This is n is the number of
1:57
people in each group. So that's
1:59
important to know. Mean is the average
2:01
for each group. So the average GPA in
2:04
the group without kids was 2.61 and the
2:07
average GPA for for people who had kids
2:09
was 2.67. Not a big difference. The rest
2:13
of these numbers for this class you can
2:17
just ignore because these are numbers
2:20
that are used in determining how much
2:22
variation there is. So this is standard
2:24
deviation and this is standard error
2:27
tell you how much the numbers are
2:29
bouncing around. And you can see that
2:32
they're bouncing around well by about
2:34
3/4 of a point roughly. But the thing
2:38
that you need to know if it's
2:39
significant is P. You can ignore t which
2:43
is the test that we plug all the numbers
2:45
into. The formula that we plug all the
2:46
numbers into gives us this t. And then
2:49
normally we would look it up in the back
2:50
of the book along with the degrees of
2:52
freedom here to get this number. But now
2:55
the computer does all that. So you don't
2:57
have to do it. So you don't really need
3:00
these two numbers anymore because you
3:02
have p and you have these two averages.
3:05
So you can see how far apart they are.
3:07
You can have the number of people in
3:08
each group so that you know if it means
3:10
anything. And in this case, it really
3:12
doesn't. You see that there's only 35
3:15
people in this group. So, let's take a
3:17
look and see if sharing notes tells us
3:20
anything. So, do students get better
3:22
grade when they share notes with each
3:24
other?
3:26
I would imagine that they would
3:31
because when you think about it, you're
3:33
getting somebody else's perspective on
3:35
what's going on in class. So, let's put
3:37
that in. And now we see that P is a
3:40
little better. We've got enough people
3:42
in each group that if there's a really
3:44
big difference, we should see it. But
3:46
there's not a really big difference.
3:48
These two averages are almost the same.
3:50
They're off by about a tenth of a point.
3:52
And so we're just not getting a big
3:55
enough difference.
3:58
But you see again
4:00
P way above 0.05.
4:04
Let's try opening up a different file.
4:07
This is a somewhat less happy file
4:09
because we're looking at drug deaths. So
4:12
let's just do a quick one. Uh our theory
4:15
will be that um men and women died at a
4:21
significantly different age. Let's see
4:22
what happens.
4:25
So we've got age, we've got gender.
4:31
We'll put descriptives back on.
4:34
And here we are. 0.05. If this was the
4:37
only analysis I was going to do in this
4:39
file, I would say, "Oh, look. It's
4:40
significant. My theory was correct." And
4:43
women do die of a drug overdose at a
4:46
higher age than men. Women die at an
4:48
average of 42 and a half years old, men
4:51
at 41 and three/4ers years old. Now, you
4:54
might say that's not a big difference,
4:56
and you're right. You might say that's
4:58
not a meaningful difference. It doesn't
4:59
tell us anything that we would need to
5:01
change policy. And you're absolutely
5:03
right. But it's significant because look
5:07
at these numbers. We've got 5,000 well
5:10
5,98
5:12
people in this database.
5:15
That's these two numbers added up for
5:16
the two groups. Each group has over a
5:19
thousand people in it. You do not need a
5:21
large difference to be significantly
5:23
different to say this is not just due to
5:24
random chance. However,
5:28
just because it's significant
5:30
statistically, just because you can say,
5:32
okay, there's a difference in these two
5:33
groups does not mean it's a meaningful
5:36
difference. a difference that you would
5:38
take action on, a difference that you
5:40
would base public policy on, that's a
5:43
different question. But the thing is,
5:45
first we have to know that we're not
5:46
just looking at a statistical fluke.
5:48
We're not just looking at some random
5:50
weirdo event. We have to know that we
5:53
have a we probably have a real
5:56
difference between groups. And then we
5:58
can say, well, how big is the
5:59
difference? Is it big enough to really
6:01
matter? In this case, no.
6:04
Again, you're looking here at the names
6:08
of the groups.
6:10
You're looking here at the number of
6:11
people in each group. You're looking
6:13
here at the averages. And you're looking
6:15
here at the P. You are ignoring the
6:17
standard deviation, standard error,
6:19
coefficient of variance, tn degrees of
6:22
freedom because you don't need them.
6:26
I will add sometimes this will give you
6:28
a little notice and it will say you're
6:31
using the wrong test in JASP and in
6:34
Jamovi which is another free statistics
6:36
program. Uh and it will say that the
6:39
variance into two groups is
6:41
significantly different. So you have to
6:43
use a different test.
6:45
This is kind of an oddity of these
6:48
programs. But the way that you fix it is
6:51
you click on Welch's test and you take
6:54
out students test. But if it tells you
6:57
that your analysis is wrong over here
6:59
where it says nope, then you can just go
7:02
in and switch to Welch's or the Man
7:05
Whitney test which um you can use when
7:09
as it says when the residuals are not
7:10
normally distributed. Uh we're not
7:12
really going to get into that. I
7:14
generally only use student and Welches
7:16
in uh my professional life.
7:19
So, we're just going to go with those
7:21
two.
#Science