Section 7.1 () - People Server at UNCW

Download Report

Transcript Section 7.1 () - People Server at UNCW

Chapter 7
Inference for Means
7.1 Inference for the Mean of a Population
1
7.1 Inference for the Mean
of a Population







2
The Sampling Distribution of a Sample Mean
The Central Limit Theorem
The t Distributions
One-Sample t Confidence Interval
One-Sample t Test
Matched Pairs t Procedures
Robustness of the t Procedures
Parameters and Statistics
Remember from Chapter 6 the definitions of parameter and statistic:
A parameter is a number that describes some characteristic of the
population. In statistical practice, the value of a parameter is not
known because we cannot examine the entire population.
A statistic is a number that describes some characteristic of a
sample. The value of a statistic can be computed directly from the
sample data. We often use a statistic to estimate an unknown
parameter.
3
Statistical Estimation
The process of statistical inference involves using information from a
sample to draw conclusions about a wider population.
Different random samples yield different statistics. We need to be able to
describe the sampling distribution of possible statistic values in order
to perform statistical inference.
We can think of a statistic as a random variable because it takes
numerical values that describe the outcomes of the random sampling
process.
Population
Sample
4
Collect data from a
representative sample...
Make an inference
about the population.
Sampling Variability
Different random samples yield different statistics. This basic fact is
called sampling variability: The value of a statistic varies in repeated
random sampling.
To make sense of sampling variability, we ask, “What would happen if
we took many samples?”
Population
Sample
Sample
Sample
Sample
Sample
Sample
Sample
5
Sample
?
Sampling Distributions
The law of large numbers assures us that if we measure enough
subjects, the statistic x-bar will eventually get very close to the
unknown parameter µ.
If we took every one of the possible samples of a certain size,
calculated the sample mean for each, and graphed all of those values,
we’d have a sampling distribution.
The population distribution of a variable is the distribution of
values of the variable among all individuals in the population.
The sampling distribution of a statistic is the distribution of
values taken by the statistic in all possible samples of the same
size from the same population.
6
Mean and Standard Deviation
of a Sample Mean
Mean of a Sampling Distribution of a Sample
Mean
There is no tendency for a sample mean to fall systematically above or below m,
even if the distribution of the raw data is skewed. Thus, the mean of the
sampling distribution is an unbiased estimate of the population mean m.
Standard Deviation of a Sampling Distribution of
a Sample Mean
The standard deviation of the sampling distribution measures how much the
sample statistic varies from sample to sample. It is smaller than the standard
deviation of the population by a factor of 1 / √n.
 Averages are less variable than individual observations.
