0% found this document useful (0 votes)
90 views

Hypothesis Testing

This document provides an overview of hypothesis testing concepts including: - A hypothesis is a statement or assertion about a population that can be tested using sample data. The null hypothesis asserts no relationship or difference, while the alternative hypothesis asserts a relationship or difference. - The steps of hypothesis testing are: 1) specify hypotheses, 2) determine critical value, 3) calculate test statistic, 4) make a decision to reject or fail to reject the null hypothesis, 5) summarize results. - Common tests covered include the z-test for large samples to test claims about population means, and examples are provided to demonstrate stating hypotheses and interpreting results. Critical values and regions are used to determine whether to reject the null hypothesis
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)
90 views

Hypothesis Testing

This document provides an overview of hypothesis testing concepts including: - A hypothesis is a statement or assertion about a population that can be tested using sample data. The null hypothesis asserts no relationship or difference, while the alternative hypothesis asserts a relationship or difference. - The steps of hypothesis testing are: 1) specify hypotheses, 2) determine critical value, 3) calculate test statistic, 4) make a decision to reject or fail to reject the null hypothesis, 5) summarize results. - Common tests covered include the z-test for large samples to test claims about population means, and examples are provided to demonstrate stating hypotheses and interpreting results. Critical values and regions are used to determine whether to reject the null hypothesis
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/ 40

IE101: Engineering Data Analysis

Prepared by: Engr. Katherine Gavino, MSIE


Hypothesis Testing

FINALS Coverage
Hypothesis
 A statistical hypothesis is an assertion or conjecture
concerning one or more populations.
 The truth or falsity of a statistical hypothesis is never known
with absolute certainty unless we examine the entire
population. This, of course, would be impractical in most
situations.
 Instead, we take a random sample from the population of
interest and use the data contained in this sample to provide
evidence that either supports or does not support the
hypothesis.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Null and Alternative Hypotheses
 A null hypothesis is a statement, in which there is no
relationship between two variables, denoted by H0.
 An alternative hypothesis is statement in which there
is some statistical significance between two measured
phenomenon, denoted by Ha.
 Note:
 The alternative hypothesis Ha usually represents the question
to be answered or the theory to be tested, and thus its
specification is crucial.
 The null hypothesis H0 nullifies or opposes Ha and is often the
logical complement to Ha.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Hypothesis Testing Conclusions
 As the reader gains more understanding of hypothesis
testing, he or she should note that the analyst arrives at
one of the two following conclusions:

 Practical Example:

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Possible Situations in Testing
 Rejection of the null hypothesis when it is true is called a
type I error.
 Non-rejection of the null hypothesis when it is false is
called a type II error.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Steps in Hypothesis Testing
1. Specify the Null Hypothesis.
2. Specify the Alternative Hypothesis.
3. Find the critical value(s).
4. Calculate the Test Statistic (test value).
5. Make the decision to reject or not to reject the null
hypothesis.
6. Summarize the results.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Stating the Hypotheses…

 Example 1: A chemist invents an additive to increase the


life of an automobile battery. If the mean lifetime of the
battery is 36 months, then his hypotheses are…
Answer: H0: 36 H1:  36
This is a right-tailed test.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Stating the Hypotheses…

 Example 2: A medical researcher is interested in finding out


whether a new medication will have any undesirable side
effects. The researcher is particularly concerned with the
pulse rate of the patients who take the medication. What are
the hypotheses to test whether the pulse rate will be different
from the mean pulse rate of 82 beats per minute?
Answer: H0:  = 82 H1:  82
This is a two-tailed test.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Stating the Hypotheses…

 Example 3: A contractor wishes to lower heating bills by


using a special type of insulation in houses. If the average
of the monthly heating bills is $78, her hypotheses about
heating costs will be…
Answer: H0:  $78 H1:  $78
This is a left-tailed test.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Stating the Hypotheses…
 Example 4: A researcher thinks that if expectant mothers
use vitamin pills, the birth weight of the babies will increase.
The average birth weight of the population is 8.6 pounds.
 Example 5: An engineer hypothesizes that the mean number
of defects can be decreased in a manufacturing process of
compact disks by using robots instead of humans for certain
tasks.The mean number of defective disks per 1000 is 18.
 Example 6: A psychologist feels that playing soft music during
a test will change the results of the test. But the psychologist is
not sure whether the grades will be higher or lower. In the
past, the mean scores was 73.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Stating the Hypotheses…
 Example 4-6 Solutions:

