
- •1.1. Introduction
- •1.1.2. Concepts of hypothesis testing
- •1.1.3. The null and alternative hypothesis
- •1.1.4. Tails of the test
- •1.2. Tests of the mean of a normal distribution:
- •1.3. Tests of the mean of a normal distribution:
- •1.4. Hypothesis testing using the p –value approaches
- •1.5. Tests of the mean of a normal distribution:
- •1.6. Tests of the population proportion (Large sample)
- •1.7. Tests of the variance of a normal distribution
- •1.8. Tests for the difference between two population means
- •1.8.1. Tests based on paired samples
- •1.8.2. Tests based on independent samples
- •1.8.3. Tests based on independent samples
- •1.9. Tests for the difference between two population proportions
Chapter 1
Hypothesis testing
1.1. Introduction
Inferential statistics consists of methods that use sample results to help make decisions or predictions about a population. The point and interval estimation procedures are forms of statistical inference. Another type of statistical inference is hypothesis testing. In hypothesis testing we begin by stating a hypothesis about a population characteristic. This hypothesis, called the null hypothesis, is assumed to be true unless sufficient evidence can be found in a sample to reject it. The situation is quite similar to that in a criminal trial. The defendant is assumed to be innocent; if sufficient evidence to the contrary is presented, however, the jury will reject this hypothesis and conclude that the defendant is guilty.
In statistical hypothesis testing, often the null hypothesis is an assumption about the value of a population parameter. A sample is selected from the population, and a point estimate is computed. By comparing the value of the point estimate to the hypothesized value of the parameter we draw a conclusion with respect to whether or not there is a sufficient evidence to reject the null hypothesis. A decision is made and often a specific action is taken depending upon whether or not the null hypothesis about the population parameter is accepted or rejected.
1.1.2. Concepts of hypothesis testing
Let us consider example about coffee cans. A company may claim that, on average, its cans contain 100 grams of coffee. A government agency may want to test whether or not such cans contain, on average, 100 grams of coffee.
Suppose we take a sample of 50 cans of the coffee under investigation. We then find out that the mean amount of coffee in these 50 cans is 97 grams. Based on these results, can we state that on average, all such cans contain less than 100 grams of coffee and that the company is lying to the public?
Not
until we perform a test of hypothesis. The reason is that the mean
grams
is obtained from the sample. The difference between 100 grams (the
required amount for the population) and 97 grams (the observed
average amount for the sample) may have occurred only because of the
sampling error. Another sample of 100 cans may give us a mean of 105
grams. Therefore, we make a test of hypothesis to find out how large
the difference between 100 grams and 97 grams is and to investigate
whether or not this difference has occurred as a result of chance
alone. If 97 grams is the mean of all cans and not for only 100 cans,
then we do not need to make a test of hypothesis. Instead, we can
immediately state that the mean amount of coffee in all such cans is
less than 100 grams. We perform a test of hypothesis only when we are
making a decision about a population parameter based on the value of
a sample statistic.
1.1.3. The null and alternative hypothesis
We
will begin our general discussion by using
to denote a population probability distribution parameter of
interest, such as the mean, variance, or proportion. Our discussion
begins with a hypothesis about the parameter that will be maintained
unless there is strong contrary evidence. In statistical language it
is called the null
hypothesis.
For example, we might initially accept company’s claim that on average, the contests of the cans weight at least 100 grams. Then after
collecting sample data this hypothesis can be tested. If the null hypothesis is not true, then some alternative must be true. In carrying out a hypothesis test the investigator defines an alternative hypothesis against which the null hypothesis is tested.
For
this coffee cans example a likely alternative is that on average
can’s weights are less than 100 grams. These hypotheses are chosen
such that one or the other must be true. The null hypothesis will be
denoted as
and
the alternative hypothesis as
.
Definition: A null hypothesis is a claim (or statement) about a population parameter that is assumed to be true until it is declared false.
Definition: An alternative hypothesis is a claim about population parameter that will be true if the null hypothesis is false.
Our analysis will be designed with the objective of seeking strong evidence to reject the null hypothesis and accept the alternative hypothesis. We will only reject the null hypothesis when there is a small probability that the null hypothesis is true. Thus rejection will provide strong evidence against and in favor of the alternative hypothesis, . If we fail to reject then either is true or our evidence is not sufficient to reject and hence accept . Thus we will be more comfortable with our decision if we reject and accept .
A
hypothesis, whether null or alternative, might specify a single
value, say
,
for the population parameter
.
In that case, the hypothesis is said to be a simple hypothesis
designated as
That is read as, “The null hypothesis is that the population parameter is equal to the specific value ”.
Alternatively, a range of values might be specified for unknown parameter. We define such hypothesis as a composite hypothesis, and it will hold true for more than one value of the population parameter. In many applications, a simple null hypothesis, say
is tested against a composite alternative. One possibility would be to test the null hypothesis against the general two-sided hypothesis
In other cases, only alternatives on one side of the null hypothesis are of interest. For example, a government agency would be perfectly happy if the mean weight of coffee cans greater than 100 grams. Then we could write the null hypothesis as
and the alternative hypothesis of interest might be
We call these hypothesis one- sided composite alternatives.
Example:
A company intends to accept the product unless it has evidence to suspect that more than 10% of products are defective. Let denote the population proportion of defectives. The null hypothesis is that the proportion is less than 0.1, that is
and the alternative hypothesis is
The null hypothesis is that the product is of adequate quality overall, while the alternative is that the product is not adequate quality. In this case the product would only be rejected if there is strong evidence that there are more than 10% defectives.
Once we have specified a null hypothesis and alternative hypothesis and collected sample data, a decision concerning the null hypothesis must be made. We can either accept the null hypothesis or reject it in favor of the alternative. For good reasons many statisticians prefer not to use the term “accept the null hypothesis” and instead say “fail to reject”. When we accept or fail to reject the null hypothesis, then either the hypothesis is true or our test procedure was not strong enough to reject and we have committed an error. When we use the term accept a null hypothesis that statement can be considered shorthand for failure to reject.
From
our discussion of sampling distributions, we know that the sample
mean is different from the population mean. With only a sample mean
we can not be certain of the value of the population mean. Thus the
decision rule we adopt will have some chance of reaching an erroneous
conclusion. One error we call Type I error. Type
I
error is defined as the rejection of the null hypothesis when the
null hypothesis is true. We will see that our decision rules will be
defined so that the probability of rejecting a true null hypothesis,
denoted as
,
is “small”. The probability,
,
is defined as the significance
level
of the test. Since the null hypothesis is either accepted or
rejected, it follows that the probability of accepting the null
hypothesis when it is true is
.
The other possible error, called Type
II error,
arises when false null hypothesis is accepted. We say that for a
particular decision rule, the probability of making such an error
when the null hypothesis is false is denoted
.
Then, the probability of rejecting a false null hypothesis is
which
is called the power of test.
Type I error
A type I error occurs when a true null hypothesis is rejected. The value represents the probability of committing this type of error, that is
The value represents the significance level of the test.
Type II error
A Type II error occurs when a false null hypothesis is not rejected. The value represents the probability of committing a Type II error,
that is
The value is called the power of the test. It represents the probability of not making a Type II error.