0% found this document useful (0 votes)
31 views50 pages

Stat 2 (Chapter 7)

Uploaded by

milkesomidaksa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views50 pages

Stat 2 (Chapter 7)

Uploaded by

milkesomidaksa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Chapter 7

Hypothesis Testing
Outline

✓Procedures of Hypothesis testing

✓Large and Small sample test about the population

mean (μ)

✓Large and Small sample test about the population

proportion (P)
Introduction
• Statistical inference: is the process of using
sample information to make estimates and test
hypotheses about the characteristics the
population

• Inferential statistics is the collection of methods


that enable us in making decisions about the
population based on sample results.
Inferential statistics techniques

Statistical Inference

Estimation Hypothesis testing

Point Interval Different


Estimation Estimation techniques
• Hypothesis: a statement about the population
parameter developed for the purpose of testing.
✓ It is usually tested by taking samples from the target
population.

• Hypothesis testing: is a procedure based on sample


evidence and probability theory to determine whether
the hypothesis is a reasonable statement.
Procedures in hypothesis testing (HT)

Step 1: Developing null and alternative


hypothesis
Null hypothesis (H0)
• a statement about the population parameter which is
developed to be tested
• It is a tentative assumption about a population
parameter
• It is to be rejected or accepted based on sample data
evidence
• Failing to reject the H0 doesn’t prove that the H0 is true
• The equality part of the hypotheses always appears in
the H0.
Alternative hypothesis(Ha)

➢It’s the opposite of what is stated in the null


hypothesis.

➢It is going to be accepted if the sample data provide


a sufficient evidence that H0 is false.
Step 2: select the level of significance

✓Level of significance (α): the probability of


rejecting the H0 when it is true.
Type I and Type II Errors

• HT is based on sample data, we must allow for the

possibility of errors.

• A Type I error is rejecting H0 when it is true

• A Type II error is accepting H0 when it is false


Type I and Type II Errors…

• A researcher specifies the maximum allowable


probability of making a Type I error ()

• We cannot control for the probability of making a


Type II error ()

• Statistician avoids the risk of making a Type II error by


using “do not reject H0” and not “accept H0”.
Type I and Type II Errors…

H0 is true H0 is false
Accept H0 Correct conclusion Type II error
Reject H0 Type I error Correct
conclusion
Step 3: select the test statistics

➢ Test statistics: is a value determined from sample


information and used to determine whether to reject
the H0 or not.
➢ Test statistics include Z, t, x2, F
➢ Which one to employ determined by factors such as
➢ Whether the δ is known or not
➢ Sample size
Step 3: select the test statistics…

➢ Once the test statistics is selected there are two

approaches to proceed:

i. the critical value approach

ii.The P-value approach


The critical value approach

Step 4: find the critical value and


formulate decision rule
The critical value approach…

Critical value (CV): is the dividing point b/n the


region where the H0 is rejected and the region
where it is not rejected.

Decision rule: is a statement on specific conditions


under which the H0 is rejected and the condition
under which it is not rejected.
CV and Decision Rule

Let  = 0.05
Sampling distribution
ഥ (assuming H0 is
of X
true and  = 12)

Reject H0
Do Not
Reject H0  = 00

Z-scale
Decision rule 0 1.645
(CV)
Reject H0 if Zcal > Zcv
Step 5: Compute the value of the sample
test statistics
Sample test statistics include t, Z, x2, F
Step 6: make a decision and interpret
the result
❑Compare the computed value of the sample test
statistics with the critical value and make a decision
to reject or not to reject the H0 .
The p-value approach

Step 4: Compute the value of the sample


test statistics(t, Z, x2, F) and use
the value of the test statistics to
compute the p-value
The p-value approach…
✓P-value: is a probability that provides a
measure of the evidence against Ho provided
by the sample

✓Smaller p-values indicate more evidence


against Ho.
The p-value approach…
Step 6: make a decision and interpret the
result

✓Compare α with the p-value and make a decision


to reject or not to reject the Ho.
Developing Null and Alternative
Hypotheses

• Hypothesis testing is similar to a criminal trial. The


hypotheses are:
H0: The defendant is innocent
Ha: The defendant is guilty
Developing Null and Alternative
Hypotheses…

•Testing Research Hypotheses


• The research hypothesis should be expressed as
the alternative hypothesis.
• The conclusion that the research hypothesis is
true comes from sample data that contradict the
null hypothesis.
Developing Null and Alternative
Hypotheses

•Testing the Validity of a Claim


• Manufacturers’ claims are usually given the
benefit of the doubt and stated as the null
hypothesis.
• The conclusion that the claim is false comes from
sample data that contradict the null hypothesis.
Developing Null and Alternative
Hypotheses

•Testing in Decision-Making Situations


