Download Lecture 17

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Transcript
Lecture 17
Dustin Lueker

A way of statistically testing a hypothesis by
comparing the data to values predicted by the
hypothesis
◦ Data that fall far from the predicted values provide
evidence against the hypothesis
STA 291 Spring 2010 Lecture 17
2
1.
2.
State a hypothesis that you would like to
find evidence against
Get data and calculate a statistic
1. Sample mean
2. Sample proportion
3.
4.
Hypothesis determines the sampling
distribution of our statistic
If the sample value is very unreasonable
given our initial hypothesis, then we
conclude that the hypothesis is wrong
STA 291 Spring 2010 Lecture 17
3

Assumptions

Hypotheses
◦ Type of data, population distribution, sample size
◦ Null hypothesis
 H0
◦ Alternative hypothesis
 H1

Test Statistic

P-value

Conclusion
◦ Compares point estimate to parameter value under the null hypothesis
◦ Uses the sampling distribution to quantify evidence against null
hypothesis
◦ Small p-value is more contradictory
◦ Report p-value
◦ Make formal rejection decision (optional)
 Useful for those that are not familiar with hypothesis testing
STA 291 Spring 2010 Lecture 17
4

The z-score has a standard normal
x  0
distribution
z
s
n
◦ The z-score measures how many estimated
standard errors the sample mean falls from the
hypothesized population mean

The farther the sample mean falls from  0 the
larger the absolute value of the z test
statistic, and the stronger the evidence
against the null hypothesis
STA 291 Spring 2010 Lecture 17
5



The mean age at first marriage for married
men in a New England community was 22
years in 1790
For a random sample of 40 married men in
that community in 1990, the sample mean
age at first marriage was 26 with a standard
deviation of 9
State the hypotheses, find the test statistic
and p-value for testing whether or not the
mean has changed, interpret
◦ Make a decision, using a significance level of 5%
STA 291 Spring 2010 Lecture 17
6

How unusual is the observed test statistic
when the null hypothesis is assumed true?
◦ The p-value is the probability, assuming that the
null hypothesis is true, that the test statistic takes
values at least as contradictory to the null
hypothesis as the value actually observed
 The smaller the p-value, the more strongly the data
contradicts the null hypothesis
STA 291 Spring 2010 Lecture 17
7

Has the advantage that different test results
from different tests can be compared
◦ Always a number between 0 and 1, no matter what
type of data is being examined


Probability that a standard normal
distribution takes values more extreme than
the observed z-score
The smaller the p-value, the stronger the
evidence against the null hypothesis and in
favor of the alternative hypothesis
STA 291 Spring 2010 Lecture 17
8

In addition to reporting the p-value,
sometimes a formal decision is made about
rejecting or not rejecting the null hypothesis
◦ Most studies require small p-values like p<.05 or
p<.01 as significant evidence against the null
hypothesis
 “The results are significant at the 5% level”
 α=.05
STA 291 Spring 2010 Lecture 17
9

p-value<.01
◦ Highly significant
 “Overwhelming evidence”

.01<p-value<.05
◦ Significant
 “Strong evidence”

.05<p-value<.1
◦ Not Significant
 “Weak evidence

p-value>.1
◦ Not Significant
 “No evidence”
 Whether or not a p-value is considered significant typically depends
on the discipline that is conducting the study
STA 291 Spring 2010 Lecture 17
10

Significance level
◦ Alpha level
 α
 Number such that one rejects the null hypothesis if the
p-values is less than it
 Most common are .05 and .01
◦ Needs to be chosen before analyzing the data
 Why?
STA 291 Spring 2010 Lecture 17
11
Decision
True
Condition
of H0
False
Reject H0
Do Not
Reject H0
Type I
Error
Correct
Correct
Type II
Error
STA 291 Spring 2010 Lecture 17
12



α=probability of Type I error
β=probability of Type II error
Power=1-β
◦ The smaller the probability of Type I error, the
larger the probability of Type II error and the
smaller the power
 If you ask for very strong evidence to reject the null
hypothesis (very small α), it is more likely that you fail
to detect a real difference

In reality, α is specified, and the probability
of Type II error could be calculated, but the
calculations are often difficult
STA 291 Spring 2010 Lecture 17
13

In a criminal trial someone is assumed innocent
until proven guilty
◦ What type of error (in terms of hypothesis testing) would
be made if an innocent person is found guilty?
◦ What type of error would be made if a guilty person is
found not guilty?
◦ What does the Power represent (1-β)?
 Also, the reason we only do not reject H0 instead of saying
that we accept H0 is because of the way our hypothesis tests
are set up
 Just like in a criminal trial someone is found not guilty
instead of innocent
STA 291 Spring 2010 Lecture 17
14

If the consequences of a Type I error are very
serious, then α should be small
◦ Criminal trial example


In exploratory research, often a larger
probability of Type I error is acceptable
If the sample size increases, both error
probabilities decrease
STA 291 Spring 2010 Lecture 17
15

Which area of study would be most likely to
use a very small level of significance?
◦ Social Sciences
◦ Medical
◦ Physical Sciences
STA 291 Spring 2010 Lecture 17
16

H0: μ=μ0
◦ μ0 is the value we are testing against

H1: μ≠μ0
◦ Most common alternative hypothesis
 This is called a two-sided hypothesis since it includes
values falling on two sides of the null hypothesis
(above and below)
STA 291 Spring 2010 Lecture 17
17

The research hypothesis is usually the
alternative hypothesis
◦ The alternative is the hypothesis that we want to
prove by rejecting the null hypothesis

Assume that we want to prove that μ is larger
than a particular number μ0
◦ We need a one-sided test with hypotheses
H 0 :   0
H 0 :   0
H1 :    0
H1 :    0
 Null hypothesis can also be written with an equal sign
STA 291 Spring 2010 Lecture 17
18

For a large sample test of the hypothesis the
z test statistic equals 1.04
H0 :   0
◦ Now consider the one-sided alternative
 Find the p-value and interpret
H1 :   0
 For one-sided tests, the calculation of the p-value is
different
 “Everything at least as extreme as the observed value”
is everything above the observed value in this case
 Notice the alternative hypothesis
STA 291 Spring 2010 Lecture 17
19


Two sided tests are more common in practice
Look for formulations like
◦
◦
◦
◦
“test
“test
“test
“test
whether
whether
whether
whether
the
the
the
the
mean
mean
mean
mean
has changed”
has increased”
is the same”
has decreased”
STA 291 Spring 2010 Lecture 17
20

If someone wanted to test to see if the
average miles a social worker drives in a
month was at least 2000 miles, what would
H1 be? H0?
1.
2.
3.
4.
5.
6.
μ<2000
μ≤2000
μ≠2000
μ≥2000
μ>2000
μ=2000
STA 291 Spring 2010 Lecture 17
21