Null Hypothesis: P-Value
Null Hypothesis: P-Value
Null Hypothesis H : A maintained hypothesis that is held to be true unless sufficient evidence to the contrary is
0
obtained. Null hypothesis: Always contains “=” , “≤” or “” sign, it may or may not be rejected
Alternative Hypothesis H : A hypothesis against which the null hypothesis is tested and which will be held to
a
p-value: Probability of obtaining a test statistic more extreme ( ≤ or ) than the observed sample value
given H 0 is true
Simple Hypothesis: A hypothesis that specifies a single value for a population parameter of interest.
Composite Hypothesis: A hypothesis that specifies a range of values for a population parameter.
nhypa 2
One-Sided Alternative: An alternative hypothesis involving all possible values of a population parameter on
either one side or the other of (that is, either greater than or less than) the value specified by a simple null
hypothesis.
Two-Sided Alternative: An alternative hypothesis involving all possible values of a population parameter other
than the value specified by a simple null hypothesis.
Hypothesis Test Decisions: A decision rule is formulated, leading the investigator to either reject or fail to reject
the null hypothesis on the basis of sample evidence.
Significance Level: The probability of rejecting a null hypothesis that is true. This probability is sometimes
expressed as a percentage, so a test of significance level a is referred to as a 100% level test.
Critical value: The boundary point(s) between the acceptance region and critical region.
nhypa 3
CONFIDENCE INTERVAL
8.1.1 A sample of 31 data observations has a sample mean x = 53.42 and a sample standard
deviation s = 3.05. Construct a 95% two-sided t-interval for the population mean. (This problem is
continued in Problem 8.1.9.)
Solution:
(1 − α )100% = α 0.95;=
95% , that is 1 −= α 0.05;
= α
2 0.025 .
Thus, t=
α ,( n −1) = 2.042
t0.025,30 (using student’s t table),
2
(x −t ,x +t
s
0.025,30 n ) s
0.025,30 n
AjM_Summer_2020 1
8.1.2 A random sample of 41 glass sheets is obtained and their thicknesses are measured. The sample
mean is x = 3.04 mm and the sample standard deviation is s =0.124 mm. Construct a 99% two-sided
t-interval for the mean glass thickness. Do you think it is plausible that the mean glass thickness is
2.90 mm? (This problem is continued in Problems 8.1.10 and 8.6.12.)
The confidence interval does not contain the value 2.90. Thus, .90 is not a plausible value
for the mean glass thickness.
AjM_Summer_2020 2
8.1.3 The breaking strengths of a random sample of 20 bundles of wool fibers have a sample mean x = 436.5 and
a sample standard deviation s = 11.90 .
Construct 90%, 95%, and 99% two-sided t-intervals for the average breaking strength μ.
Compare the lengths of the confidence intervals.
Do you think it is plausible that the average breaking strength is equal to 450.0? (This problem is continued in
Problems 8.1.11 and 8.6.13.)
Solution: At 90% confidence the critical point is t0.05,19 = 1.729 and the confidence interval is
AjM_Summer_2020 3
8.1.4 A random sample of 16 one-kilogram sugar packets is obtained and the actual weights of the
packets are measured. The sample mean is x = 1.053 kg and the sample standard deviation is s =
0.058 kg.
Construct a 99% two-sided t-interval for the average sugar packet weight.
Do you think it is plausible that the average weight is 1.025 kg? (This problem is continued in Problem
8.6.14.)
The confidence interval contains the value 1.025, and so 1.025 is a plausible value for the
average weight.
AjM_Summer_2020 4
8.1.5 A sample of 28 data observations has a sample mean x = 0.0328. If an experimenter wishes to
use a “known” value σ = 0.015 for the population standard deviation, construct an appropriate 95%
two-sided confidence interval for the population mean μ.
( x − z0.025,30 σ
n
, x + z0.025,30 σ
n ) = (0.0272, 0.0384).
AjM_Summer_2020 5
8.2.1 A sample of n = 18 observations has a sample mean of x = 57.74 and a sample standard
AjM_Summer_2020 6
8.2.2 A sample of n = 39 observations has a sample mean of x = 5532 and a sample standard deviation
AjM_Summer_2020 7
8.2.3 A sample of n = 13 observations has a sample mean of x = 2.879 . If an assumed known
standard deviation of σ = 0.325 is used, calculate the p-values for the hypothesis testing problems:
AjM_Summer_2020 8
8.2.4 A sample of n = 44 observations has a sample mean of x = 87.90 . If an assumed known standard
deviation of σ = 5.90 is used, calculate the p-values for the hypothesis testing problems:
n (x − µ)
Solution: Under H0 the test statistic is z = ~ N (0,1)
σ
44 ( 87.90 − 90.0 )
(a) z= = −2.36
5.90
The p-value is 2 × P ( z ≤ −2.36) = Φ (−2.36) =
0.018 .
44 ( 87.90 − 86.0 )
=
(b) z = 2.14
5.90
The p-value is P ( z > 2.14) =
1 − P ( z ≤ 2.14) =
1 − Φ (2.14) =
0.016 .
AjM_Summer_2020 9
8.2.5 An experimenter is interested in the hypothesis testing problem
H 0 : µ = 3.0 versus H A : µ = 3.0
where μ is the average thickness of a set of glass sheets in mm. Suppose that a sample of n = 41 glass
sheets is obtained and their thicknesses are measured.
(a) For what values of the t-statistic does the experimenter accept the null hypothesis with a size α = 0.10?
(b) For what values of the t-statistic does the experimenter reject the null hypothesis with a size α = 0.01?
Solution: (a) The critical point is t0.05,40 = 1.684 and
the null hypothesis is accepted when | t |≤ 1.684.
(b) The critical point is t0.005,40 = 2.704 and
the null hypothesis is rejected when | t |> 2.704
AjM_Summer_2020 10
Suppose that the sample mean is x = 3.04 mm and the sample standard deviation is s = 0.124 mm.
(c) Is the null hypothesis accepted or rejected with α = 0.10? With α = 0.01?
(d) Write down an expression for the p-value and evaluate it using a computer package.
Solution:
n (x − µ)
(c) Under H0 the =
test statistic is t ~ t (n − 1) .
s
41 × (3.04 − 3.00)
t= =2.006
0.124
The null hypothesis is rejected at size α = 0.10 and
accepted at size α = 0.01
AjM_Summer_2020 11
8.2.7 An experimenter is interested in the hypothesis testing problem
H 0 : µ = 1.025 kg versus H A : µ = 1.025 kg
where μ is the average weight of a 1-kilogram sugar packet. Suppose that a sample of n = 16 sugar
packets is obtained and their weights are measured.
(a) For what values of the t-statistic does the experimenter accept the null hypothesis with a size α =
0.10?
(b) For what values of the t-statistic does the experimenter reject the null hypothesis with a size α =
0.01?
AjM_Summer_2020 12
Suppose that the sample mean is x = 1.053 kg and the sample standard deviation is s = 0.058 kg.
(c) Is the null hypothesis accepted or rejected with α = 0.10? With α = 0.01?
(d) Write down an expression for the p-value and evaluate it using a computer package.
n (x − µ)
=
(c) Under H 0 the test statistic is t ~ t (n − 1) .
s
16 × (1.053 − 1.931)
t= =1.931
0.058
The null hypothesis is rejected at size α = 0.10 and
accepted at size α = 0.01.
AjM_Summer_2020 13
8.2.9 An experimenter is interested in the hypothesis testing problem
H 0 : µ ≤ 0.065 versus H A : µ > 0.065
where μ is the average density of a chemical solution. Suppose that a sample of n = 61 bottles of the
chemical solution is obtained and their densities are measured.
(a) For what values of the t-statistic does the experimenter accept the null hypothesis with a size α = 0.10?
(b) For what values of the t-statistic does the experimenter reject the null hypothesis with a size α = 0.01?
Solution:
(a) The critical point is t0.10,60 = 1.296
and the null hypothesis is accepted when t ≤ 1.296.
(b) The critical point is t0.01,60 = 2.390
and the null hypothesis is rejected when t > 2.390.
AjM_Summer_2020 14
8.2.9 (cont.) Suppose that the sample mean is x = 0.0768 and the sample standard deviation is s =
0.0231.
(c) Is the null hypothesis accepted or rejected with α = 0.10? With α = 0.01?
(d) Write down an expression for the p-value and evaluate it using a computer package.
Solution:
n (x − µ)
(c) Under H0 =
the test statistic is t ~ t (n − 1) .
s
61 × (0.0768 − 0.065)
t = 3.990
0.0231
AjM_Summer_2020 15
8.2.11 A machine is set to cut metal plates to a length of 44.350 mm. The lengths of a random sample
of 24 metal plates have a sample mean of x = 44.364 mm and a sample standard deviation of s =
0.019 mm. Is there any evidence that the machine is miscalibrated?
Soilution:
Consider the hypotheses H 0 : µ = 44.350 versus
H A : µ 6 ≠ 44.350.
n (x − µ)
Under H0 =
the test statistic is t ~ t (n − 1) .
s
24 × (44.364 − 44.350)
t = 3.61
0.019
AjM_Summer_2020 16
8.2.12 A food manufacturer claims that at the time of purchase by a consumer the average age of its
product is no more than 120 days. In an experiment to test this claim a random sample of 36 items are
found to have ages at the time of purchase with a sample mean of x = 122.5 days and a sample
standard deviation of s = 13.4 days. With this information how do you feel about the manufacturer’s
claim?
Solution:
AjM_Summer_2020 17
AjM_Summer_2020 18
8.2.13 A chemical plant is required to maintain ambient sulfur levels in the working environment
atmosphere at an average level of no more than 12.50. The results of 15 randomly timed measurements
of the sulfur level produced a sample mean of x = 14.82 and a sample standard deviation of s = 2.91.
What is the evidence that the chemical plant is in violation of the working code?
Solution:
Consider the hypotheses H 0 : µ ≤ 12.50 versus
H A : µ > 12.50
n (x − µ)
Under H0 =
the test statistic is t ~ t (n − 1) .
s
15 × (14.82 − 12.50)
t = 3.09
2.91
The p-value is P (t14 ≥ 3.09) =
0.004 .
There is sufficient evidence to conclude that the chemical plant is in violation of the working
code.
AjM_Summer_2020 19
9.3 ANALYSIS OF INDEPENDENT SAMPLES 409
These results are seen to match well with the corresponding analyses conducted previously
using the general procedure, which does not require the equality of the population variances.
When should an experimenter use this method with a pooled variance estimate, and when
should the general procedure be employed that does not require the equality of the population
variances? The safest answer is to always use the general procedure since it provides a valid
analysis even when the population variances are equal. However, if the population variances are
410 CHAPTER 9 COMPARING TWO POPULATION MEANS
equal or quite similar, then the pooled variance procedure generally provides a slightly more
powerful analysis with slightly shorter confidence intervals and slightly smaller p-values.
An experimenter’s assessment of whether or not the population variances can be taken to
be equal may be based on prior experience with the kind of data under consideration, or may
be based on a comparison of the sample standard deviations sx and s y . A formal test for the
equality of the population variances σ A2 and σ B2 is described in the Supplementary Problems
section at the end of this chapter. However, this test has some drawbacks and its employment
is not widely recommended.
In general, analyses performed with and without the use of a pooled variance estimate will
often provide similar results. In fact, if the results are quite different, then this will be because
the sample standard deviations sx and s y are quite different, in which case it is proper to use
the general procedure that does not require the equality of the population variances.
9.3.3 z-Procedure
Two-Sample z-Procedure
Consider a sample of size n from population A with a sample mean x̄, and a sample of
size m from population B with a sample mean ȳ. Suppose that the population
variances are assumed to take known values σ A2 and σ B2 .
A two-sided 1 − α level confidence interval for the difference in population means
μ A − μ B is
⎛ ⎞
σ 2
σ 2
σ 2
σ 2
μ A − μ B ∈ ⎝x̄ − ȳ − z α/2 A
+ B , x̄ − ȳ + z α/2 A
+ B⎠
n m n m
and
⎛ ⎞
σ A2 σ B2
μ A − μ B ∈ ⎝x̄ − ȳ − z α + , ∞⎠
n m
1 Introduction
A paired t-test is used to compare two population means where you have two samples in
which observations in one sample can be paired with observations in the other sample.
Examples of where this might occur are:
1. Calculate the difference (di = yi − xi ) between the two observations on each pair,
making sure you distinguish between positive and negative differences.
¯
2. Calculate the mean difference, d.
3. Calculate the standard deviation of the differences, sd , and use this to calculate the
standard error of the mean difference, SE(d)¯ =√ sd
n
5. Use tables of the t-distribution to compare your value for T to the tn−1 distribution.
This will give the p-value for the paired t-test.
1
NOTE:
For this test to be valid the differences only need to be approximately normally distributed.
Therefore, it would not be advisable to use a paired t-test where there were any extreme
outliers.
Example
Using the above example with n = 20 students, the following results were obtained:
Student Pre-module Post-module Difference
score score
1 18 22 +4
2 21 25 +4
3 16 17 +1
4 22 24 +2
5 19 16 -3
6 24 29 +5
7 17 20 +3
8 21 23 +2
9 23 19 -4
10 18 20 +2
11 14 15 +1
12 16 15 -1
13 16 18 +2
14 19 26 +7
15 18 18 0
16 20 24 +4
17 12 18 +6
18 22 25 +3
19 15 19 +4
20 17 16 -1
2
3 Confidence interval for the true mean difference
The in above example the estimated average improvement is just over 2 points. Note that
although this is statistically significant, it is actually quite a small increase. It would be
useful to calculate a confidence interval for the mean difference to tell us within what limits
the true difference is likely to lie. A 95% confidence interval for the true mean difference is:
sd
d¯ ± t∗ √ or, equivalently d¯ ± (t∗ × SE(d))
¯
n
where t∗ is the 2.5% point of the t-distribution on n − 1 degrees of freedom.
This confirms that, although the difference in scores is statistically significant, it is actually
relatively small. We can be 95% sure that the true mean increase lies somewhere between
just under one point and just over 3 points.
One-Sample Statistics
N Mean Std. Deviation Std. Error Mean
Difference 20 2.0500 2.83725 .63443
One-Sample Test
Test Value = 0
95% Confidence Interval
t df Sig. (2-tailed) Mean Difference Lower Upper
Difference 3.231 19 .004 2.0500 .7221 3.3779