You are on page 1of 116

Chapter 8: Test of Hypotheses for a Single

Sample

Course Name: PROBABILITY & STATISTICS


Lecturer: Duong Thi Hong

Hanoi, 2022

1 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Content

1 Statistical Hypotheses
2 Tests on the Mean of a Normal Distribution, Variance
Known
3 Tests on the Mean of a Normal Distribution, Variance
Unknown
4 Tests on a Population Proportion

2 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Content

1 Statistical Hypotheses
2 Tests on the Mean of a Normal Distribution, Variance
Known
3 Tests on the Mean of a Normal Distribution, Variance
Unknown
4 Tests on a Population Proportion

3 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Problem

An air crew escape system that consists of an ejection seat and a rocket
motor that powers the seat. The rocket motor contains a propellant.
In order for the ejection seat to function properly, the propellant
should have a mean burning rate of 50 cm/s.

4 / 100 Chapter 8: Test of Hypotheses for a Single Sample


So the practical engineering question that must be answered is: Does
the mean burning rate of the propellant equal 50 cm/s, or is it some
other value (either higher or lower)?

5 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Statistical Hypotheses

Statistical Hypothesis

A statistical hypothesis is a statement about the parameters of one


or more populations.
For a test of statistical hypothesis problem: null hypothesis H0 and
alternative hypothesis H1.

6 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Statistical Hypotheses

Statistical Hypothesis

A statistical hypothesis is a statement about the parameters of one


or more populations.
For a test of statistical hypothesis problem: null hypothesis H0 and
alternative hypothesis H1.
Failing to reject H0 ⇐⇒ Rejecting H1.

6 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Statistical Hypotheses

Statistical Hypothesis

A statistical hypothesis is a statement about the parameters of one


or more populations.
For a test of statistical hypothesis problem: null hypothesis H0 and
alternative hypothesis H1.
Failing to reject H0 ⇐⇒ Rejecting H1.
Rejecting H0 ⇐⇒ Failing to reject H1.

6 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Example 1

Consider the aircrew escape system described in the introduction.


Specifically, we are interested in deciding whether or not the mean
burning rate is 50 centimeters per second.

7 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Example 1

Consider the aircrew escape system described in the introduction.


Specifically, we are interested in deciding whether or not the mean
burning rate is 50 centimeters per second.
µ : the mean burning rate.
Null hypothesis H0: µ = 50 cm/s.
Alternative hypothesis H1: µ 6= 50 cm/s.

7 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Example 2

A researcher claims that less than 63% of voters favor gun control.
Express the null hypothesis and the alternative hypothesis.

8 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Example 2

A researcher claims that less than 63% of voters favor gun control.
Express the null hypothesis and the alternative hypothesis.
p: percentage of voters favor gun control.
Null hypothesis H0: p = 0.63
Alternative hypothesis H1: p < 0.63.

8 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Example 3

A soft drink manufacturer claims that its 2 liter soft drink bottle on
average holds at least 2000 ml of soft drink.

9 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Example 3

A soft drink manufacturer claims that its 2 liter soft drink bottle on
average holds at least 2000 ml of soft drink.
Null hypothesis H0: µ = 2000
Alternative hypothesis H1: µ < 2000.

9 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Question 1

The owner of a football team claims that the average attendance at


games is over 45,000. Express the null hypothesis and the alternative
hypothesis in symbolic form.
µ : the average attendance at games.

10 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Question 1

The owner of a football team claims that the average attendance at


games is over 45,000. Express the null hypothesis and the alternative
hypothesis in symbolic form.
µ : the average attendance at games.
Answer:H0 : µ = 45, 000 H1 : µ > 45, 000.
This is a one-sided alternative hypothesis.

10 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Question 1

The owner of a football team claims that the average attendance at


games is over 45,000. Express the null hypothesis and the alternative
hypothesis in symbolic form.
µ : the average attendance at games.
Answer:H0 : µ = 45, 000 H1 : µ > 45, 000.
This is a one-sided alternative hypothesis.
Question 2

