Chapter 3 Test of Hypothesis
Chapter 3 Test of Hypothesis
HYPOTHESES
Chapter 3
INTRODUCTION
▪ a parameter can be estimated from sample data either by a single number
(a point estimate) or an entire interval of probable values (a confidence
interval)
▪ the problem confronting the scientist or engineer is not so much the
estimation of a population parameter
▪ but to form a data-based decision procedure that can produce a conclusion
about some scientific system
▪ medical researcher may decide on the basis of experimental evidence
whether coffee drinking increases the risk of cancer in humans
INTRODUCTION
▪ an engineer might have to decide on the basis of sample data whether
there is a difference between the accuracy of two kinds of gauges
▪ a sociologist might wish to collect appropriate data to enable him or her to
decide whether a person’s blood type and eye color are independent
variables
▪ the objective of an investigation is not to estimate a parameter but to
decide which of two contradictory claims about the parameter is correct.
▪ methods for accomplishing this consist of the part of statistical inference
called hypothesis testing.
INTRODUCTION
▪ A statistical hypothesis ,or just hypothesis, is a claim or assertion either
about the value of a single parameter (population characteristic or
characteristic of a probability distribution), about the values of several
parameters, or about the form of an entire probability distribution
▪ One example of a hypothesis is the claim “The true average inside
diameter of a certain type of PVC pipe is 0.75.”
▪ Another example is the statement “The proportion of defective circuit
boards among all circuit boards produced by a certain manufacturer
is lower than 10%.”
INTRODUCTION
▪ In any hypothesis-testing problem, there are two contradictory hypotheses
under consideration.
▪ The null hypothesis, denoted by H0, is the claim that is initially assumed
to be true (the “prior belief” claim).
▪ The null hypothesis always emphasizes equality, no difference, no
relationship, or no effect.
Ho: μ=0.75
Ho: P=0.10
Ho: μ1= μ2
INTRODUCTION
▪ The alternative hypothesis, denoted by Ha, is the statement that is
contradictory to H0. It is oftentimes referred to as the researcher’s
hypothesis.
Ha: μ≠0.75 Ha: P<0.10
▪ The alternative to the null hypothesis Ho: =0 will look like one of the
following three assertions:
Ha: ≠0
Ha: >0 (in which case the implicit null hypothesis is Ho: ≤0)
Ha: <0 (in which case the implicit null hypothesis is Ho: ≥0)
INTRODUCTION
▪ Suppose a company is considering putting a new type of coating on
bearings that it produces. The true average wear life with the current
coating is known to be 1000 hours. Let μ be the true average life for the
new coating.
Ho: μ=1000
Ha: μ≠1000
INTRODUCTION
▪ An engineer has suggested a change in the production process in the
belief that it will result in a reduced defective rate by 10%. Let P denote the
true proportion of defective boards resulting from the changed process.
Ho: P≥0.10
Ha: P<0.10
INTRODUCTION
▪ The null hypothesis will be rejected in favor of the alternative hypothesis
only if sample evidence suggests that H0 is false.
▪ If the sample does not strongly contradict H0, we will continue to believe in
the plausibility of the null hypothesis.
▪ The two possible conclusions from a hypothesis-testing analysis are:
reject H0 or fail to reject H0.
▪ Sometimes an investigator does not want to accept a particular claim
unless and until sample data can provide strong support for the claim.
INTRODUCTION
▪ A test procedure or simply a test is a rule, based on sample data, for
deciding whether to reject H0 or not
▪ A test procedure is specified by the following:
1. A test statistic, a function of the sample data on which the decision
(reject H0 or do not reject H0) is to be based
2.A rejection region, the set of all test statistic values for which H0 will
be rejected
General Rule: The null hypothesis will then be rejected if and only if the
observed or computed test statistic value falls in the rejection region.
INTRODUCTION
▪ A test could be one-tailed or two-tailed
▪ A two-tailed test has rejection regions in both tails, a left-tailed test has
the rejection region in the left tail, and a right-tailed test has the rejection
region in the right tail of the distribution curve of the test statistic.
▪ The type of test is determined by the form of the alternative hypothesis
INTRODUCTION
▪ Let Ho: μ=100
Ha: μ<100
rejection region Non-rejection region
critical value
Ha: μ>100
Non-rejection region rejection region
critical value
Ha: μ≠100
rejection regions
INTRODUCTION
Exercise: Write the null and alternative hypotheses for each of the following
examples. Determine if each is a case of a two-tailed, a left-tailed, or a right-
tailed test.
a. To test if the mean number of hours spent working per week by college
students who hold jobs is different from 20 hours.
b. To test whether or not a bank’s ATM is out of service for an average of
more than 10 hours per month.
c. To test if the mean length of experience of airport security guards is
different from 3 years.
INTRODUCTION
Exercise: Write the null and alternative hypotheses for each of the following
examples. Determine if each is a case of a two-tailed, a left-tailed, or a right-
tailed test.
d. To test if the mean credit card debt of college seniors is less than
PhP1500.
e. To test if the mean time a customer has to wait on the phone to speak to a
representative of a mail-order company about unsatisfactory service is
more than 12 minutes.
INTRODUCTION
▪ Since the decision to reject or not to reject the null hypothesis is solely
based on the data in the sample, through the test statistic, we may commit
wrong decisions
▪ A type I error occurs when one decides to reject the null hypothesis when
it is true.
▪ A type II error involves not rejecting H0 when H0 is false.
▪ The probabilities of committing these errors are traditionally denoted by
and , respectively.
▪ A good test procedure is one for which the probability of making either type
of error is small.
INTRODUCTION
▪ A level of significance is the maximum probability of Type I error the
researcher is willing to commit (α)
▪ It must be small as possible: 1%, 5%, or 10%
▪ The decision to reject or not to reject the null hypothesis is based on the
information provided by the sample.
▪ This information can be in the form of a test statistic or a p-value since
both measure the agreement between the sample data and the null
hypothesis
INTRODUCTION
▪ The p-value is the probability of getting the observed value of the test
statistic at least that extreme (in the direction of the alternative hypothesis)
assuming the null hypothesis were true
▪ Small p-values suggest that the null hypothesis is very unlikely to be true
▪ The decision to reject or not the null hypothesis can be based on either the
critical value or p-value
INTRODUCTION
▪ Critical value approach: For a given α, look for the critical value from a
statistical table.
Reject Ho if test stat.≥ critical value; otherwise, fail to reject Ho (right-tailed
test)
Reject Ho if test stat.≤ critical value; otherwise, fail to reject Ho (left-tailed
test)
Reject Ho if |test stat.|≥ critical value; otherwise, fail to reject Ho (two-tailed
test)
▪ p-value approach: Reject Ho if p-value ≤ α; otherwise, fail to reject Ho.
INTRODUCTION
1. Formulate the null and alternative hypotheses.
2. Specify a (fixed) level of significance ().
3. Identify a test statistic and compute its value.
4. State the decision rule.
5. Make a decision.
6. Interpret results. Make a conclusion.
Tests About a Population Mean
Tests About a Population Mean
Degrees of freedom
Tests About a Population Mean
1. The tests cited earlier are exact α-level tests for samples from a normal
distribution. However, they provide good approximate α-level tests when
the distribution is not normal provided that the sample is large, i.e. n>30
2. If σ is unknown and n>30, use the test in (a) by replacing the test statistic
by
𝑥−𝜇
𝑧=𝑠
ൗ 𝑛
3. Degrees of freedom (df) refers to number of values that are free to vary
after certain restrictions have been imposed on all values
Tests About a Population Mean
EXAMPLE 1: A manufacturer of sprinkler systems used for fire protection in
office buildings claims that the true average system-activation
temperature is 130°F. A sample of 9 systems, when tested, yields a
sample average activation temperature of 131.08°F. If the distribution of
activation times is normal with standard deviation 1.5°F, does the data
contradict the manufacturer’s claim at 1% significance level?
SOLUTION:
1. Ho: μ=130 2. α=0.01 3.. Test statistic: Z (because σ =1.5 is
Ha: μ≠130 known)
Tests About a Population Mean
Computations:
𝑝 − 𝑣𝑎𝑙𝑢𝑒 = 2 × 𝑃 𝑍 > 2.16
𝑥 − 𝜇0 131.08 − 130
𝑧= 𝜎 = = 2.16 = 2 0.0154
ൗ 𝑛 1.5ൗ
9 = 0.0308
4. Decision Rule:
a. Reject Ho if |z| ≥ z0.01/2= 2.575; else, do not reject Ho.
b. Reject Ho if p-value<=0.01,else do not reject Ho.
5. Decision: Do not reject Ho since 2.16<2.575 (Also, p-value>0.01).
6. Conclusion: At 1% level of significance, the data does not give strong
support to the claim that the true average differs from the design value
of 130.
Tests About a Population Mean
EXAMPLE 2: The management of Priority Health Club (PHC) claims that its
members lose an average of 10 pounds or more within the first month
after joining the club. A consumer agency that wanted to check this claim
took a random sample of 36 members of this health club and found that
within the first month of membership they lost an average of 9.2 pounds
with a standard deviation of 2.4 pounds. Is the sample data sufficient to
contradict the claim of the PHC management? What will your decision be
if α=0.01? What if α=0.05?
Tests About a Population Mean
EXAMPLE 3: A paint manufacturing company claims that the mean drying
time for its paints is not longer than 45 minutes. A random sample of 20
gallons of paints selected from the production line of this company
showed that the mean drying time for this sample is 49.50 minutes with a
standard deviation of 3 minutes. Assume that the drying times for these
paints have a normal distribution. Is the sample evidence sufficient to
support the claim of the company? Use α=0.05.
Tests About a Population Variance
▪ Suppose that we wish to test the hypothesis that the variance of a normal
population σ2 equals a specified value, say σ02,or equivalently, that the
standard deviation σ is equal to σ0.
▪ Ho: σ2=σ02 Alternative Hypothesis Rejection Region
Ha: σ2≠σ02 𝜒𝑐2 ≥ 𝜒𝛼2 ,𝑑𝑓 or 𝜒𝑐2 ≤ 𝜒1−
2
𝛼
,𝑑𝑓
2 2
2
Ha: σ2>σ02 𝜒𝑐2 ≥ 𝜒𝛼,𝑑𝑓
2
Ha: σ2<σ02 𝜒𝑐2 ≤ 𝜒1−𝛼,𝑑𝑓
𝑛 − 1 𝑠 2
▪ Test statistic: 𝜒𝑐2 =
𝜎02
Tests About a Population Variance
An automated filling machine is used to fill bottles with liquid detergent. A
random sample of 20 bottles results in a sample variance of fill volume of
s2= 0.0153 sq. fl. oz. If the variance of fill volume exceeds 0.01 sq. fl. oz., an
unacceptable proportion of bottles will be underfilled or overfilled. Is there
evidence in the sample data to suggest that the manufacturer has a problem
with underfilled or overfilled bottles? Use α= 0.05, and assume that fill volume
has a normal distribution.
SOLUTION:
1. Ho: σ2≤0.01 2. α=0.05 3. Test statistic: χ2
Ha: σ2>0.01
Tests About a Population Variance
Computations:
2
2
𝑛 − 1 𝑆 20 − 1 0.0153
𝜒 = 2 = = 29.07 𝑝 − 𝑣𝑎𝑙𝑢𝑒 = 0.0648
𝜎0 0.01
4. Decision Rule:
a. Reject Ho if χ2 ≥χ2 0.05,19=30.144; else, do not reject Ho.
b. Reject Ho if p-value=0.0648<=0.05,else do not reject Ho.
5. Decision: Do not reject Ho since 29.07<30.144 (Also, p-value>0.05).
6. Conclusion: At 5% level of significance, there is no strong evidence that
the variance of fill volume exceeds 0.01 sq. fl. oz. So, there is no strong
evidence of a problem with incorrectly filled bottles.
Comparing variances of two independent
normal populations
Ho Test statistic Ha Rejection Region
2 2 𝐹𝑐 ≥ 𝐹𝛼,
2 2 𝜎1 ≠ 𝜎2
max 𝑠1 , 𝑠2 2
𝑣1 ,𝑣2
𝜎12 = 𝜎22 𝐹𝑐 = 2 2
min 𝑠1 , 𝑠2
𝜎12 > 𝜎22 𝐹𝑐 ≥ 𝐹𝛼, 𝑣1 ,𝑣2
Comparing variances of two independent
normal populations
Two chemical companies can supply a raw material. The concentration of a
particular element in this material is important. The mean concentration for both
suppliers is the same, but you suspect that the variability in concentration may
differ for the two companies. The standard deviation of concentration in a
random sample of n1=10 batches produced by company 1 is s1=4.7 grams per
liter, and for company 2, a random sample of n2=16 batches yields s2=5.8 grams
per liter. Is there sufficient evidence to conclude that the two population
variances differ? Use α = 0.05.
SOLUTION:
1. Ho: σ12=σ22 vs Ha: σ12≠σ22 2. α=0.05 3. Test statistic: F
Comparing variances of two independent
normal populations
SOLUTION: max 𝑠12 , 𝑠22 5. 82
𝐹= 2 2 = 4. 72 ≅ 1.52 𝑝 − 𝑣𝑎𝑙𝑢𝑒 = 0.2666
min 𝑠1 , 𝑠2
4. Decision Rule:
a. Reject Ho if F ≥F 0.025, (15,9)=3.77; else, do not reject Ho.
b. Reject Ho if p-value=0..5312<=0.05,else do not reject Ho.
5. Decision: Do not reject Ho since 1.52<3.77 (Also, p-value>0.05).
6. Conclusion: At 5% level of significance, there is no sufficient evidence to
conclude that the two population variances differ.
Independent vs dependent samples
Common study designs that will generate dependent samples:
1. Same set of subjects measured before and after receiving some treatment
2. Pair of twins or siblings assigned randomly to two treatments in such a way
that members of a single pair receive different treatments
3. In comparing two methods of measuring tensile strength, the material to be
analyzed may be divided into halves so that one-half is analyzed by one
method and the other half is analyzed by the other method.
Comparing means of two independent
normal populations
Comparing means of two independent
normal populations (large samples)
Hypotheses:
Ho: There is no difference in the means of the two populations (μ1= μ2).
1. Ha: μ1≠ μ2
2. Ha: μ1> μ2
𝑥1 − 𝑥2
3. Ha: μ1< μ2 𝑧=
𝑥1 − 𝑥2 2 2
Test statistic: Z 𝑧= 𝑠1 𝑠
+ 2
𝑛1 𝑛2
𝜎12 𝜎22
𝑛1 + 𝑛2 If population variances are unknown,
but sample sizes are large (n≥30)
If population variances are known
Comparing means of two independent
normal populations (large samples)
Two machines are used for filling plastic bottles with a net volume of 16.0
ounces. The fill volume can be assumed to be normal with standard deviation
σ1=0.020 and σ2=0.025 ounces. A member of the quality engineering staff
suspects that both machines do not fill to the same mean net volume. A
random sample of 10 bottles is taken from the output of each machine. The
data for each sample are given below. Do you think the engineer is correct?
Use α = 0.05. What is the p-value for this test?
Machine n ഥ
𝒚 s
1 10 16.015 0.030
2 10 16.005 0.025
Comparing means of two independent
normal populations (large samples)
SOLUTION:
Ho: μ1 = μ2 Ha: μ1 ≠ μ2 =0.05
Test statistic: Z
𝑥1 − 𝑥2 16.015 − 16.005
𝑧= = = 0.99
𝜎12 𝜎22 0.0202 0.0252
+
+ 10 10
𝑛1 𝑛2
1. Ha: P1≠ P2
2. Ha: P1> P2
3. Ha: P1< P2
Test statistic: Z 𝑝1 − 𝑝2
𝑧=
𝑝1 1 − 𝑝1 𝑝2 1 − 𝑝2
+
𝑛1 𝑛2
Comparing two proportions (large samples)
An urban community would like to show that the incidence of breast cancer is
higher in their area than in a nearby rural area. If it is found that 20 of 200
adult women in the urban community have breast cancer and 10 of 150 adult
women in the rural community have breast cancer, can we conclude at the
0.05 level of significance that breast cancer is more prevalent in the urban
community?
Comparing two proportions (large samples)
Many stores sell extended warranties for products they sell. These are very
lucrative for store owners. To learn more about who buys these warranties, a
random sample was drawn of a store’s customers who recently purchased a
product for which an extended warranty was available. Among other variables,
each respondent reported whether he or she paid the regular price or a sale price
and whether he or she purchased an extended warranty. Can we conclude at the
10% significance level that those who paid the regular price are more likely to buy
an extended warranty?