hypothesis testing hypothesis testing is
a key procedure in inferential
statistics it is based on the idea that
we can tell things about a population
from a sample taken from it
hypothesis testing can be explained in
five steps
hypotheses significance sample p-value
decide step 1
hypotheses decide on your hypothesis you
need a null hypothesis H naught and an
alternative hypothesis h1 or h2 intial
statistics is based on the premise that
you cannot prove something to be true
but you can disprove something by
finding an exception you decide what
you're trying to provide evidence for
which is the alternative hypothesis then
you set up the opposite is the null
hypothesis and find evidence to disprove
that it can be said that the alternative
hypothesis is usually a thing we are
trying to prove or find out about while
the null hypothesis is the opposite or
status quo note 1 the hypotheses are
always about the population parameters
not the sample values or statistics to
the null hypothesis usually refers to
the status quo the thing we're trying to
find evidence against it generally
represents no effect in 3 the null
hypothesis should include a statement of
equality and the alternative should not
step 2 significance decide on the level
of significance unless there is a good
reason not to people generally use point
zero five as a significance level also
known as the alpha value the
significance level is the probability
that you will say that the null
hypothesis is wrong when really it is
correct
this is known as a type 1 error step 3
take a sample from the population to
provide the statistics you need step 4
calculate the p-value this is almost
always done by a computer package step 5
use the p-value to decide whether to
reject the null hypothesis if the
p-value is less than a significance
level you chose earlier you will reject
the null hypothesis the sample has given
you evidence that the null hypothesis is
wrong we will now go through this
step-by-step with an example
Helen sells choconutties her brother
Luke is taking a marketing class and
tells her that people will buy more
choconutties from here if she gives away
a free gift with each picket Helen is
skeptical
so decides to gather data to see if it's
true she decides that for the next month
she will try out some days where she
offers a free sticker with each packet
of choconutties and some point he
doesn't from the month of trial she will
have a sample that can be used to draw
conclusions about days in the future the
population in this instance is all days
of selling choconutties the sample is
the days that occur in the next month
this is not a random sample but it is
all we can do in a substance to make the
assignment of sticker or no sticker
random Helen will toss a coin each
morning and if it is heads she will
offer a free sticker she will keep track
of her sales for each day she asks you
to help you do the analysis the first
step is to decide on the hypotheses
there are two different circumstances
sometimes known as treatments offering a
sticker in not offering the null
hypothesis is that there is no
difference in the sales for the two
treatments the statistic of interest is
the mean or average value of daily sales
the null hypothesis can be written H
naught there is no difference in mean
sales for the population for the two
treatments the alternative hypothesis is
written H 1 there is a difference in
mean sales for the population for the
two treatments Helen thinks the sales
could go up or down as a result of
offering a free sticker written in
mathematical terminology we use mu a
Greek letter to represent the population
mean these are the mean sales for all
days that choconutties assault these are
different from the sample means which
other values we calculate from our data
the subscript free sticker or no sticker
indicates whether we're talking about
the population mean for dates when a
free sticker is offered or when it is
not written mathematically it looks like
this H naught mu free sticker equals mu
no sticker which rearranges to H naught
mu free sticker minus mu no sticker
equals zero note that there is an equal
sign in
hypothesis similarly the alternative
hypothesis looks like this we do not
know what the values of the population
means are but we will use information
from the sample to get sample means
which will then help us make inferences
about the population means in the
difference between them there is a not
equal to sign in the alternative
hypothesis this means we're interested
in differences from zero in both
directions this is called a two-tailed
test or exploratory hypothesis if Helen
was sure that the sales would not go
down and was only interested in whether
they went up or stayed the same the
hypotheses would look like this h1 the
means house for the population for the
free sticker treatment are higher than
the mean sales for the population for
the no sticker treatment H naught the
mean sales for the population for the
free sticker are less then all the same
as the mean sales for the population for
no sticker written the mathematical
terminology the hypotheses look like
this this can be rearranged to this if
Helen is looking for evidence that sales
will increase due to the free sticker
this is called a one tailed test or a
directional hypothesis it is a greater
than sign in it we will stick to the
two-tailed test for now step two decide
on a level of significance we choose
alpha equals point zero five step three
Helen goes ahead with a plan and
provides 23 days of sales figures 13 of
which were when she offered the free
stickers and 10 when she did not you put
the figures in a spreadsheet and use
Excel to draw histograms of the data and
calculate the appropriate p-value the
process for calculating the p-value is
shown in a separate video called two
means t-test in Excel the results look
like this
the mean sales for the free sticker days
is three hundred and 1.92 while the mean
sales for the no free sticker days is
two hundred and sixty five dot eighty
three cents step four you see that the
p-value for the two-tailed test is given
as point zero one nine nine eight which
rounds to point zero to step five the
calculator PV of
zero two is less than the level of
significance which is point zero five so
you reject the null hypothesis
Helen would like to know what that means
who explained that the data she is
collected indicates that there is a
difference in mean sales depending on
whether she offered a free sticker or
not if she had chosen a one tout test
then the p-value for that would be point
zero zero nine nine nine or rounded to
point zero one important points to
remember the hypotheses are made about
the population we collect sample data to
draw inference about the population we
know whether there is a difference
between the sample means we use
information about the samples to decide
using the p-value whether there is
evidence to say that there is a
difference between the population means
you might like to watch understanding
the p-value to help your understanding
or to means t-test in Excel to learn how
to go about doing this test using the
Excel analysis toolpak