A cereal company claims that the mean weight of the cereal in its
packets is 14.2 oz. Express the null hypothesis and the alternative
hypothesis in symbolic form.
µ : the mean weight of the cereal in its packets.

10 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Null hypothesis and alternative hypothesis

Question 1

The owner of a football team claims that the average attendance at


games is over 45,000. Express the null hypothesis and the alternative
hypothesis in symbolic form.
µ : the average attendance at games.
Answer:H0 : µ = 45, 000 H1 : µ > 45, 000.
This is a one-sided alternative hypothesis.
Question 2

A cereal company claims that the mean weight of the cereal in its
packets is 14.2 oz. Express the null hypothesis and the alternative
hypothesis in symbolic form.
µ : the mean weight of the cereal in its packets.
Answer: H0 : µ = 14.2 H1 : µ 6= 14.2.
This is a two-sided alternative hypothesis.
10 / 100 Chapter 8: Test of Hypotheses for a Single Sample
Null hypothesis and alternative hypothesis

We have 2 form on the alternative hypothesis:


(1) two-sided alternative hypothesis
H0 : µ = µ0 H1 : µ 6= µ0

(2) one-sided alternative hypothesis


H0 : µ = µ0 H1 : µ > µ0 or
H0 : µ = µ0 H1 : µ < µ0 .

11 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests of Statistical Hypotheses

What is Hypothesis testing?

A procedure leading to a decision about a particular hypothesis is


called a test of a hypothesis. Hypothesis-testing procedures rely on
using the information in a random sample from the population of
interest. If this information is consistent with the hypothesis, we will
not reject the hypothesis; however, if this information is inconsistent
with the hypothesis, we will conclude that the hypothesis is false.

12 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests of Statistical Hypotheses

Suppose we wish to test


H0 : µ = 50 cm/s.
H1 : µ 6= 50 cm/s.
Taking a sample of size n = 10.
x̄: sample mean burning rate. x̄ can take on many different values.
Suppose that
If 48.5 ≤ x̄ ≤ 51.5, not reject H0.
If either x̄ < 48.5 or x̄ > 51.5, reject H0.
Definition

The critical region for the test: (x̄ < 48.5 or x̄ > 51.5) is the
region that rejects H0.
The acceptance region for the test: (48.5 ≤ x̄ ≤ 51.5) is the
region that fails to reject H0.
The critical values: (48.5 and 51.5) are the boundaries between
the critical regions and the acceptance region.
13 / 100 Chapter 8: Test of Hypotheses for a Single Sample
Tests of Statistical Hypotheses

Type I error and Type II error


Rejecting the null hypothesis H0 when it is true is defined as a
type I error.
Failing to reject the null hypothesis when it is false is defined as a
type II error.

14 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Type I error and Type II error

Example

The owner of a football team claims that the average attendance at


games is over 45,000. Determine the type I error and the type II error.

15 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Type I error and Type II error

Example

The owner of a football team claims that the average attendance at


games is over 45,000. Determine the type I error and the type II error.
Answer: We have H0 : µ = 45, 000 H1 : µ > 45, 000. Hence
Type I error: The error of rejecting the claim that the mean
attendance is at most 45,000, when it really is at most 45,000.
Type II error: The error of failing to reject the claim that the mean
attendance is at most 45,000, when it really is more than 45,000.

15 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests of Statistical Hypotheses

Probability of Type I Error


α = P (type I error) = P (reject H0 when H0 is true).

Sometimes the type I error probability is called the significance level,


or the α-error, or the size of the test.
Probability of Type II Error
β = P (type II error) = P (fail to reject H0 when H0 is false)

16 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Computing the Type I Error Probability

In the propellant burning rate example, a type I error will occur when
either x̄ > 51.5 or x̄ < 48.5 when the true mean burning rate really is
50 centimeters per second.

