0% found this document useful (0 votes)
58 views22 pages

Tests of Hypothesis For A Single Sample

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views22 pages

Tests of Hypothesis For A Single Sample

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

TESTS OF HYPOTHESIS FOR A SINGLE SAMPLE

Objectives: After careful study of this chapter, you should be able to do the following:

1. Structure engineering decision-making problems as hypothesis tests

2. Test hypotheses on the mean of a normal distribution using either a Z-test or a t-test procedure

3. Test hypotheses on the variance or standard deviation of a normal distribution

4. Test hypotheses on a population proportion

5. Use the P-value approach for making decisions in hypotheses tests

6. Compute power and type II error probability, and make sample size selection decisions for tests
on means, variances, and proportions

7. Explain and use the relationship between confidence intervals and hypothesis tests

In the previous two chapters we showed how a parameter of a population can be estimated from
sample data, using either a point estimate (Chapter 7) or an interval of likely values called a confidence
interval (Chapter 8). In many situations a different type of problem is of interest; there are two
competing claims about the value of a parameter, and the engineer must determine which claim is
correct. For example, suppose that an engineer is designing 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, and in
order for the ejection seat to function properly, the propellant should have a mean burning rate of 50
cm/sec. If the burning rate is too low, the ejection seat may not function properly, leading to an unsafe
ejection and possible injury of the pilot.

Higher burning rates may imply instability in the propellant or an ejection seat that is too powerful,
again leading to possible pilot injury. So, the practical engineering question that must be answered is:
Does the mean burning rate of the propellant equal 50 cm/sec, or is it some other value (either higher
or lower)? This type of question can be answered using a statistical technique called hypothesis testing.
This chapter focuses on the basic principles of hypothesis testing and provides techniques for solving the
most common types of hypothesis testing problems involving a single sample of data.

STATISTICAL HYPOTHESES

Many problems in engineering require that we decide which of two competing claim or
statements about some parameter is true. The statements are called hypotheses, and the decision-
making procedure is called hypothesis testing. This is one of the most useful aspects of statistical
inference, since many types of decision-making problems, tests, or experiments in the engineering world
can be formulated as hypothesis testing problems. Furthermore, as we will see, there is a very close
connection between hypothesis testing and confidence intervals.

Statistical hypothesis testing and confidence interval estimation of parameters are the
fundamental methods used at the data analysis stage of a comparative experiment, in which the
engineer is interested, for example, in comparing the mean of a population to a specified value. In this
chapter we discuss comparative experiments involving a single population, and our focus is on testing
hypotheses concerning the parameters of the population.
We now give a formal definition of a statistical hypothesis:

A statistical hypothesis is a statement about the parameters of one or more population.

Let:

H 0 : μ = 50 cm/sec

H 1 : μ ≠ 50 cm/sec

The statement H 0 : μ = 50 cm/sec is called the null hypothesis.

The null hypothesis is ALWAYS an equality.

The statement H 1 : μ ≠ 50 cm/sec is called the alternative hypothesis.

We can also have:

H 1 : μ > 50 or (one-sided)

H 1 : μ < 50 or(one-sided)

H 1 : μ ≠ 50 (two-sided)

TEST OF A HYPOTHESIS

Hypothesis-testing procedures rely on using the information in a random sample from

the population on interest, n.

If this information is consistent with the null hypothesis, then we will conclude that the

hypothesis is true.

If this information is inconsistent with the null hypothesis, we will conclude that the

hypothesis is false.

TYPE I AND TYPE II ERROR PROBABILITIES

1. P (Type I error) = α

Type I error is a situation; α is the probability of that situation occurring.

2. P (Type II error) = β

Type II error is a situation; β is the probability of that situation occurring.

3. Power of a test = 1 – β

TEST OF A HYPOTHESIS
Hypothesis-testing procedures rely
on using the information in a
random sample from
the population on interest, n.
If this information is consistent
with the null hypothesis, then we
will conclude that the
hypothesis is true.
If this information is inconsistent
with the null hypothesis, we will
conclude that the
hypothesis is false.
TYPE I AND TYPE II ERROR
PROBABILITIES
1. P (Type I error) = α
Type I error is a situation; α is the
probability of that situation
occurring.

2. P (Type II error) = β
Type II error is a situation; β is the
probability of that situation
occurring.
3. Power of a test = 1 – β