• A decision maker might have to choose b/n two courses
of action, one associated with the Ho and another
associated with the H1.
• Example: Accepting a shipment of goods from a supplier
or returning the shipment of goods to the supplier.
Hypothesis test of population mean

Case 1: Large sample case (n≥30)


•δ known
x −
z=
/ n

•δ is Unknown
✓Use s to estimate δ
x −
z=
S/ n
One-Tailed Tests about a Population Mean:
Large-Sample Case (n > 30)
n Hypotheses Right-tailed Test Left-tailed Test
H0:   0 or H0:   0
Ha:   0 Ha:   0

n Test Statistic  Known  Unknown


ഥ − 𝝁𝒐 ഥ − 𝝁𝒐
𝑿
𝑿
𝝈 𝒔
𝒏 𝒏

n Rejection Rule Right-tailed Test Left-tailed Test


Reject H0 if z > z Reject H0 if z < -z
Example 1
A major west coast city provides one of the most
comprehensive emergency medical services (EMS) in
the world. Operating in a multiple hospital system
with approximately 20 mobile medical units, the
service goal is to respond to medical emergencies with
a mean time of 12 minutes or less.
The director of medical services wants to use a sample
of 40 emergency response times to determine
whether or not the service goal of 12 minutes or less is
being achieved. The sample mean and standard
deviations are found to be 13.25 minutes and 3.2
minutes respectively.
Perform a hypothesis test at 5% significance level.
Solution

Hypothesis Conclusion & Action

The emergency service is


H0:    meeting the response goal; no
follow-up action is necessary.

The emergency service is not


Ha:    meeting the response goal;
appropriate follow-up action is
necessary.
Example: Metro EMS
• One-Tailed Test about a Population Mean: Large n
Let  = P(Type I Error) = 0.05

Sampling distribution
of Xഥ (assuming H0 is
true and  = 12) Reject H0

Do Not
 = 00
Reject H0


X
0 1.645
(Critical value)
Example: Metro EMS

𝑋ത − μ 13.25 − 12
𝑍= 𝑠 = = 2.47
3.2
𝑛 40
Example: Metro EMS
• Using the p-value to Test the Hypothesis
Recall that z = 2.47 for = 13.25. Then p-value = 0.0068.
Since p-value < , that is 0.0068 < .05, we reject H0.

Reject H0
Do Not
Reject H0 p-value= 000

z
0 1.645 2.47
Two-Tailed Tests about a Population
Mean: Large-Sample Case (n > 30)
• Hypotheses:
H0:  = 0
Ha:  ≠ 0
x − 0 x − 0
z= z=
/ n s/ n

Test Statistic:  Known  Unknown

Rejection Rule: Reject H0 if |z| > z


Example: Glow Toothpaste

The production line for Glow toothpaste is designed


to fill tubes of toothpaste with a mean weight of 6
ounces.

Periodically, a sample of 30 tubes will be selected in


order to check the filling process. Quality assurance
procedures call for the continuation of the filling
process if the sample results are consistent with the
assumption that the mean filling weight for the
population of toothpaste tubes is 6 ounces;
otherwise the filling process will be stopped and
adjusted.
Example: Glow Toothpaste

Sampling distribution
of x (assuming H0 is
true and  = 6)

Reject H0 Do Not Reject H0


Reject H0
 = 0  = 0

z
-1.96 0 1.96
Example: Glow Toothpaste

Assume that a sample of 30 toothpaste tubes


provides a sample mean of 6.1 ounces and standard
deviation of 0.2 ounces.
Let n = 30, 𝑥ҧ = 6.1 ounces, s = .2 ounces

x −  0 6 .1 − 6
z= = = 2 .7 4
s / n .2 / 3 0
Since 2.74 > 1.96, we reject H0.
Example: Glow Toothpaste

• Using the p-Value for a Two-Tailed Hypothesis Test


Suppose we define the p-value for a two-tailed test as double the
area found in the tail of the distribution.
With z = 2.74, the standard normal probability
table shows there is a .5000 - .4969 = 0.0031 probability of a difference
larger than 0.1 in the upper tail of the
distribution.
Considering the same probability of a larger difference in the lower
tail of the distribution, we have
p-value = 2(.0031) = .0062
The p-value 0.0062 is less than  = .05, so H0 is rejected.
Confidence Interval Approach to a
Two-Tailed Test about a Population Mean

• Select a simple random sample from the


population and use the value of the sample mean
to develop the confidence interval for the
population mean .

• If the confidence interval contains the hypothesized


value 0, do not reject H0. Otherwise, reject H0.
Example: Glow Toothpaste
•Confidence Interval Approach to a Two-Tailed
Hypothesis Test
The 95% confidence interval for  is
𝝈 𝟎.𝟐
ഥ ± 𝒁𝜶
𝑿 = 𝟔. 𝟏 ± 𝟏. 𝟗𝟔 = 𝟔. 𝟏 ± 0.0716
𝟐 𝒏 𝟑𝟎

