Chapter6 20191 PDF
Chapter6 20191 PDF
Chapter6 20191 PDF
(1)
NGUYỄN THỊ THU THỦY
HANOI – 2019
(1)
Email: [email protected]
Nguyễn Thị Thu Thủy (SAMI-HUST) Hypothesis Testing HANOI – 2019 1 / 64
6.1 Introduction
Content
1 6.1 Introduction
6.1.1 Key terms and concepts
6.1.2 Statistical decision for hypothesis testing
Introduction
Introduction
Hypothesis testing was introduced by Ronald Fisher, Jerzy Neyman, Karl Pearson and
Pearson’s son, Egon Pearson. Hypothesis testing is a statistical method that is used in
making statistical decisions using experimental data. Hypothesis Testing is basically an
assumption that we make about the population parameter.
Null hypothesis
Null hypothesis is a statistical hypothesis that assumes that the observation is due
to a chance factor.
Null hypothesis is denoted by H0 .
Alternative hypothesis
Contrary to the null hypothesis, the alternative hypothesis shows that observations
are the result of a real effect.
The alternative hypothesis, denoted by H1 .
Examples
H0 : µ1 = µ2 , which shows that there is no difference between the two population
means.
H1 : µ1 6= µ2 or H1 : µ1 > µ2 or H1 : µ1 < µ2 .
Null hypothesis
Null hypothesis is a statistical hypothesis that assumes that the observation is due
to a chance factor.
Null hypothesis is denoted by H0 .
Alternative hypothesis
Contrary to the null hypothesis, the alternative hypothesis shows that observations
are the result of a real effect.
The alternative hypothesis, denoted by H1 .
Examples
H0 : µ1 = µ2 , which shows that there is no difference between the two population
means.
H1 : µ1 6= µ2 or H1 : µ1 > µ2 or H1 : µ1 < µ2 .
Null hypothesis
Null hypothesis is a statistical hypothesis that assumes that the observation is due
to a chance factor.
Null hypothesis is denoted by H0 .
Alternative hypothesis
Contrary to the null hypothesis, the alternative hypothesis shows that observations
are the result of a real effect.
The alternative hypothesis, denoted by H1 .
Examples
H0 : µ1 = µ2 , which shows that there is no difference between the two population
means.
H1 : µ1 6= µ2 or H1 : µ1 > µ2 or H1 : µ1 < µ2 .
Level of significance
Refers to the degree of significance in which we accept or reject the
null-hypothesis.
100% accuracy is not possible for accepting or rejecting a hypothesis, so we
therefore select a level of significance that is usually 5%.
Type II error
When we accept the null hypothesis but it is false.
P [Type II error] = β.
In Hypothesis testing, the normal curve that shows the acceptance region is called
the β region.
Power
Usually known as the probability of correctly accepting the null hypothesis. 1 − β is
called power of the analysis.
Type II error
When we accept the null hypothesis but it is false.
P [Type II error] = β.
In Hypothesis testing, the normal curve that shows the acceptance region is called
the β region.
Power
Usually known as the probability of correctly accepting the null hypothesis. 1 − β is
called power of the analysis.
Type II error
When we accept the null hypothesis but it is false.
P [Type II error] = β.
In Hypothesis testing, the normal curve that shows the acceptance region is called
the β region.
Power
Usually known as the probability of correctly accepting the null hypothesis. 1 − β is
called power of the analysis.
One-tailed test
A one-tailed test is a statistical test in which the critical area of a distribution is
one-sided so that it is either greater than or less than a certain value, but not both.
Two-tailed test
A two-tailed test is a method in which the critical area of a distribution is two-sided and
tests whether a sample is greater than or less than a certain range of values.
Examples
1 One-tailed test:
Left-tailed test: H0 : µ1 = µ2 , H1 : µ1 < µ2 ;
Right-tailed test: H0 : µ1 = µ2 , H1 : µ1 > µ2 .
2 Two-tailed test: H0 : µ1 = µ2 , H1 : µ1 6= µ2 .
One-tailed test
A one-tailed test is a statistical test in which the critical area of a distribution is
one-sided so that it is either greater than or less than a certain value, but not both.
Two-tailed test
A two-tailed test is a method in which the critical area of a distribution is two-sided and
tests whether a sample is greater than or less than a certain range of values.
Examples
1 One-tailed test:
Left-tailed test: H0 : µ1 = µ2 , H1 : µ1 < µ2 ;
Right-tailed test: H0 : µ1 = µ2 , H1 : µ1 > µ2 .
2 Two-tailed test: H0 : µ1 = µ2 , H1 : µ1 6= µ2 .
One-tailed test
A one-tailed test is a statistical test in which the critical area of a distribution is
one-sided so that it is either greater than or less than a certain value, but not both.
Two-tailed test
A two-tailed test is a method in which the critical area of a distribution is two-sided and
tests whether a sample is greater than or less than a certain range of values.
Examples
1 One-tailed test:
Left-tailed test: H0 : µ1 = µ2 , H1 : µ1 < µ2 ;
Right-tailed test: H0 : µ1 = µ2 , H1 : µ1 > µ2 .
2 Two-tailed test: H0 : µ1 = µ2 , H1 : µ1 6= µ2 .
Rejection region
The rejection region is the values of test statistic for which the null hypothesis is
rejected.
Rejection region
The rejection region is the values of test statistic for which the null hypothesis is
rejected.
Rejection region
The rejection region is the values of test statistic for which the null hypothesis is
rejected.
Content
1 6.1 Introduction
6.1.1 Key terms and concepts
6.1.2 Statistical decision for hypothesis testing
Note
The researcher uses the sample data to decide whether the evidence favors H1 rather
than H0 and draws one of these two conclusions:
Reject H0 and conclude that H1 is true.
Accept (do not reject) H0 as true.
Note
The researcher uses the sample data to decide whether the evidence favors H1 rather
than H0 and draws one of these two conclusions:
Reject H0 and conclude that H1 is true.
Accept (do not reject) H0 as true.
H1 : µ 6= 14.
H0 : µ = 14.
You would like to reject the null hypothesis, thus concluding that the California mean is
not equal to $14.
H1 : µ 6= 14.
H0 : µ = 14.
You would like to reject the null hypothesis, thus concluding that the California mean is
not equal to $14.
Example 6.2
A milling process currently produces an average of 3% defectives. You are interested in
showing that a simple adjustment on a machine will decrease p, the proportion of
defectives produced in the milling process.
The alternative hypothesis is
H1 : p < 0.03
The null hypothesis is
H0 : p = 0.03.
If you can reject H0 , you can conclude that the adjusted process produces fewer than
3% defectives.
Example 6.2
A milling process currently produces an average of 3% defectives. You are interested in
showing that a simple adjustment on a machine will decrease p, the proportion of
defectives produced in the milling process.
The alternative hypothesis is
H1 : p < 0.03
The null hypothesis is
H0 : p = 0.03.
If you can reject H0 , you can conclude that the adjusted process produces fewer than
3% defectives.
u-test
u-test for the mean is a statistical test for a population mean.
Requirement of u-test: For any population when the sample size n ≥ 30.
Note
When the sample size is at least 30, the sampling distribution for the sample mean is
normal.
u-test
u-test for the mean is a statistical test for a population mean.
Requirement of u-test: For any population when the sample size n ≥ 30.
Note
When the sample size is at least 30, the sampling distribution for the sample mean is
normal.
Example 6.3
The average weekly earnings for female social workers is $670. Do men in the same
positions have average weekly earnings that are higher than those for women? A random
sample of n = 40 male social workers showed x = $725 and s = $102. Test the
appropriate hypothesis using α = 0.01.
Example 6.3
The average weekly earnings for female social workers is $670. Do men in the same
positions have average weekly earnings that are higher than those for women? A random
sample of n = 40 male social workers showed x = $725 and s = $102. Test the
appropriate hypothesis using α = 0.01.
H1 : µ 6= µ0
Figure 6.4: The rejection region for a two-tailed test with α = 0.01
Example 6.4
The daily yield for a local chemical plant has averaged 880 tons for the last several
years. The quality control manager would like to know whether this average has changed
in recent months. She randomly selects 50 days from the computer database and
computes the average and standard deviation of the n = 50 yields as x = 871 tons and
s = 21 tons, respectively. Test the appropriate hypothesis using α = 0.05.
Practice Test
Question 6.1
Many companies are becoming involved in flextime, in which a worker schedules his or
her own work hours or compresses work weeks. A company that was contemplating the
installation of a flextime schedule estimated that it needed a minimum mean of 7 hours
per day per assembly worker in order to operate effectively. Each of a random sample of
100 of the company’s assemblers was asked to submit a tentative flextime schedule:
The number of hours worked 5–5.5 5.5–6 6–6.5 6.5–7 7–7.5 7.5–8
per day on Mondays
The number of random samples 5 10 25 30 17 13
Do the data provide sufficient evidence to indicate that the mean number of hours
worked per day on Mondays, for all of the company’s assemblers, will be less than 7
hours? Test using α = 0.05.
Example: Find the critical value(s) t using Table 5.1 in the row with (n − 1) d.f.
(n−1)
The critical value t1−α for a right-tailed test given α = 0.01 and n = 24 is
(23)
t0.99 = 2.500.
(n−1)
The critical value t1−α/2 for a two-tailed test given α = 0.01 and n = 24 is
(23)
t0.995 = 2.807.
Example 6.5
A local telephone company claims that the average length of a phone call is 8 minutes. In
a random sample of 18 phone calls, the sample mean was 7.8 minutes and the standard
deviation was 0.5 minutes. Is there enough evidence to support this claim at α = 0.05?
Example 6.6
A manufacturer claims that its rechargeable batteries have an average life greater than
1000 charges. A random sample of 10 batteries has a mean life of 1002 charges and a
standard deviation of 14. Is there enough evidence to support this claim at α = 0.01?
p̂ − p0 √
uT = p n
p0 (1 − p0 )
m
where p̂ = .
n
Example 6.7
A college claims that more than 94% of their graduates find employment within 6
months of graduation. In a sample of 500 randomly selected graduates, 475 of them
were employed. Is there enough evidence to support the college’s claim at a 1% level of
significance?
Example 6.7
A college claims that more than 94% of their graduates find employment within 6
months of graduation. In a sample of 500 randomly selected graduates, 475 of them
were employed. Is there enough evidence to support the college’s claim at a 1% level of
significance?
Example 6.8
A cigarette manufacturer claims that 1/8 of the US adult population smokes cigarettes.
In a random sample of 100 adults, 5 are cigarette smokers. Test the claim at α = 0.05.
Example 6.8
A cigarette manufacturer claims that 1/8 of the US adult population smokes cigarettes.
In a random sample of 100 adults, 5 are cigarette smokers. Test the claim at α = 0.05.
Content
1 6.1 Introduction
6.1.1 Key terms and concepts
6.1.2 Statistical decision for hypothesis testing
and s
q σ12 σ2
σx1 −x2 = σx21 + σx22 = + 2.
n1 n2
Note
When the samples are large, you can use s1 and s2 in place of σ1 and σ2 . If the samples
are not large, you can still use a two-sample u-test, provided the populations are
normally distributed and the population standard deviations are known.
Note
When the samples are large, you can use s1 and s2 in place of σ1 and σ2 . If the samples
are not large, you can still use a two-sample u-test, provided the populations are
normally distributed and the population standard deviations are known.
Step 3. Specify the level of significance. Determine the rejection region (Wα ).
Step 4. Make a decision to reject or fail to reject the null hypothesis.
Step 5. Interpret the decision in the context of the original claim.
Example 6.9
A high school math teacher claims that students in her class will score higher on the
math portion of the ACT then students in a colleague’s math class. The mean ACT
math score for 49 students in her class is 22.1 and the standard deviation is 4.8. The
mean ACT math score for 44 of the colleague’s students is 19.8 and the standard
deviation is 5.4. At α = 0.10, can the teacher’s claim be supported?
Three conditions are necessary to use a t-test for small independent samples.
1 The samples must be randomly selected.
2 The samples must be independent. Two samples are independent if the sample
selected from one population is not related to the sample selected from the second
population.
3 Each population must have a normal distribution.
Three conditions are necessary to use a t-test for small independent samples.
1 The samples must be randomly selected.
2 The samples must be independent. Two samples are independent if the sample
selected from one population is not related to the sample selected from the second
population.
3 Each population must have a normal distribution.
2 If the population variances are equal, then information from the two samples is
combined to calculate a pooled estimate of the standard deviation σ̂.
s
(n1 − 1)s21 + (n2 − 1)s22
σ̂ =
n1 + n2 − 2
Step 3. Specify the level of significance. Determine the rejection region Wα (with
d.f. = n1 + n2 − 2 or d.f. is smaller of n1 − 1 or n2 − 1.).
Step 4. Make a decision to reject or fail to reject the null hypothesis. If tT is in
the rejection region, reject H0 . Otherwise, fail to reject H0 .
Step 5. Interpret the decision in the context of the original claim.
Example 6.10
A random sample of 17 police officers in Brownsville has a mean annual income of
$35800 and a standard deviation of $7800. In Greensville, a random sample of 18 police
officers has a mean annual income of $35100 and a standard deviation of $7375. Test
the claim at α = 0.01 that the mean annual incomes in the two cities are not the same.
Assume the population variances are equal.
1 2 (n +n −2) (n +n −2)
1 2
3 Wα = (−∞; −t1−α/2 ) ∪ (t1−α/2 ; +∞) = (−∞; −2.576) ∪ (2.576; +∞).
4 Since tT = 0.273 ∈
/ Wα , fail to reject H0 .
5 There is not enough evidence at the 1% level to support the claim that the mean
annual incomes differ.
Nguyễn Thị Thu Thủy (SAMI-HUST) Hypothesis Testing HANOI – 2019 57 / 64
6.3 Hypothesis Testing with Two Samples 6.3.2 Testing the Difference Between Proportions
p̂1 = p̂2 ,
Example 6.11
A recent survey stated that male college students smoke less than female college
students. In a survey of 1245 male students, 361 said they smoke at least one pack of
cigarettes a day. In a survey of 1065 female students, 341 said they smoke at least one
pack a day. At α = 0.01, can you support the claim that the proportion of male college
students who smoke at least one pack of cigarettes a day is lower then the proportion of
female college students who smoke at least one pack a day?