Example 8.1
Mark Smith is convicted of
kidnapping and rape of a girl in the
year 1980. DNA
evidence analyzed in 2014
determined that he could not have
committed the crime.
He was immediately released from
prison.
JURY ANALOGY FOR
HYPOTHESIS TESTING:
H0: Mark Smith is innocent
H1: Mark Smith did it
The 1980 jury rejected H0 when H0
was TRUE.

Example 8.1
Mark Smith is convicted of kidnapping and rape of a girl in the year 1980. DNA evidence analyzed in
2014 determined that he could not have committed the crime. He was immediately released from
prison.

JURY ANALOGY FOR HYPOTHESIS TESTING:

Ho: Mark Smith is innocent

H1: Mark Smith did it


The 1980 jury rejected Ho when Ho was TRUE.

Example 8.2

In 2014, Christian Parker was recorded trying to hire someone to kill a female prosecutor for $200. He
admitted to the crime but went to trial. The jury found him “not guilty”.

JURY ANALOGY FOR HYPOTHESIS TESTING:

Ho : Christian is innocent
H1 : Christian did it

The 2014 jury FAILED TO REJECT H 0 when H 0 was FALSE.

TEST OF STATISTICAL HYPOTHESES

DECISION Ho is true Ho is false


Fail to reject Ho 1- α β
Reject Ho α 1- β

Sometimes the Type I error probability is called the significance level of the test.

α is the probability of incorrectly rejecting a true null hypothesis.

1 – α is the probability of correctly identifying a true null hypothesis.

β is the probability of incorrectly accepting a false null hypothesis.

1 – β is the probability of correctly rejecting a false null hypothesis; 1 – β is called the POWER OF A TEST.

ONE-SIDED AND TWO-SIDED HYPOTHESES

Two-Sided test:

H0:μ=μ0 μ 0 is a numerical value

H1:μ≠μ0

One-Sided tests:

H0:μ=μ0 or H0:μ=μ0

H1:μ<μ0 H1:μ>μ0
In one-sided alternative hypotheses, rejecting H 0 is always a strong conclusion.

Consequently, we should put the statement about which it is important to make a strong
conclusion in the alternative hypothesis.

The p-value is the smallest level of significance, α, that would lead to rejection of the null
hypothesis H 0 with the given data.

The p-value is the observed significance level.

Or in other words,

The p-value is the value of α that would put you right on the edge/borderline/boundary
between Rejecting H 0 and Failing to reject H 0.

CONNECTION BETWEEN HYPOTHESIS TESTS AND CONFIDENCE INTERVALS

A close relationship exists between the test of a hypothesis for on a population parameter and
the confidence interval for on that parameter.

If [L, U] is 100(1-α) % confidence interval for the parameter Θ. And if Θ 0 is not in [ L, U], then we
will reject H 0 in a test of hypothesis for Θ 0

H0:Θ=Θ0

H1:Θ≠Θ0

GENERAL PROCEDURES FOR HYPOTHESIS TESTS:

1. Identify the population parameter of interest

2. Formulate the null hypothesis, Ho

3. Specify an appropriate alternative hypothesis, H1

4. Choose a significance level. Α

5. Determine an appropriate test statistic

6. State the rejection criteria for the statistic

7. Compute necessary values for calculating the test statistic and sketch any

appropriate pdfs.

8. Draw appropriate conclusions.


TEST ON POPULATION MEAN, VARIANCE KNOWN

Hypothesis Tests on the Mean:

Consider the two-sided hypothesis test

H0: μ = μ0

H1: μ ≠ μ0

COMPUTING THE P-VALUE:

1. Clearly state the null and alternative hypotheses H 0 and H 1.

2. Determine the numerical value of the test statistic, z 0.

3. Draw the pdf of Z and mark Z 0.

Two-sided:

H0:μ=μ0
H1:μ≠μ0

If you have a two-sided hypothesis test and test statistic is < 0, the p-value is 2x (area below the
test statistic)

If you have a two-sided hypothesis test and the test statistic is > 0, the p-value is 2x (area above
the test statistic).

One-sided upper:

H0:μ=μ0

H1:μ>μ0

If you have a one-sided upper hypothesis test, the p-value is the area above the test statistic.
The test statistic could be < 0 or > 0.

One-sided lower:

H0:μ=μ0

H1:μ<μ0

If you have a one-sided lower hypothesis test, the p-value is the area below the test statistic.
The Test statistic could be < 0 or > 0.