α = P (X̄ < 48.5 when µ = 50) + P(X̄ > 51.5 when µ = 50).

Suppose that the standard deviation of burning rate is σ = 2.5


centimeters per second. According to the central limit theorem, the
distribution of the sample mean is√approximately normal with mean
µ = 50 and standard deviation σ/ n = 2.5/ 10 = 0.79. Therefore,

48.5 − 50 51.5 − 50
α = P (Z < ) + P (Z > )
0.79 0.79
= P (Z < −1.90) + P (Z > 1.90) = 0.0287 + 0.0287 = 0.0574

This implies that 5.74% of all random samples would lead to rejection
of the hypothesis when the true mean burning rate is really 50
centimeters per second.
17 / 100 Chapter 8: Test of Hypotheses for a Single Sample
Computing the Type I Error Probability

From inspection of Fig. 9-2, notice that we can reduce α by widening


the acceptance region. For example, if we make the critical values 48
and 52, the value of is
48 − 50 52 − 50
α = P (Z < ) + P (Z > )
0.79 0.79
= P (Z < −2.53) + P (Z > 2.53) = 0.0057 + 0.0057 = 0.0114

18 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Computing the Type I Error Probability

We could also reduce by increasing the sample size. If


√α

n = 16, σ/ n = 2.5/ 16 = 0.625 and using the original critical region
(critical values are and ), we find
48.5 51.5
48.5 − 50 51.5 − 50
α = P (Z < ) + P (Z > )
0.625 0.625
= P (Z < −2.4) + P (Z > 2.4) = 0.0082 + 0.0082 = 0.0164

19 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Computing the Type II Error Probability

To calculate β (sometimes called the β−error), we must have a specific


alternative hypothesis; that is, we must have a particular value of µ.

20 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Computing the Type II Error Probability

Figure 9-3 will help us calculate the probability of type II error. We


find that
β = P (48.5 ≤ X̄ ≤ 51.5 when µ = 52)
48.5 − 52 51.5 − 52
= P( ≤Z≤ )
0.79 0.79
= P (−4.43 ≤ Z ≤ −0.63) = P (Z ≤ −0.63) − P (Z ≤ −4.43)
= 0.2643 − 0.000 = 0.2643

Thus, if we are testing H0 : µ = 50 against H1 : µ 6= 50 with n = 10,


and the true value of the mean is µ = 52, the probability that we will
fail to reject the false null hypothesis is 0.2643.

21 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Computing the Type II Error Probability

The probability of making a type II error increases rapidly as the true


value of µ approaches the hypothesized value. For example, see Fig.
9-4, where the true value of the mean is µ = 50.5 and the hypothesized
value is H0 : µ = 50. Then
β = P (48.5 ≤ X̄ ≤ 51.5 when µ = 50.5)
48.5 − 50.5 51.5 − 50.5
= P( ≤Z≤ )
0.79 0.79
= P (−2.53 ≤ Z ≤ 1.27) = P (Z ≤ 1.27) − P (Z ≤ −2.53)
= 0.8980 − 0.0057 = 0.8923

22 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Computing the Type II Error Probability

The type II error probability also depends on the sample size n.


Suppose that the null hypothesis is H0 : µ = 50 centimeters per second
and that the true value of the mean is µ = 52. When n = 16, we have
β = P (48.5 ≤ X̄ ≤ 51.5 when µ = 52)
48.5 − 52 51.5 − 52
= P( ≤Z≤ )
0.625 0.625
= P (−5.60 ≤ Z ≤ −0.80) = P (Z ≤ −0.80) − P (Z ≤ −5.60)
= 0.2119 − 0.0000 = 0.2119

23 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Computing the Type II Error Probability

The results from this section and a few other similar calculations are
summarized in the following table.

24 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Test of Statistical Hypotheses

Remark

The size of the critical region, and consequently the probability of


