Download Inferences on a Population Mean

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

Bootstrapping (statistics) wikipedia , lookup

Taylor's law wikipedia , lookup

Foundations of statistics wikipedia , lookup

Statistical hypothesis testing wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Misuse of statistics wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
Inferences on a Population Mean
Chapter 8
Inferences on A Population Mean
1
8.0 Introduction
Nationally, the average score on the mathematics portion
of the SAT was 518 (out of 800) in 2006. Suppose
researchers in Utah are interested in evaluating how
their state is doing preparing students for the SAT.
What questions might the researchers want to answer
about the performance of Utah students?
What is the population the researchers are interested in?
What are the parameters and statistics of interest?
Inferences on A Population Mean
2
8.0 Introduction
Recall: Statistical inference is the science of deducing
properties of an underlying probability distribution from a
sample.
Inferences on A Population Mean
3
8.0 Introduction
There are two main aspects of inference:
1. Estimation: estimation allows us to address
questions such as “what was the average SAT
score of Utah high school seniors in 2006?”
2. Hypothesis testing: hypothesis testing enables
us to assess whether the average score in
Utah was different from the average score
nationwide.
Inferences on A Population Mean
4
8.1 Confidence Intervals
Suppose we gather a random sample of 50 Utah high school students
who took the SAT in 2006 and found that for this sample, the
average math score was 525 and the standard deviation was 25
points. Find c such that P( n (X - μ ) / S ≤ c) = 0.95 |.
We can use the value of c to find an interval around X . This interval
is a 95% confidence interval for the mean SAT math score for
Utah high school students who took the SAT in 2006.
A confidence interval for an unknown parameter θ contains a set of
plausible values of the parameter. It is associated with a
confidence level 1-α, which specifies the probability that the
confidence interval actually contains the unknown parameter
value.
Inferences on A Population Mean
5
Inferences on A Population Mean
6
8.1 Confidence Intervals
If the size of the sample, n, is 30 or more or if the underlying data
are approximately normally distributed (n can be anything), then
the sample mean has a t-distribution and we can use this to
conduct inference.
A 1-α level confidence interval or two-sided t-interval for population
mean μ based on a sample of n observations is
tα / 2,n −1s
tα / 2,n −1s ⎞
⎛
⎟⎟
μ ∈ ⎜⎜ x −
,x +
n
n ⎠
⎝
Where x is the sample mean and s is the sample standard
deviation.
Inferences on A Population Mean
7
8.1 Confidence Intervals
tα / 2,n −1s
tα / 2,n −1s ⎞
⎛
⎟⎟
μ ∈ ⎜⎜ x −
,x +
n
n ⎠
⎝
•
μ is the true, unknown, value of the population parameter.
x
• is the observed value of the test statistic and the center of the
confidence interval.
• The margin of error is given by
tα / 2,n −1s
n
• tα/2 is used since for a (1-α)*100% interval, there must be α/2%
not covered by the interval on either side.
Inferences on A Population Mean
8
8.1 Confidence Intervals
All else being equal, as the confidence level
increases, does the length of the interval increase
or decrease?
All else being equal, as the sample size increases,
does the length of the interval increase or
decrease?
Inferences on A Population Mean
9
8.1 Confidence Intervals
One-sided 1-α level confidence intervals or t-intervals
for population mean μ based on n observations are
given by
tα ,n −1s ⎞
⎛
⎟⎟
μ ∈ ⎜⎜ − ∞, x +
n ⎠
⎝
and
tα ,n −1s ⎞
⎛
μ ∈ ⎜⎜ x −
, ∞ ⎟⎟
n
⎝
⎠
These provide upper and lower bounds for μ
respectively. Again, x is the sample mean and s is the
sample standard deviation.
Inferences on A Population Mean
10
8.1 Confidence Intervals
When the population variance is known, then a 1-α level
confidence interval for population mean μ is given by the z-interval
zα / 2σ
zα / 2σ ⎞
⎛
,x +
μ ∈⎜ x −
⎟
n
n ⎠
⎝
One-sided z intervals for the population mean μ are
zα σ ⎞
⎛
μ ∈ ⎜ − ∞, x +
⎟
n ⎠
⎝
and
zα σ
⎛
⎞
,∞⎟
μ ∈⎜ x −
n
⎝
⎠
Where x denotes the sample mean and σ is the population
standard deviation.
Inferences on A Population Mean
11
8.1 Confidence Intervals
In practice, one-sided confidence intervals are
seldom used. Furthermore, the population
standard deviation is generally unknown. Thus
confidence intervals are usually two-sided tintervals.
Inferences on A Population Mean
12
8.1 Confidence Intervals
• (1 – α)100% is the confidence level. We are (1 – α)100%
confident that the computed interval covers the population
mean μ.
• α is generally quite small, usually 0.05 or 0.01, so that we have
a high level of confidence. Thus 95% and 99% CIs are most
common.
• The value α is the probability that the confidence interval does
not cover μ. We accept some probability that the
interval doesn’t cover μ in order to infer something
meaningful about the population.
Inferences on A Population Mean
13
8.1 Confidence Intervals
• A confidence interval for μ represents a set of
plausible values for μ that are consistent with the
observed data.
• The interval is random – μ is fixed!!
• Increasing the sample size improves the estimate,
thus, all else being equal, as the sample size
increases, the confidence interval shortens.
Inferences on A Population Mean
14
8.1 Confidence Intervals
A sample of 61 bottles of chemical solution is obtained and the
solution densities are measured (in lbs. per gallon – ppg). The
sample mean and standard deviation are 0.768 ppg and 0.0231
ppg respectively.
• Construct a 95% confidence interval for the average solution
density.
• How many additional bottles should be sampled to construct a
95% confidence interval no longer than 0.01 ppg?
• Is it plausible that the average solution density is less than
0.77 ppg? 0.75 ppg?
Inferences on A Population Mean
15
8.1 Confidence Intervals
A random sample of 16 one-kg sugar packets is obtained
and the actual weights of the packets are measured.
The sample mean is 1.053 kg and the sample standard
deviation is 0.058 kg.
• Construct a 99% confidence interval for the average
sugar package weight.
• Is it plausible that the average weight is 1.025 kg?
Inferences on A Population Mean
16
8.2 Hypothesis Testing
The weight of the sugar packets is nominally 1 kg. Are the
data we observed in our sample consistent with this
average?
Hypothesis Testing allows us to assess the plausibility of a
specific statement or hypothesis.
Essentially, we want to address the question “Could the
difference between the observed sample mean (1.053
kg) and the “known” population mean (1 kg) be due to
chance?”
Inferences on A Population Mean
17
8.2 Hypothesis Testing
We assess the plausibility of a particular hypothesis about
the mean by:
1. Stating hypotheses.
2. Collecting data from a sample and record the value of
the sample mean and its standard error.
3. Constructing a test statistic to quantify the difference
between what we actually observe and what we
expected to observe.
4. Computing the probability of observing the data we did
if the initial (null) hypothesis is true (p-value).
Inferences on A Population Mean
18
8.2 Hypothesis Testing
Null Hypothesis: A statements that the observed difference in what
we expected to observe in our experiment and what we actually
observed is due to chance.
A null hypothesis for a population mean μ designates possible values
for μ.
e.g. H0: μ=μ0
Alternative Hypothesis: A statement that the observed difference is
“real” or not due to chance. The “opposite” of the null
hypothesis.
An alternative hypothesis for a population mean μ is the “opposite”
of the null hypothesis.
e.g. HA: μ≠μ0
Inferences on A Population Mean
19
8.2 Hypothesis Testing
Two-sided hypotheses:
H0: μ=μ0 versus HA: μ≠μ0
One-sided hypotheses:
H0: μ≤μ0 versus HA: μ>μ0
or
H0: μ≥μ0 versus HA: μ<μ0
The alternative hypothesis is the statement of the suspicions we have
about the data. It is sometimes easier to set up the alternative
hypothesis first.
Inferences on A Population Mean
20
8.2 Hypothesis Testing
The weight of the sugar packets is nominally 1 kg.
Are the data we observed consistent with this
average?
H0: μ=1 kg versus HA: μ≠1 kg
Inferences on A Population Mean
21
8.2 Hypothesis Testing
A test statistic is used to quantify the difference between what we
expected to observe and what we actually observed in our data.
We know from the previous chapter that the sample mean has a tdistribution when the sample size is sufficiently large or the
underlying data are approximately normally distributed.
Furthermore, under the null hypothesis, the expected value of this
distribution is μ0 . Consider drawing many samples from the data.
For each sample we can find a test statistic to quantify the distance
of the sample mean x from μ0. If the null hypothesis is true, most
sample averages will be “close to” μ0. A value very different from
μ0 (hence a test statistic with large magnitude) is unlikely.
Therefore when we observe an extreme value, this gives us
evidence against the null hypothesis.
Inferences on A Population Mean
22
8.2 Hypothesis Testing
To test the hypothesis H0: μ=μ0 versus HA: μ≠μ0 based on a
sample of n observations with sample mean and
x sample
standard deviation s, the t-statistic is
n ( x − μ0 )
t=
s
• Find the value of the test statistic for the sugar example.
n ( x − μ0 )
16 (1.053 − 1)
t=
=
= 3.66
s
0.058
Inferences on A Population Mean
23
8.2 Hypothesis Testing
The p-value is the probability of obtaining the data we observed or
data more extreme (less consistent with H0) if H0 is true.
Example: Suppose I toss a coin 10 times and get 9 heads. If we
assume the coin is fair, what is the probability that I get 9 or 10
heads (the data observed or something more extreme)? Is that
probability small enough to convince you that the coin is not fair?
What if I toss the coins 100 times and get 99 heads?
A small p-value tells us that our data are unlikely to occur if the null
hypothesis is true, thus is provides evidence against the null
hypothesis.
Inferences on A Population Mean
24
8.2 Hypothesis Testing
The p-value for the hypothesis test of H0: μ=μ0 versus HA: μ≠μ0
based on a sample of n observations with sample mean x and
sample standard deviation s, is given by p = 2P(X≥|t|) where X
has a t-distribution with n-1 degrees of freedom.
The p-value for the hypothesis test of H0: μ ≥ μ0 versus HA: μ <
μ0 is given by p=P(X ≤ t) where X has a t-distribution with n-1
degrees of freedom.
The p-value for the hypothesis test of H0: μ ≤ μ0 versus HA: μ>μ0
is given by p = P(X ≥ t) where X has a t-distribution with n-1
degrees of freedom.
Inferences on A Population Mean
25
8.2 Hypothesis Testing
A small p-value indicates that the null hypothesis is not plausible.
“Small” is defined by the significance level α or size of the test. If p<α we
say the null hypothesis is implausible and the results are “statistically
significant”. We usually use α=0.05, but this is entirely arbitrary.
When the null hypothesis is not plausible (p<α), we “reject the null”.
When the null hypothesis is plausible (p>α) we “fail to reject” or accept
the null.
We cannot prove or disprove the null hypothesis, we only show that it is
plausible or not.
Statistical significance does not imply practical significance.
Inferences on A Population Mean
26
8.2 Hypothesis Testing
• Find the p-value for the sugar example and draw conclusions for
α=0.05.
Using a table, we can find a range of possible values for p:
0.001 < P(X ≥ |t|) < 0.005
⇒ 0.002 < 2P(X ≥ |t|) < 0.01
Using software, we can find the exact p-value
p = 2P(X ≥ |t|) = 2P(X ≥ 3.66) =0.0023
Thus we reject the null hypothesis and conclude that the average
weight of the sugar packets is not 1 kg.
Inferences on A Population Mean
27
8.2 Hypothesis Testing
1. Set up the null and alternative hypotheses.
2. Sample data from the population and compute the
sample mean and its standard error.
3. Compute a test statistic assuming that the null
hypothesis is true.
4. Calculate the p-value, the probability of observing our
data if the null hypothesis is true.
5. Draw conclusions based on the p-value. Small values
(usually < 5%) indicate that the null hypothesis is not
plausible.
Inferences on A Population Mean
28
8.2 Hypothesis Testing
Suppose we gather a random sample of 50 Utah
high school students who took the SAT in 2006
and found that for this sample, the average math
score was 525 and the standard deviation was 25
points. Is this evidence that the average SAT
score for a Utah student is greater than the
national average (518)?
Inferences on A Population Mean
29
8.2 Hypothesis Testing
1. A random sample of 28 plastic items is obtained, and their
breaking strengths are measured. The sample mean is 7.22
units and the sample standard deviation is 0.672 units. Is there
evidence that the breaking strength is not 7 units?
2. A company is planning a large telephone survey and is interested
in assessing how long it will take. In a short pilot study, 40
people are contacted by telephone and are asked the specified
set of questions. The times of these 40 telephone surveys have a
mean of 9.39 minutes with a standard deviation of 1.041
minutes. Can the company safely conclude that the telephone
surveys will last on average no more than 10 minutes? What are
the appropriate null and alternative hypotheses?
Inferences on A Population Mean
30
8.2 Hypothesis Testing
What is the relationship between hypothesis testing
and confidence intervals?
The values within the (1 – α)100% t-interval
represent values of μ0 for which we would fail to
reject H0: μ = μ0 at the significance level α. All of
the values outside of the confidence interval are
values for which we would reject H0: μ = μ0 at
the α-level.
Inferences on A Population Mean
31
8.2 Hypothesis Testing
Suppose a 95% CI for the average weight of
newborn babies in the US based on a sample of
size 1000 is (7.025, 7.775).
• Would you reject H0: μ = 7.5 lbs using
significance level α=0.05?
• Would you reject H0: μ = 7 lbs at level α=0.05?
At significance level α=0.1?
Inferences on A Population Mean
32
8.2 Hypothesis Testing
What information does the test statistics give us?
What does a p-value mean in terms of the null hypothesis?
We conduct a study testing regarding the average GPA of
USU students. Testing the null hypothesis H0=2.7, we
get a p-value p=0.001. Is it safe to say that we have
proven that the average GPA is not 2.7? Explain.
Inferences on A Population Mean
33