Example 8.3

Air crew escape systems are powered by a solid propellant. The burning rate of this propellant is an
important product characteristic. Specifications require that the mean burning rate must be 50cm/sec
and the standard deviation is 2m/sec. The significance level is 0 and a random sample n = 25 has a
sample average burning rate of 51. cm/sec. Is there evidence that the mean burn rate is 50cm/sec?

COMPUTING THE P (TYPE II ERROR) = β:

1. Draw the pdf of x using H0. Over this pdf, draw the shifted pdf of x if the true

population mean is μ true.


2. Determine the values of x that cause you to fail to reject H0.

a a
z σ z σ
If H1: μ ≠ μ0, we fail to reject H0 if 2 2
μ0 − < x < μ0 +
√n √n

a
z σ
If H1: μ < μ0, we fail to reject H0 if 2
x > μ0−
√n

a
z σ
If H1: μ > μ0, we fail to reject H0 if 2
x < μ0 +
√n

3. Compute the area under the shifted pdf for the values computed in 2, above.

This area is β.

Example 8.4

Determine the power of the test if the true population mean is 1 inches. Use the data given below.

H 0 : μ = 1 inches 𝝈 = 0 inches α = 0.01

H 1 : μ ≠ 1 inches n = 25 𝑥̅ = 1 inches

COMPUTING THE SAMPLE SIZE FOR A TWO-SIDED TEST:

Sample size for a Two-sided test:

H0: μ = μ0

H1: μ ≠ μ0
For a two-sided alternative hypothesis:
2 2
( za ∕ 2 + zβ ) σ , where δ=μ−μ 0
n= 2
δ
Sample size for a One-sided test:

H0: μ = μ0 H0: μ = μ0

H1: μ > μ0 H1: μ < μ0

For a one-sided alternative


hypothesis:

Zβ is the value on the z-axis such


that the area above it under the Z is
equal to β.

TEST ON POPULATION
MEAN, VARIANCE
KNOWN
For a one-sided alternative hypothesis:
2 2
( za + z β ) σ , where δ=μ−μ 0
n= 2
δ
Zβ is the value on the z-axis such that the area above it under the Z is equal to β.

TEST ON POPULATION MEAN, VARIANCE KNOWN

COMPUTING THE P-VALUE:

1. Clearly state the null and alternative hypotheses H0 and H1.

2. Determine the numerical value of the test statistic, t0.

3. Draw the pdf of T and mark t0.

Two-sided:

H0: μ = μ0

H1: μ ≠ μ0

If you have a two-sided hypothesis test and test statistic is < 0, the p-value is 2x (area

below the test statistic)

If you have a two-sided hypothesis test and the test statistic is > 0, the p-value is 2x (area
above the test statistic).

One-sided upper:

H0: μ = μ0

H1: μ > μ0

If you have a one-sided upper hypothesis test, the p-value is the area above the test

statistic. The test statistic could be < 0 or > 0.

One-sided lower:

H0: μ = μ0

H1: μ < μ0

If you have a one-sided lower hypothesis test, the p-value is the area below the test

statistic. The Test statistic could be < 0 or > 0.

Example 8.5

A random sample of n = 8 Quiz #5 scores were collected from our class: 9, 8, 8, 9, 8, 10,

7, 9. Use hypothesis testing to determine if there is evidence that the population mean

of Quiz #5 is less than 7.5. Use P (Type I error) = 0.01

TEST ON POPULATION VARIANCE/STANDARD DEVIATION


COMPUTING THE P-VALUE:

1. Clearly state the null and alternative hypotheses H0 and H1.

2. Determine the numerical value of the test statistic, χ2.

3. Draw the pdf of χ2 and mark χ20

Two-sided:

H0: 𝛔2 = 𝛔20

H1: 𝛔2 ≠ 𝛔20

If you have a two-sided hypothesis test and test statistic is < 0, the p-value is 2x (area below the
test statistic)

If you have a two-sided hypothesis test and the test statistic is > 0, the p-value is 2x (area

above the test statistic).

One-sided upper:

H0: 𝛔2 = 𝛔20

H1: 𝛔2 > 𝛔20

If you have a one-sided upper hypothesis test, the p-value is the area above the test
statistic. The test statistic could be < 0 or > 0.

One-sided lower:

H0: 𝛔2 = 𝛔20

H1: 𝛔2 < 𝛔20