a type I error α, can always be reduced by appropriate selection of
the critical values.
Type I and type II errors are related. A decrease in the probability
of one type of error always results in an increase in the probability
of the other, provided that the sample size ndoes not change.
An increase in sample size reduces β , provided that α is held
constant.
When the null hypothesis is false, β increases as the true value of
the parameter approaches the value hypothesized in the null
hypothesis. The value of β decreases as the difference between the
true mean and the hypothesized value increases.
25 / 100 Chapter 8: Test of Hypotheses for a Single Sample
Test of Statistical Hypotheses

Generally, the analyst controls the type I error probability α when he


or she selects the critical values. Thus, it is usually easy for the analyst
to set the type I error probability at (or near) any desired value.
Notice

A widely used procedure in hypothesis testing is to use a type 1 error


or significance level of α = 0.05. This value has evolved through
experience, and may not be appropriate for all situations.

26 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Test of Statistical Hypotheses

Generally, the analyst controls the type I error probability α when he


or she selects the critical values. Thus, it is usually easy for the analyst
to set the type I error probability at (or near) any desired value.
Notice

A widely used procedure in hypothesis testing is to use a type 1 error


or significance level of α = 0.05. This value has evolved through
experience, and may not be appropriate for all situations.
An important concept that we will make use of is the power of a
statistical test.
Power

The power of a statistical test is the probability of rejecting the null


hypothesis H0 when the alternative hypothesis is true.
The power is computed as 1 − β , and power can be interpreted as the
probability of correctly rejecting a false null hypothesis.
26 / 100 Chapter 8: Test of Hypotheses for a Single Sample
P-Values in Hypothesis Tests

P-Value

The P −value is the smallest level of significance that would lead to


rejection of the null hypothesis H0 with the given data.

27 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 1

28 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 2

29 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 3

30 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 4

31 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 5

32 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 6

33 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 7

34 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 8

35 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 9

36 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 10

37 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 11

38 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 12

39 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 13

40 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 14

41 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 15

42 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 16

43 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 17

44 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 18

45 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 19

46 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Content

1 Statistical Hypotheses
2 Tests on the Mean of a Normal Distribution, Variance
Known
3 Tests on the Mean of a Normal Distribution, Variance
Unknown
4 Tests on a Population Proportion

47 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2. Tests on the Mean of a Normal Distribution,

Variance Known

1) In this section, we consider hypothesis testing about the mean µ


of a single normal population where the variance of the population
σ 2 is known.
2) We will assume that a random sample X1, X2, ..., Xn has been
taken from the population. Based on our previous discussion, the
sample mean X is an unbiased point estimator of µ with variance
σ 2 /n.

48 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.1 Hypothesis Tests on the Mean

Suppose that we wish to test the hypotheses


H0 : µ = µ0
H1 : µ 6= µ0 .

We have a random sample X1, X2, ..., Xn from a normal population.


Since X̄√has a normal distribution with mean µ0 and standard devia-
tion σ/ n if the null hypothesis is true, we could calculate a P-value
or construct a critical region based on the computed value of the
sample mean X̄ .
Test Statistic
X̄ − µ0
Z0 = √ ,
σ/ n
is the standard normal distribution.

49 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.1 Hypothesis Tests on the Mean

The hypothesis testing procedure is as follows. Take a random sample


of size n and compute the value of the sample mean x̄. The standard
normal z-value that corresponds to x̄ is
x̄ − µ0
z0 = √
σ/ n

The hypothesis testing methods:


P-value approach
Fixed significance level approach with the z-test

50 / 100 Chapter 8: Test of Hypotheses for a Single Sample


P-value approach

If P = P −value is of sufficiently small value (P < α), reject the null


hypothesis.

For the two-sided alternative hypothesis, the P-value is

P = 2[1 − Φ(|z0 |)]

51 / 100 Chapter 8: Test of Hypotheses for a Single Sample


P-value approach

The upper-tailed test involves the hypotheses

H0 : µ = µ0
H1 : µ > µ0 .

has P-value as P = 1 − Φ(z0 ).


