Download Lecture 14 Hypothesis testing

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
no text concepts found
Transcript
Review of CI’s
•Large sample CI for μ
•Small sample CI for μ
•Large sample CI for p
Large sample confidence intervals
for the sample mean
The Confidence Interval is expressed as:
xE
x  z 2 x  x  z
E is called the margin of error.
For samples of size > 30,
 s 
x  z 2 

 n

2
n
Sample Size
The sample size needed to estimate m so as
to be (1-)*100 % confident that the sample
mean does not differ from m more than E is:
 z 2
n  
 E
…round up



2
Confidence Interval for the mean
when  is unknown and n is small
The (1- )*100% confidence interval for
the population mean m is
x  tn 1, 
2
s
n
 m  x  tn 1, 
2
s
The margin of error E, is in this case
E  t n 1, 
2
s
n
N.B. The sample must be assumed to be a random
sample AND the population must be approximately
normal. population.
n
Confidence intervals for a
population proportion
If the size of the population is N, and X
people have this attribute, then as we already
know, p  X N is the population proportion.
The idea here is to take a sample of size n,
and count how many items in the sample
have this attribute, call it x. Calculate the
sample proportion, pˆ  x n . We would like
to use the sample proportion as an estimate
for the population proportion.
FACT: The
(1   )100%
confidence interval for p is:
pˆ  z / 2
pq
n
where p = x/n and q = 1 – p.
ASSUMPTION: The sample size is sufficiently
large that both np and nq are at least 15.
Hypothesis Tests
In statistics a hypothesis is a statement that
a researcher believes is true.
Hypothesis Tests
In statistics a hypothesis is a statement that
something is true.
Hypothesis Tests
The Null Hypothesis, H0, is a statement
about values of a population parameter of a
population. This is normally the status quo
and it normally contains an equality.
The Alternate (Research) Hypothesis, HA,
is a statement that is true when the Null
Hypothesis is false.
Hypothesis Tests
1.
2.
3.
4.
5.
6.
Identify H0 and HA
Select a level of significance ( )
Sketch the rejection region.
Assume the null hypothesis is true
Take a sample and compute the z-value.
Reject or Fail to reject H0
Example
Suppose that we want to test the hypothesis with a
significance level of .05 that the climate has
changed since industrialization. Suppose that the
mean temperature throughout history is 50
degrees. During the last n=40 years, the mean
temperature has been 51 degrees with a standard
deviation of 2 degrees. What can we conclude?
H0: m  50
HA: m  50
Rejection Regions
Suppose that  = .05. We can draw the
appropriate picture and find the z score for:
 / 2. We call the outside regions the
rejection regions.
Test the hypothesis
Compute z using the null
hypotheses μ =50, the sample
standard deviation s = 2, and the
observed mean of 51
s / n  2 / 40  2 / 6.234  .316

(x  m)
1
z
/
 3.16
.316
(s / n )
The z-value IS in rejection region, therefore can reject the null hypothesis
The data does support the alternative hypothesis . Can conclude with confidence
95% that the mean temperature has changed.
Test the hypothesis
The z-value IS in rejection region, therefore can reject the null hypothesis
The data does support the alternative hypothesis . Can conclude with confidence
95% that the mean temperature has changed.
Of course, the z-value we observed could occur even if the null hypothosis were
true, but this is not likely (probability only 0.05). Thus, we could be in error in
supporting that the mean temperature has changed,. This sort of error is called a
Type 1 error.
Type I errors
We note that we could be in
error since the z-value 3.16 is
unlikely but not impossible.
Rejecting the null hypotheses
when it is in fact true is called a
Type I error. In our example, the
probability of a Type I error is
less than 0.05.
P-values
• In the previous example, would have
rejected H0 even if a smaller value of
alpha had been used.
• The smallest such value is called the pvalue of the test.
• In the example, the normal table can be
used to show p = .0002
• The p-value also gives the probability of a
Type I error
Rejection Regions
We call the blue areas the rejection region
since if the value of z falls in these regions,
we reject the null hypothesis
Example
50 smokers were questioned about the number of
hours they sleep each day. Test the hypothesis
that the smokers need less sleep than the general
public which needs an average of 7.7 hours of
sleep. Compute a rejection region for a
significance level of .05. If the sample mean is 7.5
and the standard deviation is .5, what can you
conclude?
H0:
m  7. 7
HA:
m  7. 7
Hypothesis Tests (with rejection
regions)
1.
2.
3.
4.
5.
Identify H0 and HA
Select a level of significance ( )
Assume the null hypothesis is true
Find the rejection region
Take a sample and determine the
corresponding z-score
6. Reject or Fail to reject H0
Related documents