7
The Sampling Distribution
of a Sample Mean
When we choose many SRSs from a population, the sampling distribution
of the sample mean is centered at the population mean µ and is less
spread out than the population distribution. Here are the facts.
The Sampling Distribution of Sample Means
Suppose that x is the mean of an SRS of size n drawn from a large population
with mean m and standard deviation s . Then :
The mean of the sampling distribution of x is mx = m
The standard deviation of the sampling distribution of x is
sx =
s
n
Note : These facts about the mean and standard deviation of x are true
no matter what shape the population distribution has.
8
If individual observations have the N(µ,σ) distribution, then the sample mean
of an SRS of size n has the N(µ, σ/√n) distribution regardless of the sample
size n.
8
The Central Limit Theorem
Most population distributions are not Normal. What is the shape of the
sampling distribution of sample means when the population distribution isn’t
Normal?
It is a remarkable fact that as the sample size increases, the distribution of
sample means changes its shape: It looks less like that of the population and
more like a Normal distribution!
When the sample is large enough, the distribution of sample means is very
close to Normal, no matter what shape the population distribution has, as
long as the population has a finite standard deviation.
Draw an SRS of size n from any population with mean m and finite
standard deviation s . The central limit theorem (CLT) says that when n
is large, the sampling distribution of the sample mean x is approximately
Normal:
æ s ö
x is approximately N ç m,
÷
è
nø
9
Population distribution
Distribution of x-bar, n=2
Distribution of x-bar, n=10
Distribution of x-bar, n=25
Figure 7.3 The central limit theorem in action: the distribution of sample means from a strongly non-Normal population becomes more
Normal as the sample size increases. (a) The distribution of 1 observation. (b) The distribution of x for 2 observations. (c) The distribution of
x for 10 observations. (d) The distribution of x for 25 observations.
David S. Moore, George P. McCabe and Bruce A. Craig : EXPLORING the PRACTICE of STATISTICS, First Edition
Copyright © 2014 by W.H. Freeman and Company
Example
Let’s try sampling again from Table B. What does the population distribution
look like? Flat, non-normal! The mean mu = 4.5 and the sd = 2.87. Take a
sample of 10 digits and compute the mean, x-bar, of these 10 digits. Repeat the
sampling and compute a few more x-bars… what do you notice about these
sample means?
The central limit theorem states that the sampling distribution of the mean of the 10
digits should be Normal, with mean and sd given as:
m x = m = 4.5
s
2.87
sx =
=
= 0.91
n
10
So repeat this process to get 25 x-bars, put into a single column of an Excel
spreadsheet and send to me via email by 6:00 a.m. on Monday …
11
Example
Based on service records from the past year, the time (in hours)
that a technician requires to complete preventative maintenance
on an air conditioner follows the distribution that is strongly rightskewed, and whose most likely outcomes are close to 0. The
mean time is µ = 1 hour and the standard deviation is σ = 1.
Your company will service an SRS of 70 air conditioners. You have budgeted 1.1
hours per unit, on the average. Will this be enough? i.e., how likely is it that the
technicians will not complete their work within the budgeted time?
The central limit theorem states that the sampling distribution of the mean time spent
working on the 70 units is:
s
1
μx  μ 1
sx =
=
= 0.12
n
70
The sampling distribution of the mean time spent working is approximately N(1, 0.12)
because n = 70 ≥ 30.
z=
1.1 -1
= 0.83
0.12
P(x > 1.1) = P(Z > 0.83)
= 1- 0.7967 = 0.2033
If you budget 1.1 hours per unit, there is a
20% chance the technicians will not complete
the work within the budgeted time.
12
A Few More Facts
The central limit theorem notes that the
distribution of a sum or average of many small
random quantities is close to Normal.
The central limit theorem also applies to discrete
random variables.
13
The t Distributions
When the sampling distribution of x is close to Normal, we can find probabilities
involving x by standardizing:
z=
x -m
s n
When we don’t know σ, we can estimate it using the sample standard deviation
sx. What happens when we standardize?
x -m
?? =
sx n
14
This new statistic does not have a Normal distribution, but
a density that is very similar to the Z-curve.
The t Distributions
When we standardize based on the sample standard deviation sx, our
statistic has a new distribution called a t distribution.
It has a different shape than the standard Normal curve:
 It is symmetric with a single peak at 0.
 However, it has much more area in the tails.
t tells us how far x is from its mean m
in estimated standard deviation units.
There is a different t distribution for each sample size, specified by its degrees
of freedom (df).
15
The t Distributions
When we perform inference about a population mean µ using a t
distribution, the appropriate degrees of freedom are found by subtracting
1 from the sample size n, making df = n – 1.
The t Distributions; Degrees of Freedom
Draw an SRS of size n from a large population that has a Normal
distribution with mean µ and standard deviation σ. The one-sample t
statistic
x -m
t=
sx n
has the t distribution with degrees of freedom df = n – 1.
16
The t Distributions
When comparing the density curves of the standard Normal distribution
and t distributions, several facts are apparent:
 The density curves of the t distributions are
similar in shape to the standard Normal curve.
 The spread of the t distributions is a bit greater
than that of the standard Normal distribution.
 The t distributions have more probability in the