The lower-tailed test involves the hypotheses

H0 : µ = µ0
H1 : µ < µ0 .

has P-value as P = Φ(z0 ).

52 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Fixed Significance Level Approach with the

z-test

We have to do is determine where to place the critical regions for the


two-sided and one-sided alternative hypotheses.
For the two-sided alternative hypothesis:
1) Reject H0 if the observed value of the test statistic z0 is
either z0 > zα/2 or z0 < −zα/2;
2) Fail to reject H0 if −zα/2 < z0 < zα/2;
where, zα/2 is the 100α/2 percentage point of the standard
normal distribution.
For the upper-tailed test, we would reject H0 if z0 > zα.
For the lower-tailed test, we reject H0 if z0 < −zα.

53 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.1 Hypothesis Tests on the Mean

Example 1

Suppose you want to test the claim that µ 6= 8. Given a sample size of
n = 82 and a level of significance of α = 0.02. When should you reject
H0 ?

54 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.1 Hypothesis Tests on the Mean

Example 1

Suppose you want to test the claim that µ 6= 8. Given a sample size of
n = 82 and a level of significance of α = 0.02. When should you reject
H0 ?
Answer: We should reject H0 if the test statistic value
x̄ − 8
z0 = √
σ/ 82

is either bigger than z0.01 = 2.33 or less than −z0.01 = −2.33.


Note. When σ is unknown and the sample size n ≥ 30, we can use
the test statistic
X̄ − µ0
Z0 = √
s/ n

54 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.1 Hypothesis Tests on the Mean

Example 2

You wish to test the claim that µ ≥ 45 at a level of significance of


α = 0.025 and are given sample statistics n = 44; s = 5; x̄ = 45.8.
Compute the value of the test statistic.

55 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.1 Hypothesis Tests on the Mean

Example 2

You wish to test the claim that µ ≥ 45 at a level of significance of


α = 0.025 and are given sample statistics n = 44; s = 5; x̄ = 45.8.
Compute the value of the test statistic.
Answer: Test statistic value
x̄ − µ0 45.8 − 45
z0 = √ = √ = 1.061
s/ n 5/ 44

55 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.2 Type II Error and Choice of Sample Size

Consider the two-sided hypotheses


H0 : µ = µ0
H1 : µ 6= µ0 .

Suppose that the null hypothesis is false and that the true value of
the mean is µ = µ0 + δ, δ > 0
The test statistic is

X̄ − µ0 X̄ − (µ0 + δ) δ n
Z0 = √ = √ +
σ/ n σ/ n σ

Therefore, the distribution of Z0 when H1 is true is



δ n
Z0 ∼ N ( , 1)
σ

56 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.2 Type II Error and Choice of Sample Size

A type II error will be made only if −zα/2 ≤ Z0 ≤ zα/2


Probability of a Type II Error for a Two-Sided Test on the Mean,

Variance Known
√ √
δ n δ n
β = Φ(zα/2 − ) − Φ(−zα/2 − )
σ σ
It is also possible to derive an equation similar for a one-sided alter-
native hypothesis.

57 / 100 Chapter 8: Test of Hypotheses for a Single Sample


2.2 Type II Error and Choice of Sample Size

If δ > 0 then β ∼= Φ(zα/2 − δ σ n ) since Φ(−zα/2 − δ σ n ) = 0. Let zβ


√ √

be the 100β upper percentile of the standard normal distribution.


Then, β = Φ(−zβ ). Therefore,

−zβ ∼
= zα/2 −
δ n
σ

Sample Size for a Two-Sided Test on the Mean, Variance Known

n=
(zα/2 +zβ )2 σ 2
δ2
where δ = µ − µ0.
Sample Size for a One-Sided Test on the Mean, Variance Known

n= δ2
where δ = µ − µ0.
(zα +zβ )2 σ 2

Note: If n is not an integer, the convention is to round the sample


size up to the next integer.
58 / 100 Chapter 8: Test of Hypotheses for a Single Sample
Question 1