H0: 8.6 H1:  8.6


H0:  18 H1:  18
H0:  = 73 H1:  73

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Steps in Hypothesis Testing
 The level of significance is the maximum probability of
committing a type I error. This probability is
symbolized by  (Greek letter alpha). That is, P (type I
error) = .
 Typical significance levels are: 0.10, 0.05, and 0.01.
 For example, when  = 0.10, there is a 10% chance of
rejecting a true null hypothesis.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Steps in Hypothesis Testing
 The critical value(s) separates the critical region from
the noncritical region. The symbol for critical value is
CV.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Steps in Hypothesis Testing
 The critical or rejection region is the range of values of
the test value that indicates that there is a significant
difference and that the null hypothesis should be
rejected.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Steps in Hypothesis Testing
 The noncritical or non-rejection region is the range of
values of the test value that indicates that the difference
was probably due to chance and that the null
hypothesis should not be rejected.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Large Sample Mean Test
 The z test is a statistical test for the mean of a
population. It can be used when n  30, or when the
population is normally distributed and  is known.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Large Sample Mean Test
 Example I: A researcher reports that the average salary of assistant
professors is more than $42,000. A sample of 30 assistant professors has a
mean salary of $43,260. At  = 0.05, test the claim that assistant
professors earn more than $42,000 a year. The standard deviation of the
population is $5230.
𝑖. ) 𝐻𝑜 : 𝜇 ≤ $42, 000 𝐻𝑎 : 𝜇 > $42, 000 (𝑐𝑙𝑎𝑖𝑚)

𝑖𝑖. ) 𝛼 = 0.05 𝑟𝑖𝑔ℎ𝑡 − 𝑡𝑎𝑖𝑙𝑒𝑑 → 𝑧𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 = 1.645

43, 260 − 42, 000


𝑖𝑖𝑖. ) 𝑇𝑒𝑠𝑡 𝑉𝑎𝑙𝑢𝑒: 𝑧 = = 1.32 1.32 Fail to reject Ho.
5, 230
30
𝑖𝑣. ) 𝑧 < 𝑧𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙
The evidence is not enough to support the claim
that asst. professors earn more than $42, 000.
1.645
Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Large Sample Mean Test
 Example 2: The Medical Rehabilitation Education Foundation reports that
the average cost of rehabilitation for stroke victims is $24,672. To see if the
average cost of rehabilitation is different at a large hospital, a researcher
selected a random sample of 35 stroke victims and found that the average
cost of their rehabilitation is $25,226. The standard deviation of the
population is $3,251. At  = 0.01, can it be concluded that the average cost
at a large hospital is different from $24,672?

𝑖. ) 𝐻𝑜 : 𝜇 = $24, 672 𝐻𝑎 : 𝜇 ≠ $24, 672 (𝑐𝑙𝑎𝑖𝑚)

𝑖𝑖. ) 𝛼 = 0.01 𝑡𝑤𝑜 − 𝑡𝑎𝑖𝑙𝑒𝑑 → 𝑧𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 = ±2.58

25, 226 − 24, 672


𝑖𝑖𝑖. ) 𝑇𝑒𝑠𝑡 𝑉𝑎𝑙𝑢𝑒: 𝑧 = = 1.01
3, 251
35

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Large Sample Mean Test
 Example 2: The Medical Rehabilitation Education Foundation reports that
the average cost of rehabilitation for stroke victims is $24,672. To see if the
average cost of rehabilitation is different at a large hospital, a researcher
selected a random sample of 35 stroke victims and found that the average
cost of their rehabilitation is $25,226. The standard deviation of the
population is $3,251. At  = 0.01, can it be concluded that the average cost
at a large hospital is different from $24,672?

1.01 Fail to reject Ho.

𝑖𝑣. ) 𝑧 = 1.01
The evidence is not enough to support the claim
that the average cost at a large hospital is
different from $24, 672. - 2.58 2.58

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Small Sample Mean Test
 When the population standard deviation is unknown
and n < 30, the z test is inappropriate for testing
hypotheses involving means. The t test is used in this
case.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Small Sample Mean Test
 Example I: An educator claims that the average salary of substitute
