Title: Math 1530 Elements of Statistics
1Math 1530 Elements of Statistics
- Chapter 9
- Hypothesis Tests for One Population Mean
1
1
2Example
- Suppose a company produces a bags of pretzels,
claiming that the average mass per bag is 454 g
with a standard deviation of 7.8 g. -
- The quality assurance guys samples 25 random bags
and finds an average mass of 450g. - Is there any reason to be concerned?
- Use a method called hypothesis testing to answer
the question above.
3Definitions
- A hypothesis is an assumption which may or may
not be true. - In our example, our hypothesis would be the
average mass of bag of pretzel is 454 g.
4Definitions
- Null hypothesis
- A hypothesis to be tested
- denoted by H0
- When testing hypothesis about population means,
the null hypothesis takes the form - H0 µ µ0 where µ0 is some number
- For our example, the null hypothesis would be
- H0 µ 454 g
5Definitions
- Alternative hypothesis
- A hypothesis considered as an alternative to the
null hypothesis. - It is a new idea.
- denoted by Ha
- When testing hypothesis about population means,
the alternative hypothesis takes one of the three
forms. - Two-tailed hypothesis test The population mean
is different from a specific value. - Left-tailed hypothesis test The population mean
is less than a specific value. - Right-tailed hypothesis test The population mean
is greater than a specific value. - A hypothesis test is called a one-tailed test if
it is either left tailed or right tailed. -
6Examples
- Pg 385
- Q 9.6
- Q 9.8
- Q 9.10
7Basic Logic of Hypothesis Testing
- Take a random sample from the population.
- If sample data are consistent with the null
hypothesis, do not reject H0. - If sample data are inconsistent with H0 (in the
direction of the alternative hypothesis), reject
H0 in favor of Ha.
8Example Pretzels
- A company uses a machine to produce bags of
pretzels with mean mass 454 g. Assume that the
net weight of bags is normally distributed. The
Quality Assurance guys would like to test the
working of the machine. They randomly pick 25
bags whose masses are shown in the table. Does
the data provide sufficient evidence to conclude
that the machine is not working properly? - Assume the masses of the pretzel bags have a
normal distribution with standard deviation 7.8
g.
Taken from Elements of Statistics, by Neil Weiss
- State H0 and Ha.
- Discuss the logic behind the test.
- What is the distribution of for samples of
size 25?
9Criterion for rejecting H0 in favor of Ha
- If the mean weight, , of the 25 bags of
pretzels sampled is more than two standard
deviations (3.12 g) from 454 g, reject the null
hypothesis and conclude that the alternative
hypothesis is true. Otherwise, do not reject the
null hypothesis.
Taken from Elements of Statistics, by Neil Weiss
10 Apply this Criterion to the sample data
- The mean weight, , of the sample of 25 bags of
pretzels whose weights are given is 450g. - So, z ( - 454) / 1.56 (450 - 454) /1.56
-2.56. - Thus, the sample mean of 450 g is 2.56 standard
deviations below the null-hypothesis population
mean of 454 g, as shown in the figure
Taken from Elements of Statistics, by Neil Weiss
11Terminology for Hypothesis Tests
- The test statistic is the statistic used for
deciding whether or not the null hypothesis
should be rejected. - Rejection region is the set of values for the
test statistic that leads to the rejection of the
null hypothesis. - Non-Rejection region is the set of values for the
test statistic that leads to the non-rejection of
the null hypothesis. - Critical values are the numbers that separate the
rejection and non-rejection regions.
12Rejection Regions and Critical Values
Taken from Elements of Statistics, by Neil Weiss
13Type I and Type II Error
- The significance level is the probability of
making a Type I error. - is the probability of making Type II error,
and depends on the true value of . - When performing hypothesis tests, we generally
want to minimize the error probabilities and
.
14Power of a hypothesis Test
- The power of a hypothesis test is the probability
of not making a Type II error, - Thus,
- Power 1- P( Type II error)
- 1- ß
15Taken from Elements of Statistics, by Neil Weiss
16Example ( Agricultural Books)
- Pg 393 Q 9.30
- In 2000, the mean retail price of agriculture
books was 66.52. A hypothesis test is to be
performed to decide whether this years main
retail price of agriculture books has changed
from the 2000 mean. The null and the alternative
hypothesis are - H0 µ 66.52 and
- Ha µ ? 66.52
- where µ is this years mean retail price of
agricultural books. Explain what each of the
following would mean. - Type 1 error Type II error Correct Decision
17Example ( Agricultural Books)
- Pg 393 Q 9.30
- Now suppose that the results of carrying out the
hypothesis test leads to the rejection of the
null hypothesis. Classify that conclusion by
error type or as a correct decision if in fact
this years retail price of a agriculture books. - Equals the 2000 mean of 66.52
- Differs from the 2000 mean of 66.52
18Example Early-Onset Dementia
- Pg 394 Q 9.32
- A hypothesis test is to be performed to decide
whether the - mean age at diagnosis of all people with
early-onset dementia - is less than 55 years old. The null and the
alternative - hypothesis are
- H0 µ 55 years old and
- Ha µ lt 55 years old
- where µ is the mean age at diagnosis of all
people with early onset dementia. Explain what
each of the following would mean. - Type 1 error Type II error Correct Decision
19Example Early-Onset Dementia
- Pg 394 Q 9.32
- Now suppose that the results of carrying out the
hypothesis test leads to the nonrejection of the
null hypothesis. Classify that conclusion by
error type or as a correct decision if in fact
the mean age at diagnosis of all people with
early onset dementia - is 55 years old.
- is less than 55 years old.
20Obtaining Critical Values
- Suppose that a hypothesis test is to be performed
at the significance level, a, then the critical
values must be chosen so that, if the null
hypothesis is true, the probability is a that the
test statistic will fall in the rejection region.
21Examples Critical Values
- Pg 405
- A hypothesis test is to be performed for a
population mean with a null hypothesis of H0 µ
µ0. Further suppose that the test statistic is
, - Determine the critical values for the following
and sketch the graph - (Q 9.44) A two-tailed test with a 0.10
- (Q 9.46) A left-tailed test with a 0.01
- (Q 9.48) A right-tailed test with a 0.01
22One Sample z-Test for a Population Mean
- Necessary assumptions
- 1. Simple random sample.
- 2. Population has a normal distribution,
- or the sample size is large (n 30).
- 3. s is known.
- State H0 and Ha.
- Set the significance level a and determine the
critical value(s). - Compute the test statistic
- Reject H0 in favor of Ha if the test statistic is
in the rejection region, otherwise do not reject
H0.
23Example Probability Books
- The mean retail price of probability books was
81 in 2002. - 35 random retail prices of probability books (in
) from this year are - At the 1 significance level, do the data provide
sufficient evidence that this years mean price
increased? Assume s 7.
24P-Values
- Assuming H0 is indeed true, the P-value is the
probability of observing a value of the test
statistic as or more extreme than that observed. - Small P-values (close to 0) provide evidence
against the null hypothesis. - Large p-values do not.
25P-Values
- For a right-tailed test,
- P-value P(Z gt z0).
- For a two-tailed test,
- P-value P(Z gtz0).
- For a left-tailed test,
- P-value P(Z lt z0).
26Examples
- Pg 416
- Q. 9.90
- Q. 9.92
- Q. 9.94
27Decision Criteria for a hypothesis test using the
P-Value
- If the P-value is less than or equal to
significance level, reject the null hypothesis (
H0 ) otherwise we do not. - Example ( Pg 416)
- Q. 9.78
28Guidelines for using P-values
29One Sample z-Test for a Population Mean The
P-value Approach
- Necessary assumptions
- 1. Simple random sample.
- 2. Population has a normal distribution,
- or the sample size is large (n 30).
- 3. s is known.
- State H0 and Ha.
- Set the significance level a.
- Compute the test statistic
- Reject H0 if P-value lt a.
30Example Calcium from Elementary Statistics by
Neil Weiss
- Daily calcium intakes (in mg) for 18 randomly
selected people below the poverty level are - Assume the population is approximately normal and
s 188 mg. - Do the data provide sufficient evidence to
conclude at the 5 significance level the mean
calcium intake of people below the poverty level
is less that the RDA of 800 mg?
31 Hypothesis Test for One Population Mean When s
is unknown
- When the population standard deviation is
unknown, we use the sample standard deviation. - Use t-values instead of the z-values
- Assume a simple random sample and a normal
population or large sample with n 30. - Use either the critical value or the P-value
approach
32P-Values for the t-test
- For a right-tailed test,
- P-value P(t gt t0).
- For a two-tailed
test, - P-value P(t
gtt0). - For a left-tailed test,
- P-value P(t lt t0).
33 One Sample t-Test for a Population Mean
- Necessary assumptions
- 1. Simple random sample.
- 2. Population has a normal distribution,
- or the sample size is large (n 30).
- 3. s is unknown.
- State H0 and Ha.
- Set the significance level a and determine the
critical value(s). - Compute the test statistic
- Reject H0 in favor of Ha if t is in the rejection
region, and fail to reject H0 otherwise.
34Examples
35Hypothesis Tests Summary
- Two kinds of hypothesis tests for population
means - When s is known, perform a z-test.
- When s is not known, perform a t-test.
- Null hypotheses for population means take form of
µ µ0. - Alternative hypotheses for population means take
one of three forms - Can also test using the P-value approach.
36Finish reading Chapter 9 and do the homework.