tails and less in the center than does the
standard Normal.
 As the degrees of freedom increase, the t
density curve approaches the standard Normal
curve ever more closely.
We can use Table D in the back of the book to determine critical values
t* for t distributions with different degrees of freedom.
17
One-Sample t Confidence Interval
The one-sample t interval for a population mean is similar in both
reasoning and computational detail to the one-sample z interval for a
population proportion.
The One-Sample t Interval for a Population Mean
Choose an SRS of size n from a population having unknown mean µ. A level C
confidence interval for µ is
sx
x  t*
n
where t* is the critical value for the t(n – 1) distribution.
sx
The margin of error is t *
.
n

This interval is exact when the population distribution is Normal and
approximately correct for large n in other cases.

18
Using Table D
Suppose you want to construct a 95% confidence interval for the mean µ
of a Normal population based on an SRS of size n = 12. What critical t*
should you use?
Upper-tail probability p
df
0.05
0.025
0.02
0.01
10
1.812
2.228
2.359
2.764
11
1.796
2.201
2.328
2.718
12
1.782
2.179
2.303
2.681
z*
1.645
1.960
2.054
2.326
90%
95%
96%
98%
Confidence level C
In Table D, we consult the row
corresponding to df = n – 1 = 11.
We move across that row to the
entry that is directly above 95%
confidence level.
The desired critical value is t * = 2.201.
19
Example
A manufacturer of high-resolution video terminals must control the
tension on the mesh of fine wires that lies behind the surface of the
viewing screen. The tension is measured by an electrical device with
output readings in millivolts (mV). A random sample of 20 screens has
the following mean and standard deviation:
x = 306.32 mV
and
sx = 36.21 mV
We want to estimate the true mean tension µ of all the video terminals
produced this day at a 90% confidence level.
20
Example
If the conditions are met, we can use a one-sample t interval to
estimate µ.
 Random: We are told that the data come from a random sample
of 20 screens from the population of all screens produced that day.
 Normal: Since the sample size is small (n < 30), we must check
whether it’s reasonable to believe that the population distribution is
Normal. Examine the distribution of the sample data.
These graphs give
no reason to doubt
the Normality of the
population.
 Independent: Because we are sampling without replacement, we
must assume that at least 20(20) = 400 video terminals were
produced this day.
21
Example
We are told that the mean and standard deviation of the 20 screens
in the sample are: x = 306.32 mV
and
sx = 36.21 mV
Upper-tail probability p
df
0.10
0.05
0.025
18
1.130
1.734
2.101
19
1.328
1.729
2.093
20
1.325
1.725
2.086
90%
95%
96%
Confidence level C
Since n = 20, we use the t distribution with df
= 19 to find the critical value.
From Table D, we find t* = 1.729.
Therefore, the 90% confidence interval for µ
is:
sx
36.21
x ± t*
= 306.32 ± 1.729
n
20
= 306.32 ± 14
= (292.32, 320.32)
We are 90% confident that the interval from 292.32 to 320.32 mV captures the
true mean tension in the entire batch of video terminals produced that day.
22
The One-Sample t Test
One-Sample t Test
Choose an SRS of size n from a large population that contains an unknown
mean µ. To test the hypothesis H0 : µ = µ0, compute the one-sample t statistic:
x  m0
t
sx
n
Find the P-value by calculating the probability of getting a t statistic this large
or larger in the direction specified by the alternative hypothesis Ha in a tdistribution with n – 1 degrees of freedom.