teachers in school districts in Allegheny County, Pennsylvania, is less than
$60 per day. A random sample of eight school districts is selected, and the
daily salaries (in dollars) are shown. Is there enough evidence to support
the educator’s claim at α = 0.10?
60, 56, 60, 55, 70, 55, 60, 55
𝑖. ) 𝐻𝑜 : 𝜇 ≥ $60 𝐻𝑎 : 𝜇 < $60 (𝑐𝑙𝑎𝑖𝑚)

𝑖𝑖. ) 𝛼 = 0.01 𝑙𝑒𝑓𝑡 & 𝑜𝑛𝑒 − 𝑡𝑎𝑖𝑙𝑒𝑑 , 𝑑𝑓 = 7 → 𝑧𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 = −1.415

58.875 − 60
𝑖𝑖𝑖. ) 𝑇𝑒𝑠𝑡 𝑉𝑎𝑙𝑢𝑒: 𝑧 = = −0.626 -0.626 Fail to reject Ho.
5.0832
8
𝑖𝑣. )
The evidence is not enough to support the claim.
- 1.415
Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Small Sample Mean Test
 Example 2: A job placement director claims that the average starting
salary for nurses is $24,000. A sample of 10 nurses has a mean of $23,450
and a standard deviation of $400. Is there enough evidence to reject the
director’s claim at α = 0.05?
𝑖. ) 𝐻𝑜 : 𝜇 = $24, 000 (𝑐𝑙𝑎𝑖𝑚) 𝐻𝑎 : 𝜇 ≠ $24, 000

𝑖𝑖. ) 𝛼 = 0.05 𝑡𝑤𝑜 − 𝑡𝑎𝑖𝑙𝑒𝑑 , 𝑑𝑓 = 9 → 𝑧𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 = ±2.262

23, 450 − 24, 000


𝑖𝑖𝑖. ) 𝑇𝑒𝑠𝑡 𝑉𝑎𝑙𝑢𝑒: 𝑧 = = −4.35
400
10 -4.35 Reject Ho.
𝑖𝑣. )
There is enough evidence to support the claim.

-2.262 2.262
Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Z-test or T-test?

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Proportion Test
 Examples of hypotheses involving proportion:
 59% of consumers purchase gifts for their fathers.
 85% of people over 21 years old said they have bet on sweepstakes.
 51% of Americans buy generic products.
 35% of Americans go out for dinner once a week.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Proportion Test
 Example 1: An educator estimates that the dropout rate for
seniors at high schools in Ohio is 15%. Last year, 38 seniors
from a random sample of 200 Ohio seniors withdrew. At α =
0.05, is there enough evidence to reject the educator’s claim?

 Example 2: A telephone company representative estimates


that 40% of its customers have call waiting service. To test this
hypothesis, she selected a sample of 100 customers and found
that 37% had call waiting. At α = 0.01, is there enough evidence
to reject the claim?

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Proportion Test
 Example 1:

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Proportion Test
 Example 2:

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between
Two Means – Using the z-test
FINALS Coverage
Testing the Difference Between Two
Means – Using the z-test
 When to use?
 If researchers wish to compare two sample means, using
experimental and control groups or two experimental
groups.
 Examples:
 Two different brands of fertilizer might be tested to see
whether one is better than the other for growing plants.
 Two brands of cough syrup might be tested to see
whether one brand is more effective than the other.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the z-test

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the z-test
 Example: A survey found that the average hotel
room rate in New Orleans is $88.42 and the average
room rate in Phoenix is $80.61. Assume that the data
were obtained from two samples of 50 hotels each
and that the standard deviations of the populations
are $5.62 and $4.83, respectively. At α=0.05, can it be
concluded that there is a significant difference in the
rates?

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the z-test

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the z-test

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between
Two Means – Using the t-test
FINALS Coverage
Testing the Difference Between Two
Means – Using the t-test
 Assumptions:
 Population standard deviations are unknown and the
sample sizes are less than 30.
 Variables are normally or approximately normally
distributed.
 Samples are random samples and independent samples.

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the t-test

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the t-test
 Example: A survey found that the average hotel
room rate in New Orleans is $88.42 and the average
room rate in Phoenix is $80.61. Assume that the data
were obtained from two samples of 50 hotels each
and that the standard deviations of the populations
are $5.62 and $4.83, respectively. At α=0.05, can it be
concluded that there is a significant difference in the
rates?

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the t-test

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.
Testing the Difference Between Two
Means – Using the t-test

Montgomery, D. (2011) Applied Statistics and Probability for Engineers. John Wiley and Sons, Inc.

You might also like