Chapter 9 Hypothesis Testing Two Population

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

Hypothesis Testing CHAPTER

9
Outline
1.1
9.5 Test for and Inferential Statistics
Descriptive
- Differences between means of two
populations
- Differences between proportions of two
populations
- Comparing more than two population
means

Copyright © 2012 The McGraw-Hill Companies, Inc. Slide 1


Hypothesis Testing
For The Difference between Two Populations

Difference between
means 1   2
of two populations

Independent
Paired samples
samples

LARGE samples SMALL samples


(n1 ≥ 30 and n2 ≥ 30) (n1 < 30 and n2 < 30)
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)

Many researchers wish to compare two sample means, using


experimental and control groups. For example,
• The average lifetimes of two different brands of bus tires might be
compared to see whether there is any difference in tread wear.
• 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.

In the comparison of two means, the same basic steps for hypothesis
testing tests is used. When comparing two means, the researcher must
decide if the two samples are independent or dependent.
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)
Large Samples, Using the Z Test

Assumptions
1. The samples must be independent of each another.

2. The populations from which the samples were obtained


must be normally distributed, or the sample size, n1 ≥ 30
and n2 ≥ 30
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)

Suppose a researcher wishes to determine whether there is a difference in the


average age of nursing students who enrolled in a nursing program at a
community college and those who enrolled in a nursing program at a university.
In this case, the researcher is interested in comparing the means of the two
groups. His research question is, does the mean age of nursing students who
enrolled at a community college differ from the mean age of nursing students
who enrolled at a university? Here, the hypotheses are

𝐻 0 :𝜇1 −𝜇2=0
Another way of stating the hypotheses for this situation is

𝐻 0 :𝜇1=𝜇2
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)
Hypothesis

𝐻0 :𝜇1 −𝜇2=0 𝐻 0 :𝜇1 −𝜇2=0 𝐻 0 :𝜇1 −𝜇2=0


Left-Tailed Test Two-Tailed Test Right-Tailed Test

- Zα - Zα/2 Zα/2 Zα
Rejection region
Reject H0 at α Zcalc < - Zα/2
significance level if Zcalc < - Zα or Zcalc > Zα
Zcalc > Zα/2
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)

The formula of the test statistics is

𝑥 ¯ 2 − ( 𝜇1 − 𝜇2 )
¯1− 𝑥
𝑍=


2 2
𝑠 1 𝑠 2
+
𝑛 1 𝑛2
Leave blank
Example: Leisure Time
A study using two random samples of 35 people each found that the
average amount of time those in the age group of 26–35 years spent per
week on leisure activities was 39.6 hours, and those in the age group of
46–55 years spent 35.4 hours. Assume that the population standard
deviation for those in the first age group found by previous studies is 6.3
hours, and the population standard deviation of those in the second
group found by previous studies was 5.8 hours.
At α = 0.05, can it be concluded that there is a significant difference in
the average times each group spends on leisure activities?
Example: Leisure Time

Step 4: Make the decision.


Reject the null hypothesis at α = 0.05, since 2.90 > 1.96.

Step 5: Summarize the results.


There is enough evidence to conclude that the average of the times
spent on leisure activities is different for the groups.
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)
Small Samples, Using the t Test

Assumptions
1. The samples are random samples.

2. The sample data are independent of one another.

3. When the sample sizes are less than 30, the populations
must be normally or approximately normally distributed.
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)

Hypothesis
𝐻 0 :𝜇1 −𝜇2=0 𝐻 0 :𝜇1 −𝜇2=0 𝐻 0 :𝜇1 −𝜇2=0
Left-Tailed Test Two-Tailed Test Right-Tailed Test

-tα -tα/2 tα/2 tα


Rejection region
t calc   t  / 2
Reject H0 at α
significance level if t calc   t  or t calc  t 
t calc  t  / 2
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(INDEPENDENT SAMPLES)

The formula of the test statistics is

2 2
2 2 ( 𝑛 1 −1 ) 𝑠 + ( 𝑛2 −1 ) 𝑠
1 2 df
^ =𝑠 =
𝜎 𝑝
𝑛 1+𝑛 2 − 2
Example
The supervising inspector of incoming quality wants to know if the average
lifetimes of the two brands (brand 1 and brand 2) are the same. Based on past
experience, she believes that the battery lifetimes follow a normal distribution with
equal variance. A sample experiment is conducted: each of ten batteries (five of
each brand) is connected to a test device that places a small drain on the battery
power and records the battery lifetime. The following results (in hours) are
obtained:
Brand 1 43 48 38 41 51
Brand 2 30 26 37 31 34

Can the supervising inspector of incoming quality conclude that the average
lifetimes of the two brands are equal? Use the 5% significance level.

𝐻 0 :𝜇1 −𝜇2=0
α = 0.05
Critical value: = + 2.306 or – 2.306
Solution:

= 22.5

t = 4.2

Since t = 4.2 > Critical value, 2.306, Reject Ho.