59 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 2

60 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 3

61 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 4

62 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 5

63 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 6

64 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 7

65 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 8

66 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 9

67 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 10

68 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 11

69 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Content

1 Statistical Hypotheses
2 Tests on the Mean of a Normal Distribution, Variance
Known
3 Tests on the Mean of a Normal Distribution, Variance
Unknown
4 Tests on a Population Proportion

70 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on the Mean of a Normal Distribution,

Variance Unknown

Consider testing the hypotheses


H0 : µ = µ0
H1 : µ 6= µ0 .

Test Statistic
X̄ − µ0
T0 = √
S/ n
If the null hypothesis is true, T0 has a t distribution with n−1 degrees
of freedom. We can calculate the P-value from this distribution, or, if
we use a fixed significance level approach, we can locate the critical
region to control the type I error probability at the desired level.

71 / 100 Chapter 8: Test of Hypotheses for a Single Sample


3.1 Hypothesis Tests on the Mean

To test H0 against the two-sided alternative H0 6= 0, the value of the test


x̄−µ
statistic t0 = √ 0 is calculated.
s/ n

P-value approach

For the two-sided alternative hypothesis, the P-value is

P = 2P (Tn−1 > |t0 |)

Similarly, the one-sided alternatives:


The upper-tailed test involves the hypotheses

H0 : µ = µ0 ; H1 : µ > µ0 ,

has P-value as P = P (Tn−1 > t0 ).


The lower-tailed test involves the hypotheses

H0 : µ = µ0 ; H1 : µ < µ0 ,

has P-value as P = P (Tn−1 < t0 ).


72 / 100 Chapter 8: Test of Hypotheses for a Single Sample
Fixed Significance Level Approach with the

z-test

For the two-sided alternative hypothesis:


1) Reject H0 if t0 > tα/2,n−1 or t0 < −tα/2,n−1;
2) Fail to reject H0 if −tα/2,n−1 < t0 < tα/2,n−1;
where, tα/2,n−1 is the α/2 percentage points of the t distribution
with n − 1 degrees of freedom.
Similarly, for the upper-tailed test, we would reject H0 if t0 > tα,n−1.
For the lower-tailed test, we reject H0 if t0 < −tα,n−1.

73 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on the Mean of a Normal Distribution,

Variance Unknown

Example 3

Find the test statistic t0 for a sample with n = 9; x̄ = 5.6; s = 0.88 and
if H1 : µ > 5.7.

74 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on the Mean of a Normal Distribution,

Variance Unknown

Example 3

Find the test statistic t0 for a sample with n = 9; x̄ = 5.6; s = 0.88 and
if H1 : µ > 5.7.
Answer: We have n = 9; x̄ = 5.6; s = 0.88; µ0 = 5.7. Hence
x̄ − µ0 5.6 − 5.7
t0 = √ = √ = −0.341
s/ n 0.88/ 9

74 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on the Mean of a Normal Distribution,

Variance Unknown

Example 4

Find the critical values for a sample with n = 10; x̄ = 7.9; s = 1.2 if
H1 : µ < 8.2 and the level of significance α = 0.05. Let
t0.05,9 = 1.833; t0.025,9 = 2.262

75 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on the Mean of a Normal Distribution,

Variance Unknown

Example 4

Find the critical values for a sample with n = 10; x̄ = 7.9; s = 1.2 if
H1 : µ < 8.2 and the level of significance α = 0.05. Let
t0.05,9 = 1.833; t0.025,9 = 2.262
Answer: This is a one-sided alternative hypothes is H1 : µ < 8.2 on
mean with unknown variance. The critical value is
−tα,n−1 = −t0.05,9 = −1.833

75 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on the Mean of a Normal Distribution,

Variance Unknown

Example 5

Given a sample with n = 10; x̄ = 7.9; s = 1.2 if H1 : µ 6= 8.2 and the


