Hypothesis Testing and One Sample Tests

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 23

Hypothesis testing

and one sample


tests
Chapter 7 and 8

1
Introduction to Hypothesis
Testing
• We want to know how our sample relates to the
population
• Hypothesis testing applies to all of inferential
statistics.
o z-test
o This test tells us if our sample mean is the same or different
from a given population mean.
• Is the sample mean the same or different from the population
mean?

2
Experimental Hypotheses
• We always have two hypotheses
o The null hypothesis = H0
 The sample is the same as the population. In other words, the
treatment did not have an effect
o The alternative hypothesis = H1
 The sample is the different from the population. In other
words, the treatment did have an effect.

3
One vs. Two Tailed Hypotheses
• Use a two tailed test when you want to see if the sample
mean is different from the population mean.
o H0:  = population mean
o Ha :  ≠ population mean

4
Directional hypothesis
• Use a one tailed test when you only care if the sample mean is
greater or less than the population mean.
o H0:  ≥ population mean
o Ha :  < population mean
OR
o H0:  ≤population mean
o Ha :  > population mean

5
The z-test
• Uses z scores to see where a sample mean falls on a
normal curve of the H0 population.
• Assumptions of the z-test:
o We have randomly selected a sample
o We are using interval/ratio data
o The dependent variable is normally distributed in the
population
o We KNOW the mean () and the standard deviation ()of
the population.

6
The z-test
• First find the standard error of the mean:

M 
n
• Second find Zobt:
M 
zobt 
M
• Third determine Zcrit if =.05:
o For a two-tailed test it is always ±1.96
o For a one-tailed z-test it is always 1.645 BUT you must pick a
direction, either positive or negative
7
Making a conclusion
• For a two tailed test:
o If | Zobt |≥ Zcrit , reject the null hypothesis
o If | Zobt |< Zcrit , retain the null hypothesis
• Remember for a one tailed test, you have to be certain
that you are on the correct side of the mean.
• It will help to draw a normal curve.

8
Example 1
• The mean number of close friends for the population of people living
in the U.S. is 5.7. The standard deviation of scores in this population
is 1.3. An investigator predicts that the mean number of close friends
for introverts will be significantly different from the mean of the
population. The mean number of close friends for a sample of 26
introverts is 6.5. Do these data support the investigator's prediction?
Use an alpha level of .05
o What is a two tailed null and alternative hypothesis
 H0: introverts =
 HA:introverts ≠
 What is the standard error or the mean?
 What is the Zobt?
 What is Zcrit?
o What is your conclusion?
9
Example 2
•  A rental car company claims the mean time to rent a car on their
website is 60 seconds with a standard deviation of 30 seconds. A
random sample 36 customers attempted to rent a car on the
website. The mean time to rent was 75 seconds. Is this enough
evidence to contradict the company's claim? 
• What is a two tailed null and alternative hypothesis
 H0: actual customers =
 HA:actual customers ≠
 What is the standard error or the mean?
 What is the Zobt?
 What is Zcrit?
o What is your conclusion?
10
Errors in Statistical Decision Making
Our decision

Reject the Retain the


null null
guilty Not guilty

The Truth Null is true Type I error We are


about the Not guilty False alarm correct
null ( error) (1-)
hypothesis .05
Null is false We are Type II
guilty correct error
Power Miss
(1-) ( error)
11
Power
• The more participants the more POWER we have to
detect that the null hypothesis is false
• We minimize the likelihood of a Type II error

12
Effect size
• There are many ways to calculate effect size, one (or
more) for each type of statistical test.
• How big of an effect was there?
o This is only calculated if you have a significant effect (you
rejected the null hypothesis)
• The effect size tells us how far scores have shifted
from the population

13
Effect size for z-tests
Description Effect Size
of Effect (d)

Small d < 0.2

Medium 0.2 < d < 0.8

Large d > .08

14
One-sample t-tests
• The one-sample t-test is very similar to the z-test
o Use the z-test if you know both  and 
o Use the t-test of you know , but do not have 
• Set up your hypotheses in the same way as you did for
the z-test
o One tailed
o Two tailed
o Null
o Alternative
15
Assumptions of the one sample t-
test
• We need to have a random sample
• We need to have interval or ratio data
• We need to have a normal distribution on our
dependant variable
• We need to know the population mean ()

16
Computing tobt
• First find the estimated standard error of the mean
o You have to use your sample standard deviation to estimate
the population values

SD
• Find t obt sM 
n
M 
tobt 
sM
17
The t distribution
• This is a distribution of all possible t-values.
• Like the z distribution, the mean = 0
• Unlike the z distribution, the standard deviation
depends on the size of your sample (N)
o When you have infinite N, the t distribution and the z
distribution are the same thing (=0, =1)
o In all other cases, the standard deviation of the t distribution
is greater than 1

18
The shape of the t-distribution
• You must know your degrees of freedom, to decide
which t- distribution you will use.
o For the one-sample t, df =N-1

19
Interpreting the t- test
• Use the t-table (Table B.2, Appendix B, p481-482) to find the
critical value.
o Find DF,
o Decide if you are using a one or two tailed test
o = .05
• If you don’t have your book, you can use this website:
o http://webhost.bridgew.edu/j1holmes/Documents/T%20Table.pdf
• Remember, for a two-tailed test:
o If your |tobt |≥ tcrit, reject the null
o If your |tobt |< tcrit, retain the null
 Again, a graph may help

20
Example 1
• Suppose that as a military psychologist you know that the population of sonar operators
has a mean identification rate of 82 targets out of 100.  You have just developed a new
sonar training system that, you claim, will increase the number of targets correctly
identified.  Using the data from the 15 trainees listed below conduct a single sample t test
to determine whether they perform significantly better than the population of sonar
operators trained using the traditional method.
 Number of targets correctly identified
88    79    92    87     82    86    91    80     77    83 91    85    82    89     94
o How many tails?
o H0:
o H1:
o M=
o SD =
o Estimated standard error of the mean =
o t obt =
o t crit=
21
o Conclusion:
Example 2
• A professor in the women’s studies program believes that the amount
of smoking by women has changed in recent years. A complete census
taken 2 years ago of women living in a neighboring city showed that
the mean number of cigarettes smoked daily by the women was 5.40.
To assess her belief, the professor determined the daily smoking rate
of a random sample of 20 women currently living in that city. The data
show that the number of cigarettes smoked daily by the 20 women has
a mean of 6.10 and a standard deviation of 2.70.
• How many tails?
 H 0:
 H 1:
 Estimated standard error of the mean =
 t obt =
 t crit=
 Conclusion:

22
Effect size for a single sample t-
test

23

You might also like