There is enough evidence to conclude that there is a significant
difference in the mean average lifetimes of the two brands.
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(MATCHED SAMPLES)
Samples are considered to be dependent samples when the subjects are
paired or matched in some way. It compares two-paired observations
from the same individual or on match individuals. Used to determine if an
intervention made a difference.

Types of comparison
• Does attending a motivation seminar increase the productivity of
employees (compare productivity before and after for each employees)
• Does a type of diet make a difference in the weight (compare weight
before and after for each person)
• Did the new drug decrease the patient’s blood pressure?
• Is there any changes in the cholesterol level after treatment of statin
medication among 30 randomly selected patients?
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(MATCHED SAMPLES)

𝐻 0 :𝜇𝑑 =0 𝐻 0 :𝜇𝑑 =0
Hypothesis
𝐻 0 :𝜇𝑑 =0
Left-Tailed Test Two-Tailed Test Right-Tailed Test

-tα -tα/2 tα/2 tα


Rejection
region
Reject H0 at α
significance
t calc   t  t calc   t  / 2 or t calc  t  / 2 t calc  t 
level if
TESTS CONCERNING DIFFERENCE OF TWO MEANS
(MATCHED SAMPLES)

Assume the distribution of the paired differences are normal with


unknown mean µd and unknown variance.
¯ − 𝜇𝑑
𝑑
The test statistic is 𝑡=
𝑠𝑑
√𝑛 𝑑
where d  sample mean of paired difference
sd = sample standard deviation of paired differences
nd = number of paired differences

The statistic has t-distribution with n-1 degrees of freedom.


Example: Bank Deposits
A sample of nine local banks shows their deposits (in billions of
dollars) 3 years ago and their deposits (in billions of dollars)
today.
At α = 0.05, can it be concluded that the average in deposits
for the banks is greater today than it was 3 years ago?
Use α = 0.05.
Example: Bank Deposits

Step 1: State the hypotheses


H0: μd = 0 and
H1: μd < 0 (claim)

Step 2: Find the critical value.


The degrees of freedom are n – 1 = 9 – 1 = 8.
The critical value for a left-tailed test with α =
0.05 is t = –1.860.
Example: Bank Deposits
Step 3: Compute the test value.

sd = 1.937

=
Example: Bank Deposits
Step 4: Make the decision.
Do not reject the null hypothesis since the test value,
–1.674 > critical value, –1.860.

Step 5: Summarize the results.


There is not enough evidence to conclude that the deposits have
increased over the last 3 years.
Example: Cholesterol Levels
A dietitian wishes to see if a person’s cholesterol level will
change if the diet is supplemented by a certain mineral. Six
subjects were pretested, and then they took the mineral
supplement for a 6-week period. The results are shown in the
table. (Cholesterol level is measured in milligrams per deciliter.)
Can it be concluded that the cholesterol level has been
changed at α = 0.10? Assume the variable is approximately
normally distributed.
Example: Cholesterol Levels

Step 1: State the hypotheses

H0: μd = 0
H1: μd  0

Step 2: Find the critical value.


The degrees of freedom is 5. At α = 0.10,
the critical values are - 2.015 and + 2.015.
Example: Cholesterol Levels
Step 3: Compute the test value.
D  16.7, sD  25.4
D  D 16.7  0
t   1.610
sD n 25.4 6
Step 4: Make the decision. Do not reject the null.

Step 5: Summarize the results.


There is not enough evidence to conclude that the
mineral changes a person’s cholesterol level.
TEST ON DIFFERENCE BETWEEN TWO PROPORTIONS

Hypothesis Ho : p 1 = p 2 Ho : p 1 = p 2
Ho : p 1 = p 2
H1 : p 1 < p 2 H1 : p 1 ≠ p 2 H1 : p 1 > p 2
Left-Tailed Test Two-Tailed Test Right-Tailed Test

-zα -zα/2 zα/2 zα


Rejection region
Reject H0 at α z   z / 2
significance level if zcalc   z or z  z
z  z / 2
TEST ON DIFFERENCE BETWEEN TWO
PROPORTIONS
The formula for the z test statistics for two
proportions is
^ 1− 𝑝
(𝑝 ^ 2 )− (𝑝1 − 𝑝2 )
𝑍=

√ ^𝑞
𝑝 ^
( 1
𝑛1
+
1
𝑛2 )
𝑥 1 + 𝑥2
^ = 𝑝𝑜𝑜𝑙𝑒𝑑 𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛=
𝑝
𝑛1 +𝑛2
Example

A study reported that out of a random sample of 512 employees in Company A, 292
reported they experiences headaches and out of a sample of 281 employees in Company
B, 172 reported they experiences headaches. Test the hypothesis at 0.01 levels that
there’s no difference in the population proportion of employees who experiences
headaches at the two companies.
Ho : p 1 = p 2
H1 : p 1 ≠ p 2
Critical value: - 2.5758 or + 2.5758

= = - 1.097

Since Z = - 1.097 > Critical value, - 2.5758, Do not Reject Ho.


There is not enough evidence to conclude that there is a difference in the
population proportion of employees who experiences headaches at the two
companies.

You might also like