or 6.0284 to 6.1716

Since the hypothesized value for the population


mean, 0 = 6, is not in this interval, the hypothesis-
testing conclusion is that the null hypothesis,
H0:  = 6, can be rejected.
Tests about a Population Mean:
Small-Sample Case (n < 30)
• Test Statistic  Known  Unknown

t-dist’n with n - 1 degrees of freedom.


x − 0 x − 0
t= t=
/ n s/ n
• Rejection Rule

One-Tailed Two-Tailed
H0:  ≤ 0 Reject H0 if t > t H0:  = 0

H0:  ≥ 0 Reject H0 if t < -t Reject H0 if |t| > t


Example: Highway Patrol
A State Highway Patrol periodically samples vehicle
speeds at various locations on a particular roadway.
The sample of vehicle speeds is used to test the
hypothesis
H0:  < 65.
The locations where H0 is rejected are deemed the
best locations for radar traps.
At Location F, a sample of 16 vehicles shows
a mean speed of 68.2 mph with a standard
deviation of 3.8 mph. Use an  = .05 to test the
hypothesis.
Example: Highway Patrol

ഥ − 𝝁𝑿ഥ 𝟔𝟖. 𝟐 − 𝟔𝟓
𝑿
𝒕= 𝒔 = = 𝟑. 𝟑𝟕
𝟑. 𝟖
𝒏 𝟏𝟔
A Summary of Forms for Null and Alternative
Hypotheses about a Population Proportion

• The equality part of the hypotheses always appears


in the null hypothesis.
• In general, a hypothesis test about the value of a
population proportion p must take one of the
following three forms (where p0 is the
hypothesized value of the population proportion).
H0: p > p0 H0: p < p0 H0: p = p0
Ha: p < p0 Ha: p > p0 Ha: p ≠ p0
Tests about a Population Proportion:
Large-Sample Case (np > 5 and n(1 - p) > 5)

p − p0
•Test Statistic z=
p

where: p 0 (1 − p 0 )
p =
n
•Rejection Rule
One-Tailed Two-Tailed

H0: p  p0 Reject H0 if z > z


H0: p  p0 Reject H0 if z < -z
H0: p = p0 Reject H0 if |z| > z
Example: NSC
For a Christmas and New Year’s week, the National
Safety Council estimated that 500 people would be
killed and 25,000 injured on the nation’s roads. The
NSC claimed that 50% of the accidents would be
caused by drunk driving.
A sample of 120 accidents showed that 67 were
caused by drunk driving. Use these data to test the
NSC’s claim with  = 0.05.
Example: NSC
• Two-Tailed Test about a Population Proportion:
Large n
• Hypothesis
H0: p = 0.5
Ha: p0.5
• Test Statistic
p0 (1 − p0 ) .5 ( 1 − .5 )
p = = = .0 4 5 6 4 4
n 120
p − p 0 ( 6 7 / 1 2 0 ) − .5
z= = = 1 .2 7 8
p .0 4 5 6 4 4
Example: NSC
• Rejection Rule
Reject H0 if z < -1.96 or z > 1.96

• Conclusion: Do not reject H0.


For z = 1.278, the p-value is .201. If we reject
H0, we exceed the maximum allowed risk of
committing a Type I error (p-value > 0.05).
Exercise 1
The Federal Trade Commission (FTC) periodically
conducts statistical studies designed to test the
claims that manufacturers make about their
products. For example, the label on a large can of
Hilltop Coffee states that the can contains 3 pounds
of coffee. However, as long as the population mean
filling weight is at least 3 pounds per can, the rights
of consumers will be protected. The FTC wants to
check Hilltops claim by taking a sample of 36 cans of
coffee. The sample provides a sample mean of 2.92
pounds. From historical data of similar study, a
standard deviation of 0.18 pound has been found.
Perform a hypothesis test at 1% level of significance.
Exercise 2
CCN and Act Media provided a television channel targeted to individuals waiting in
supermarket checkout lines. The channel showed news, short features, and
advertisements. The length of the program was based on the assumption that the
population mean time a shopper stands in a supermarket checkout line is 8
minutes. A sample of actual waiting times will be used to test this assumption and
determine whether actual mean waiting time differs from this standard.
A. Formulate the hypotheses for this application.
B. A sample of 120 shoppers showed a sample mean waiting time of 8.5
minutes. Assume a population standard deviation σ 3.2 minutes. What is the
p-value?
C. At α .05, what is your conclusion?
D. Compute a 95% confidence interval for the population mean. Does it
support your conclusion?

You might also like