These P-values are exact if the population distribution is Normal and are
approximately correct for large n in other cases.
23
Example
The level of dissolved oxygen (DO) in a stream or river is an important indicator
of the water’s ability to support aquatic life. A researcher measures the DO level
at 15 randomly chosen locations along a stream. Here are the results in
milligrams per liter:
4.53
5.42
5.04
6.38
3.29
4.01
5.23
4.66
4.13
2.87
5.50
5.73
4.83
5.55
4.40
A dissolved oxygen level below 5 mg/l puts aquatic life at risk.
We want to perform a test at the  = 0.05 significance level of:
H0: µ = 5
Ha: µ < 5
where µ is the actual mean dissolved oxygen level in this stream.
24
Example
If conditions are met, we should do a one-sample t test for µ.
Random: The researcher measured the DO level at 15 randomly chosen
locations.
Normal: We don’t know whether the population distribution of DO levels at
all points along the stream is Normal. With such a small sample size (n = 15),
we need to look at the data to see if it’s safe to use t procedures.
The histogram looks roughly symmetric; the boxplot shows no outliers; and
the Normal probability plot is fairly linear. With no outliers or strong skewness,
the t procedures should be pretty accurate even if the population distribution
isn’t Normal.
25
Example
The sample mean and standard deviation are:
Test statistic t =
. sx = 0.9396
x = 4.771 and
x - m0
4.771- 5
=
= -0.94
sx
0.9396
15
n
P-value The P-value is the area to the left of
t = –0.94 under the t distribution curve with
df = 15 – 1 = 14.
Upper-tail probability p
26
df
0.25
0.20
0.15
13
0.694
0.870
1.079
14
0.692
0.868
1.076
15
0.691
0.866
1.074
50%
60%
70%
Confidence level C
The P-value is between 0.15 and 0.20. Since this is
greater than our  = 0.05 significance level, we fail to
reject H0. We don’t have enough evidence to
conclude that the mean DO level in the stream is less
than 5 mg/l.
Matched Pairs t Procedures
Comparative studies are more convincing than single-sample investigations.
For that reason, one-sample inference is less common than comparative
inference. Study designs that involve making two observations on the same
individual, or one observation on each of two similar individuals, result in
paired data.
When paired data result from measuring the same quantitative variable twice,
as in the job satisfaction study, we can make comparisons by analyzing the
differences in each pair. If the conditions for inference are met, we can use
one-sample t procedures to perform inference about the mean difference µd.
Matched Pairs t Procedures
To compare the responses to the two treatments in a matchedpairs design, find the difference between the responses
within each pair. Then apply the one-sample t procedures to
these differences.
27
Does a full moon affect behavior? Many people believe that the moon influences the
actions of some individuals. A study of dementia patients in nursing homes recorded
various types of disruptive behaviors every day for 12 weeks. Days were classified as
moon days if they were in a three-day period centered at the day of the full moon. For
each patient the average number of disruptive behaviors was computed for moon days
and for all other days. The data for the 15 subjects whose behaviors were classified as
aggressive are presented in Table 7.2.6 The patients in this study are not a random
sample of dementia patients. However, we examine their data in the hope that what we
find is not unique to this particular group of individuals and applies to other patients
who have similar characteristics. Look at the data on the next slide along with the
output from JMP…
Summary Statistics
Mean
2.4326667
Std Dev 1.4603203
Std Err Mean 0.3770531
Upper 95% Mean 3.2413651
Lower 95% Mean 1.6239683
N 15
Robustness of t Procedures
A confidence interval or significance test is called robust if the confidence level
or P-value does not change very much when the conditions for use of the
procedure are violated.
Using the t Procedures
Except in the case of small samples, the condition that the data are
an SRS from the population of interest is more important than the
condition that the population distribution is Normal.
Sample size at least 15: The t procedures can be used, except in
the presence of outliers or strong skewness.
Sample size less than 15: Use t procedures if the data appear
close to Normal. If the data are clearly skewed or if outliers are
present, do not use t.
Large samples: The t procedures can be used even for clearly
skewed distributions when the sample is large, roughly n ≥ 40.
30
HW for section 7.1
Carefully read all the sections of 7.1 – work through the
examples…
Work on these exercises:
#7.2, 7.3, 7.5, 7.7-7.16, 7.18, 7.19, 7.28, 7.31, 7.32,
7.34, 7.37
31