level of significance α = 0.05. Let t0.05,9 = 1.833; t0.025,9 = 2.262. Should
we reject H0?

76 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on the Mean of a Normal Distribution,

Variance Unknown

Example 5

Given a sample with n = 10; x̄ = 7.9; s = 1.2 if H1 : µ 6= 8.2 and the


level of significance α = 0.05. Let t0.05,9 = 1.833; t0.025,9 = 2.262. Should
we reject H0?
Answer: This is a two-sided alternative hypothesis on population
mean with unknown variance. Test statistic value
x̄ − µ0 7.9 − 8.2
t0 = √ = √ = −0.79
s/ n 1.2/ 10

The critical values 2.262; −2.262. Since −2.262 < −0.79 < 2.262, we
should not reject H0.

76 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 1

77 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 2

78 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 3

79 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 4

80 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 5

81 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 6

82 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 7

83 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 8

84 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 9

85 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Content

1 Statistical Hypotheses
2 Tests on the Mean of a Normal Distribution, Variance
Known
3 Tests on the Mean of a Normal Distribution, Variance
Unknown
4 Tests on a Population Proportion

86 / 100 Chapter 8: Test of Hypotheses for a Single Sample


4.1 Large-Sample Tests on a Proportion

Consider the two-sided hypotheses


H0 : p = p0
H1 : p 6= p0 .

Then, if the null hypothes is true, we have N ∼ N (np0, np0(1 − p0))


The test statistic is X − np
0
Z0 = p
np0 (1 − p0 )

87 / 100 Chapter 8: Test of Hypotheses for a Single Sample


P-value approach

For the two-sided alternative hypothesis, the P-value is

P = 2[1 − Φ(|z0 |)]

The upper-tailed test involves the hypotheses

H0 : p = p0
H1 : p > p0 .

has P-value as P = 1 − Φ(z0 ).


The lower-tailed test involves the hypotheses

H0 : p = p0
H1 : p < p0 .

has P-value as P = Φ(z0 ).

88 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Fixed Significance Level Approach with the

z-test

For the two-sided alternative hypothesis:


1) Reject H0 if the observed value of the test statistic z0 is
either z0 > zα/2 or z0 < −zα/2;
2) Fail to reject H0 if −zα/2 < z0 < zα/2;
where, zα/2 is the 100α/2 percentage point of the standard
normal distribution.
Similarly, for the upper-tailed test, we would reject H0 if
z0 > zα .
For the lower-tailed test, we reject H0 if z0 < −zα.

89 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on a Population Proportion

Example 6

A random sample of 200 circuits generated 9 defectives. Use the data to test
H0 : p = 0.05 versus H1 : p 6= 0.05. Use α = 0.05. Let
z0.05 = 1.65, z0.025 = 1.96
a) Find the critical values for this test.
b) Should we reject H0 ?

90 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Tests on a Population Proportion

Example 6

A random sample of 200 circuits generated 9 defectives. Use the data to test
H0 : p = 0.05 versus H1 : p 6= 0.05. Use α = 0.05. Let
z0.05 = 1.65, z0.025 = 1.96
a) Find the critical values for this test.
b) Should we reject H0 ?
Answer: This is a two-tail alternative hypothesis on proportion population
p0 = 0.05. The sample has n = 200; X = 9 and the level of significance
α = 0.05
a) The critical values: zα/2 = 1.96, −zα/2 = −1.96
b) Test statistic value

x − np0 9 − 200 ∗ 0.05


z0 = p =p = −0.324
np0 (1 − p0 ) 200 ∗ 0.05 ∗ (1 − 0.05)

We see that −z0.025 < z0 < z0.025 , hence we fail to reject H0 .

90 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 1

91 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 2

92 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 3

93 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 4

94 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 5

95 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 6

96 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 7

97 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 8

98 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 9

99 / 100 Chapter 8: Test of Hypotheses for a Single Sample


Question 10

100 / 100 Chapter 8: Test of Hypotheses for a Single Sample

You might also like