confidence intervals for the population mean (m)mahinda/stab22/inference.pdf7 f) if the sampling...
TRANSCRIPT
1
Chap 6 Confidence interval for the
population mean p341
Choose an SRS of size n from a
population having unknown mean
and known sta. dev. . A level C
confidence interval for is *x z
n
Here *z is the value of on the std.
normal curve with area C between *z
and *z . The interval is exact when the
population distribution is normal and
approximately correct for large n in
other cases.
In general CIs have the form
Estimate margin of error
In the above case
Margin of error(m) = *zn
2
Note: In the above formula for the CI
for the population mean, n is the std.
dev. of the sample mean ( X ) and it
can also be written as * . ( )x z Std Dev X
Here are three ways to reduce the
margin of error (and the width of
the CI)
- Use a lower level of confidence
(smaller C)
- Increase the sample size (n).
- Reduce .
3
Sample size for desired margin of
error p352
The CI for population mean will
have a specified margin of error m
when the sample size is 2
*zn m
Example:
A limnologist wishes to estimate the
mean phosphate content per unit
volume of lake water. It is known
from previous studies that the std.
dev. has a fairly stable value of 4mg.
How many water samples must the
limnologist analyze to be 90%
certain that the error of estimation
does not exceed 0.8 mg?
Ans:n = [1.645x4/0.8]^2=67.65 = 68
4
Ex:. You want to rent an
unfurnished one-bedroom apartment
for next semester. The mean
monthly rent for a random sample of
10 apartments advertised in the local
newspaper is $540. Assume that the
std. dev. is $80. Find a 95% CI for
the mean monthly rent for
unfurnished one-bedroom
apartments available for rent in this
community.
5
StatCrunch Commands
Stat > Z Statistics > One Sample >
with data
Ex.
Degree of Reading Power (DRP)
scores for 44 students. Assume that
the population standard deviation is
11.0.
95% CI for the population mean
score is given in the MINITAB
output below. DRP Scores
40 26 39 14 42 18 25 43 46 27
19 47 19 26 35 34 15 44 40 38
31 46 52 25 35 35 33 29 34 41
49 28 52 47 35 48 22 33 41 51
27 14 54 45
95% confidence interval results: μ : mean of Variable
Std. Dev. = 11
Variable n Sample Mean Std. Err. L. Limit U. Limit
var1 44 35.090908 1.6583124 31.840677 38.34114
6
Ex. A random sample of 85 students in
Chicago city high schools takes a course
designed to improve SAT scores. Based
on these students a 90% CI for the mean
improvement in SAT scores for all
Chicago high school students is
computed as (72.3, 91.4) points.
Which of the following statements are
true? a) 90% of the students in the sample
improved their scores by between 72.3
and 91.4 points.
b) 90% of the students in the population
improved their scores by between 72.3
and 91.4 points.
c) 95% CI will contain the value 72.3.
d) The margin of error of the 90% CI
above is 9.55.
e) 90% CI based on a sample of 340 (85
X 4) students will have margin of error
9.55/4.
7
f) If the sampling procedure were repeated
many times, with samples of 85 students
then approximately 95% of the resulting
confidence intervals would contain the
population mean.
8
Statistical tests for the population
mean ( known)
A significance test is a formal
procedure for comparing observed
data with a hypothesis whose truth
we want to assess. A hypothesis is
a statement about the parameters in
a population or model.
Null hypothesis p362
The statement being tested in a test
of significance is called the null
hypothesis. Usually the null
hypothesis is a statement of “no
effect” or “no difference”.
9
Each of the following situations requires
a significance test about a population
mean .
State the appropriate null hypothesis H0
and alternative hypothesis Ha in each
case.
(a) The mean area of the several thousand apartments in a new
development is advertised to be 1250
square feet. A tenant group thinks that
the apartments are smaller than
advertised. They hire an engineer to
measure a sample of apartments to test
their suspicion. (b) Larry's car averages 32 miles per
gallon on the highway. He now switches
to a new motor oil that is advertised as
increasing gas mileage. After driving
3000 highway miles with the new oil, he
wants to determine if his gas mileage
actually has increased.
10
(c) The diameter of a spindle in a small
motor is supposed to be 5 millimeters. If
the spindle is either too small or too
large, the motor will not perform
properly. The manufacturer measures the
diameter in a sample of motors to
determine whether the mean diameter
has moved away from the target. (a) H0: = 1250 ft
2; Ha: < 1250 ft
2 (b) H0: = 32 mpg; Ha: > 32 mpg (c) H0: = 5
mm; Ha: 5 mm.
Test Statistic p364
A test statistic measures
compatibility between the null
hypothesis and the data.
- We use it for the probability
calculation that we need for our test
of significance
- It is a random variable with a
distribution that we know.
11
Example
An air freight company wishes to
test whether or not the mean weight
of parcels shipped on a particular
route exceeds 10 pounds. A random
sample of 49 shipping orders was
examined and found to have average
weight of 11 pounds. Assume that
the std. dev. of the weights () is 2.8
pounds.
The null and alternative hypotheses
in this problem are:
: 10
0: 10
H
Ha
The test statistic for this problem is
the standardized version of X .
/XZ
n
12
11 10 2.5
2.8/ 49Z
Decision: ?
p-value p365
The probability, computed assuming
that H0 is true, that the test statistic
would take a value as extreme as or
more extreme than that actually
observed is called the p-value of the
test.
- The smaller the p-value the stronger
the evidence against H0 provided by
the data.
13
Significance level p367
The decisive value of the p is called
the significance level.
- It is denoted by .
Statistical significance p367
If the p-value is as small or smaller
than , we say that the data are
statistically significant at level .
14
Ex.
The Pfft Light Bulb Company claims
that the mean life of its 2 watt bulbs is
1300 hours. Suspecting that the claim
is too high, a consumer group
gathered a random sample of 64 bulbs
and tested each. He found the
average life to be 1295 hours. Test
the company's claim using = .01.
Assume = 20hours.
Ans: H0: mu = 1300 Ha: mu < 1300 z = (1295-1300)/(20/sqrt(64)) = -2 p-value = 0.0228 > 0.01 do not rej.
15
Ex
A standard intelligence examination
has been given for several years with
an average score of 80 and a standard
deviation of 7. If 25 students taught
with special emphasis on reading
skill, obtain a mean grade of 83 on the
examination, is there reason to believe
that the special emphasis changes the
result on the test? Use = .05.
H0: mu=80 Ha: mu not equal to 80 Z (83-80)/(7/5)= 2.14 p-value = 2x 0.0162 = 0.0324 < 0.05 rej H0
16
StatCrunch Commands
Stat > Z Statistics > One Sample >
with data
Ex. Degree of Reading Power (DRP)
scores for 44 students. The MINITAB
output for the test of : 32
0: 32
H
Ha
is given below.
Hypothesis test results: μ : mean of Variable
H0 : μ = 32
HA : μ > 32
Std. Dev. = 11
Variable n Sample Mean Std. Err. Z-Stat P-value
var1 44 35.090908 1.6583124 1.8638883 0.0312
17
Confidence Intervals and two-sided
tests p373
A level two-sided significance test
rejects a hypothesis 0 0:H exactly
when the value 0
falls outside the
1 confidence interval for .
Example
For the example above 95% CI
83 +/- 1.96 x (7/5) = (80.256, 85.744)
The value 80 is not in this interval and
so we reject H0: = 80 at the 5%
level of significance.
18
Use and abuse of Tests (6.3 p382)
- Test for mean we discussed works
for simple random samples.
- The sample must be from a normal
distribution or the sample size
must be large (CLT)
- Sample mean can be affected by
outliers and so the test
- Population standard dev must be
known
19
Strength of evidence vs decision-
making
-Best way to give result of a
significance test is to give P-value.
Shows strength of evidence against
null hyp. Enables reader to judge
whether evidence “strong enough”.
-must choose before looking at
data.
If rejecting null in favour of
alternative expensive, need strong
evidence to reject null. Use a smaller
.
= 0.05 is commonly used
20
Statistical and practical significance
(p383)
Example
When a null hypothesis (“no effect”
or no difference”) can be rejected at
some level there is good evidence
that an effect is present. But that
effect can be extremely small (may
not be even practically important)
p396
21
1) A study was carried out to investigate the
effectiveness of a treatment. 1000 subjects
participated in the study, with 500 being
randomly assigned to the "treatment group" and
the other 500 to the "control (or placebo) group".
A statistically significant difference was
reported between the responses of the two
groups (P <0 .005).
State whether the following statements are true
of false. a) There is a large difference between the effects
of the treatment and the placebo.
b) There is strong evidence that the treatment is
very effective.
c) There is strong evidence that there is some
difference in effect between the treatment and
the placebo.
d) There is little evidence that the treatment has
some effect.
e) The probability that the null hypothesis is true
is less than 0.005
22
Don’t ignore lack of significance
p384
Statistical inference is not valid for
all data sets p385
Need to use proper experimental
design and appropriate analysis, with
right kind of randomization.
In general, learn how data produced,
assess whether test/interval
meaningful.
Beware of searching for
significance p386
23
Decision Errors p393
The error made by rejecting the
null hypothesis when it is true is
called a type I error.
The probability of making a type I
error is denoted by .
The error made by accepting the
null hypothesis when it is false is
called a type II error.
The probability of making a type II
error is denoted by .
24
Significance and type I error
p396
The significance level of any
fixed level test is the probability of a
Type I error. That is is the
probability that the test will reject
the null hypothesis H0 when H0 is in
fact true.
Power and Type II error p496
The power of a fixed level test
against a particular alternative is
1 .
Note: Power = 1
= 0 0|1 ( . )P Acc H H is false
= 0 0|(Re )P jecting H H is false
25
Note: power increases as 0
increases.
Example We want to test
H0: = 300
Ha: < 300 at the 5% level of
significance.
The sample size is n = 6, and the
population is assumed to have a
normal distribution with = 3.
(a) Find the power of this test against
the alternative = 299.
(b) Find the power against the
alternative = 295.
MINITAB commands
26
Stats > Power and sample size > 1-
sample Z
Note: In MINITAB difference means
0 for 1-sided tests and
0 for
2-sided tests.
Power and Sample Size 1-Sample Z Test
Testing mean = null (versus < null)
Calculating power for mean = null +
difference
Alpha = 0.05 Assumed standard
deviation = 3
Sample
Difference Size Power
-1 6 0.203734
-5 6 0.992608
27
Power and Sample Size 1-Sample Z Test
Testing mean = null (versus < null)
Calculating power for mean = null +
difference
Alpha = 0.05 Assumed standard deviation = 3
Sample Target
Difference Size Power Actual Power
-1 78 0.9 0.903039