Now it is time for our first real inference test. We're going to learn to
use a one sample z-test for hypothesis testing. The one sample z-test is a
parametric procedure. It tests whether a sample mean is statistically
significantly different than the population mean, when the standard
deviation of the population (or Sigma) is known. In order to use a one sample
z-test, you need one continuous or scale dependent variable, a population mean and
a population standard deviation. This test cannot be done in SPSS with
drop-down menus, although I have a video showing how to use SPSS syntax to do it.
Now you may recall an example about polar bears in which we determined that
the average polar bear walks 100 miles or 100 kilometers per week. That is our
population value. If we knew the standard deviation for that population, we could
compare a sample of polar bears drawn from that population, who drink caffeine
to see if their mean of 150 is statistically significantly different
than the population mean of 100. Let's examine the research design for a one
sample z-test. I am going to use this example to illustrate the subtle
differences in research design for all of the tests we will learn my hope is
that you will see how research design relates to the choice of a test, and
begin to understand when to choose what statistical test. The research question
will always be the same. Is recall better under hypnosis or without hypnosis? With
each new test, you will see how their research design changes. So to do a
z-test, we're going to begin with an existing memory test that has been
standardized on non-hypnotized people. This memory test has a mean and a
standard deviation and those values apply
to the population. All human beings will score an average on this test with a
standard deviation. Of course this is not realistic, because not all human beings
in the world have taken this test, but we will revisit this idea later. We never
actually know the standard deviation of the population. Well let's go back to our
research design. What would be our independent variable? The independent
variable would be our one sample of people whom we hypnotized, and then give
them the memory test. What would be the dependent variable? The DV is the number
of words recalled on the memory test. How many words did each hypnotized person
get correct? Comparing the sample mean of our hypnotized sample to the mean and
standard deviation of the test (which represents a population) would allow us
to answer the question, "Do hypnotized participants remember more words than
un-hypnotized population?" No test here, just an example. I'm going to use a
different example to illustrate how to conduct a one sample z-test. For this
example, I'm going to use some data that I found on the internet about the
internet. It concerns this bar chart about the average age of users on social
networks and online communities. With the increase in social networking usage,
researchers are interested in patterns of usage especially in the age of users.
Research found that the average age of social network users in the United
States is mu = 36.9 years old. Our population is all social networking
users. Our sample is a randomly selected group of social networking users from
the website LinkedIn. Is the average age of users on this website statistically
significantly different than the average age of the population of social
networking users (a population that has a mean of 36.9 years)?
To use the z-test, we're going to need some more
information. Notably, we need to know the standard deviation of the population. The
background to our research is this. Researchers at the website pingdom
calculated the average age of users of social media websites, and found that the
average age of social networking users is mu = 36.9 and sigma (standard
deviation) equals 10. Now here I need to add that I made up that standard
deviation. Almost never do we know the true standard deviation of the
population. In case you're interested however, my best estimate of the true
standard deviation of the population at least based on these data, would be about
3.72 years, well continuing. This distribution is approximately normal you
obtain a sample of 25 users of the social networking site LinkedIn. The mean
age for this sample is 44.2 years old. Is the average age of your
sample of LinkedIn users different from the US population of social networking
users. And about that sample size, I've said that an N of 30 is a minimum, but i
chose the N of 25 for ease of calculation. Sometimes I will simplify
for the sake of teaching concepts, and you'll see why that 25 is useful when we
do a square root. So our research question is "Is the average age of the
sample of LinkedIn users different from the US population of social networking
users?" On every slide, I will include the mean, standard deviation, sample size and
sample mean, so that you will have them readily available as we do the math.
First, is this a directional or a non-directional research question? In
this case the question is whether LinkedIn users are different. Simply
being different does not indicate the direction higher or lower. This is a non-
directional hypothesis, so we will use a two-tailed test. Let's
work through the five steps of hypothesis testing using this example.
Step number one: Select the appropriate statistic. In this case we are comparing
a single sample with a mean of 44.2, to a population value of 36.9, with a standard
deviation of 10. So we will be using the one sample z-test. Remember that in a
statistics class, step one will always be the easiest. The answer to the
appropriate statistic is whatever test we are learning this week. In the real
world however, choosing the correct test is very important and sometimes
difficult. As you gain experience you will learn to read your data to
determine what kind of test could be used to analyze them. Step two: State the
null and alternative hypothesis. In this case, we're doing a two-tailed test, so
we'll start with the null hypothesis. In words, we might say the sample of
LinkedIn users is no different than the population of average users. In symbols,
that would be h sub 0 : mu equals 36.9. In other words, the sample is drawn
from a population with a mean of 36.9. For the two-tailed alternative
hypothesis, in words we might say the sample of LinkedIn users is different
than the population of average users. In symbols this would be h sub 1 : mu
does not equal 36.9. Now just for practice, let's write a one-tail
alternative hypothesis, even though we're not going to use it in this case. In
words we would say the sample of linkedin users is older than the
population of average users. In symbols that would be h sub 2 : mu is
greater than 36.9. Literally that means that the sample of LinkedIn user
is drawn from a population that has a mean greater than 36.9. For the future
when you are writing the null and alternative hypotheses, follow this one
weird old trick. When you're doing a two-tailed test start by writing the
null hypothesis. When you're doing a one-tailed test, start by writing the
alternative hypothesis, so Step three: is to select a level of significance. To
calculate the critical value we need to know whether we are using a one or two
tailed test and at what alpha value. We have already established that we will be
using a two-tailed test. For most research, the level of significance will
be alpha equals .05. Technically, you could set the Alpha level to any value
your heart desired, but for scientific research you really only have two
choices - alpha equals .05 and alpha equals .01. Unless the problem
says otherwise, assume the value is alpha equals .05, two-tailed test. Finding the
critical value for Z test is easy; you only have two options. If you're using a
two-tailed test, at alpha equals .05, your critical value for a z-test will
always be positive or negative 1.96. If you're using a one-tailed test your
critical value for Z test will always be either +1.645 or -1.645
choose the +1.645 if you are doing a one-tailed test to the right
(larger than, greater than) and choose the -1.645 if you're doing a
one-tailed test to the left (smaller than or less than). Because the z-test uses a
normal curve, you did not need degrees of freedom. In the next video I will show
you how to calculate and write up a one sample z-test by hand.