If you have a one-sided lower hypothesis test, the p-value is the area below the test

statistic. The Test statistic could be < 0 or > 0.

Then, Reject H0 if p-value < α.

COMPUTING THE P-VALUE:


1. Clearly state the null and
alternative hypotheses H0 and H1.
2. Determine the numerical
value of the test statistic, χ2.
3. Draw the pdf of χ2 and mark
χ20
Two-sided: H0: 𝛔2 = 𝛔20
H1: 𝛔2 ≠ 𝛔20
If you have a two-sided
hypothesis test and test statistic is
< 0, the p-value is 2x (area
below the test statistic)
If you have a two-sided
hypothesis test and the test
statistic is > 0, the p-value is 2x
(area
above the test statistic).
One-sided upper: H0: 𝛔2 = 𝛔20
H1: 𝛔2 > 𝛔20

If you have a one-sided upper


hypothesis test, the p-value is the
area above the test
statistic. The test statistic could be
< 0 or > 0.
One-sided lower: H0: 𝛔2 = 𝛔20
H1: 𝛔2 < 𝛔20
If you have a one-sided lower
hypothesis test, the p-value is the
area below the test
statistic. The Test statistic could
be < 0 or > 0.
Then, Reject H0 if p-value < α.

Example 8.6
An automated filling machine is used to fill bottles with liquid detergent. A random
sample of 20 bottles results in a sample standard deviation, S = 0.0153 ounces. If the
variance of fill volume exceeds 0.0003 ounces2, an unacceptable proportion of bottles
will be underfilled or overfilled. Is there evidence in the sample data to suggest that the
manufacturer has a problem with underfilled or overfilled bottles? Use α = 0.01 and
assume that fill volume has a normal distribution. Let the fill volume be the random
variable.
TEST ON POPULATION PROPORTION

It is often necessary to test hypotheses on a population proportion. For example, suppose that a random
sample of size n has been taken from a large (possibly infinite) population and that X (< n) observations
in this sample belong to a class of interest. Then ^P = X/n is a point estimator of the proportion of the
population p that belongs to this class. Note that n and p are the parameters of a binomial distribution.
Furthermore, from Chapter 6 we know that the sampling distribution of ^ P is approximately normal with
mean p and variance p (1- p)/n, if p is not too close to either 0 or 1 and if n is relatively large. Typically,
to apply this approximation we require that np and n (1 - p) be greater than or equal to 5. We will give a
large sample test that makes use of the normal approximation to the binomial distribution.

TEST STATISTIC:

x−n p0
z o=
√ n p ( 1− p )
0 0
Example 8.7
A semiconductor manufacturer produces controllers used in automobile engine applications. The
buyer requires that the process fallout or fraction defective at a critical manufacturing step not
exceed 0.04 and that the manufacturer demonstrate process capability at this level of quality using α
= 0.05. The semiconductor manufacturer takes a random sample of 200 devices and finds that four of
them are defective. Can the manufacturer demonstrate that the fraction defective is less than 0.04?

COMPUTING THE P (TYPE II ERROR) AND CHOICE OF SAMPLE SIZE:

It is possible to obtain closed-form equations for the approximate β-error for the tests. Suppose
that p is the true value of the population proportion. The approximate β-error for the two-sided
alternative H1: p ≠ p0 is:

If the alternative is H1: p<po:


whereas if the alternative is H1: p > p0:

These equations can be solved to


find the approximate sample size n
that gives a test
of level α that has a specified β
risk. The sample size equations
are:
Approximate Sample Size for a
Two-Sided Test on a Binomial
Proportion:

Note: p = ptrue
Approximate Sample Size for a
One-Sided Test on a Binomial
Proportion:

Note: p = ptrue
These equations can be solved to find the approximate sample size n that gives a test

of level α that has a specified β risk. The sample size equations are:

Approximate Sample Size for a Two-Sided Test on a Binomial Proportion:

Note: p = ptrue

Approximate Sample Size for a One-Sided Test on a Binomial Proportion:

Note: p = ptrue

Example 8.8
From the previous example, suppose that its process fallout is really ptrue = 0.03. What is the
probability that the null is failed to be rejected but is false?
Example 8.9
From the previous example, suppose that the semiconductor manufacturer was willing to accept a P
(type II error) as large as 0.10 if the true value of the process fraction defective was ptrue = 0.03. If
the manufacturer continues to use α = 0.05, what sample size would be required?

You might also like