You are on page 1of 8

Hypothesis Testing

In statistics, during a statistical survey or a research, a hypothesis has to be set and defined. It is termed as a
statistical hypothesis It is actually an assumption for the population parameter. Though, it is definite that this
hypothesis is always proved to be true. The hypothesis testing refers to the predefined formal procedures that are
used by statisticians whether to accept or reject the hypotheses. Hypothesis testing is defined as the process of
choosing hypotheses for a particular probability distribution, on the basis of observed data.

Hypothesis testing is a core and important topic in statistics. In the research hypothesis testing, a hypothesis is an
optional but important detail of the phenomenon. The null hypothesis is defined as a hypothesis that is aimed to
challenge a researcher. Generally, the null hypothesis represent the current explanation or the vision of a feature
which the researcher is going to test. Hypothesis testing includes the tests that are used to determine the outcomes
that would lead to the rejection of a null hypothesis in order to get a specified level of significance. This helps to
know if the results have enough information, provided that conventional wisdom is being utilized for the
establishment of null hypothesis.

A hypothesis testing is utilized in the reference of a research study. Hypothesis test is used to evaluate and analyze
the results of the research study. Let us learn more about this topic.

What is Hypothesis Testing?


Back to Top

Hypothesis testing is one of the most important concepts in statistics. A statistical hypothesis is an assumption
about a population parameter. This assumption may or may not be true. The methodology employed by the analyst
depends on the nature of the data used and the goals of the analysis. The goal is to either accept or reject the null
hypothesis.
Hypothesis Testing Terms
Back to Top

Given below are some of the terms used in hypothesis testing :

1. Test Statistic

The decision, whether to accept and reject the null hypothesis is made based on this value. The test statistic is a
defined formula based on the distribution t, z, F etc. If the calculated test statistic value is less than the critical value,
we accept the hypothesis, otherwise, we reject the hypothesis.

Hypothesis Testing Formula

z test statistic is used for testing the mean of the large sample. The test statistic is given by

zz = x¯−μσn√x¯−μσn

where, x¯x¯ is the sample mean, μμ is the population mean, σσ is the population standard deviation

and n is the sample size.

2. Level of Significance

The confidence at which a null hypothesis is accepted or rejected is called level of significance. The level of
significance is denoted by αα
3. Critical Value

Critical value is the value that divides the regions into two-Acceptance region and rejection region. If the computed
test statistic falls in the rejection region, we reject the hypothesis. Otherwise, we accept the hypothesis. The critical
value depends upon the level of significance and alternative hypothesis.

4. One Sided or Two Sided Hypothesis

The alternative hypothesis is one sided if the parameter is larger or smaller than the null hypothesis value. It is two
sided when the parameter is different from the null hypothesis value. The null hypothesis is usually tested against
an alternative hypothesis(H1). The alternative hypothesis can take one of three forms:
H1: B1 > 1, is one-sided alternative hypothesis.
H1: B1 < 1, also a one-sided alternative hypothesis.
H1: B1 ≠≠ 1, is two-sided alternative hypothesis. That is, the true value is either greater or less than 1.
5. P - Value

The probability that the statistic takes a value as extreme or more than extreme assuming that the null hypothesis
is true is called P- value. The P-value is the probability of observing a sample statistic as extreme as the test
statistic, assuming the null hypothesis is true. The P value is the probability of seeing the observed difference, or
greater, just by chance if the null hypothesis is true. The larger the P value, the smaller will be the evidence against
the null hypothesis.
Hypothesis Benefits and Process
Back to Top

A hypothesis testing gives the following benefits


They establish the focus and track for a research effort.
Their development helps the researcher shape the purpose of the research movement.
They establish which variables will not be measured in a study and similarly those, which will be measured.
They need the researcher to contain the operational explanation of the variables of interest.
Process of Hypothesis Testing
State the hypotheses of importance
Conclude the suitable test statistic
State the stage of statistical significance
State the decision regulation for rejecting / not rejecting the null hypothesis
Collect the data and complete the needed calculations
Choose to reject / not reject the null hypothesis
Errors in Research Testing:
It is common to make two types of errors while drawing conclusions in research:
Type 1: When we recognize the research hypothesis and the null hypothesis is supposed to be correct.
Type 2: When we refuse the research hypothesis even if the null hypothesis is incorrect.
Purpose of Hypothesis Testing
Back to Top

Hypothesis testing begins with the hypothesis made about the population parameter. Then, collect data from
appropriate sample and obtained information from the sample is used to decide how likely it is that the
hypothesized population parameter is correct. The purpose of hypothesis testing is not to question the computed
value of the sample statistic but to make a judgement about the difference between two samples and a
hypothesized population parameter.
Hypothesis Testing Steps
Back to Top

We illustrate the five steps to hypothesis testing in the context of testing a specified value for a population
proportion. The procedure for hypothesis testing is given below :
Set up a null hypothesis and alternative hypothesis.
Decide about the test criterion to be used.
Calculate the test statistic using the given values from the sample
Find the critical value at the required level of significance and degrees of freedom.
Decide whether to accept or reject the hypothesis. If the calculated test statistic value is less than the critical value,
we accept the hypothesis otherwise we reject the hypothesis.
Different Types of Hypothesis:
There are 5 different types of hypothesis as follows:

1) Simple Hypothesis

If a hypothesis is concerned with the population completely such as functional form and the parameter, it is called
simple hypothesis.

Example:

The hypothesis “Population is normal with mean as 15 and standard deviation as 5" is a simple hypothesis
2) Composite Hypothesis or Multiple Hypothesis

If the hypothesis concerning the population is not explicitly defined based on the parameters, then it is composite
hypothesis or multiple hypothesis.

Example:

The hypothesis “population is normal with mean is 15" is a composite or multiple hypothesis.

3) Parametric Hypothesis

A hypothesis, which specifies only the parameters of the probability density function, is called parametric
hypothesis.

Example:

The hypothesis “Mean of the population is 15" is parametric hypothesis.


4) Non Parametric Hypothesis

If a hypothesis specifies only the form of the density function in the population, it is called a non- parametric
hypothesis.

Example:

The hypothesis "population is normal" is non - parametric.

5) Null and Alternative Hypothesis

A null hypothesis can be defined as a statistical hypothesis, which is stated for acceptance. It is the original
hypothesis. Any other hypothesis other than null hypothesis is called Alternative hypothesis. When null hypothesis
is rejected we accept the alternative hypothesis. Null hypothesis is denoted by H 0 and alternative hypothesis is
denoted by H1.

Example:

When we want to test if the population mean is 30, then null hypothesis is “Population mean is 30'' and alternative
Hypothesis is “Population mean is not 30".
Logic of Hypothesis Testing
Back to Top
The logic of hypothesis testing is similar to the "presumed innocent until proven guilty". In hypothesis testing, we
assume that the null hypothesis is a possible truth until the sample data conclusively demonstrate otherwise. A
hypothesis test is a statistical method that uses sample data to evaluate a hypothesis about a population.

The logic underlying the hypothesis testing procedure as follow:


The hypothesis concerns the value of a population parameter.
Before select a sample, we use the hypothesis to predict the characteristics that the sample should have.
Obtain the random sample from the population.
At last compare the obtained sample data with the prediction made from the hypothesis. Hypothesis is reasonable
if the sample mean is consistent with the prediction otherwise hypothesis is wrong.
Type I Error and Type II Error
Back to Top

The probability of rejecting the null hypothesis, when it is true, is called Type I error whereas the probability of
accepting the null hypothesis is called Type II error. Probability of Type II error is denoted by ββ.

Example:

Suppose a toy manufacturer and its main supplier agreed that the quality of each shipment will meet a particular
benchmark. Our null hypothesis is that the quality is 90%. If we accept the shipment, given the quality is less than
90%, then we have committed Type I error. If we reject the shipment, given the the quality is greater than 90%, we
have committed Type II error.
Power of the Test
Power of a test is defined as the probability that the test will reject the null hypothesis when the alternative
hypothesis is true.
For a fixed level of significance, if we increase the sample size, the probability of Type II error decreases, which in
turn increases the power. So to increase the power, the best method is to increase the sample size.

Only one of the Type I error or the Type II error is possible at a time.
The power of a test is defined as 1 minus the probability of type II error. Power = 1−β1−β.
Hypothesis Testing Procedure
Back to Top

There are five important steps in the process of hypothesis testing: -

Step 1: Identifying the null hypothesis and alternative hypothesis to be tested.

Step 2: Identifying the test criterion to be used

Step 3: Calculating the test criterion based on the values obtained from the sample

Step 4: Finding the critical value with required level of significance and degrees of freedom

Step 5: Concluding whether to accept or reject the null hypothesis.


Multiple Hypothesis Testing
Back to Top

The problem of multiple hypothesis testing arises when there are more than one hypothesis to be tested
simultaneously for statistical significance. Multiple hypothesis testing occurs in a vast variety of field and for a
variety of purposes. Testing of more than one hypothesis is used in many field and for many purposes.

An alternate way of multiple hypothesis testing is multiple decision problem. When considering multiple testing
problems, the concern is with Type 1 errors when hypothesis are true and type 11 errors when they are false. The
evaluation of the procedures is based on criteria involving balance between these errors.
Bayesian Hypothesis Testing
Back to Top

Bayesian involves specifying a hypothesis and collecting evidence that support or does not support the statistical
hypothesis. The amount of evidence can be used to specify the degree of belief in a hypothesis in probabilistic
terms. The probability of supporting hypothesis can become vary high or low. Hypothesis with a high probabilistic
terms are accepted as true, and with low are rejected as false.

Bayesian hypothesis testing works just like any other type of Bayesian inference. Let us consider the case where we
are considering only two hypotheses, H1H1 and H2H2

The probabilities P(H1H1 | x⃗ x→) and P(H2H2 | x⃗ x→ ),

P(H1H1|x⃗ x→) = P(x⃗ |H1)P(H1)P(x⃗ )P(x→|H1)P(H1)P(x→)

P(H2H2|x⃗ x→) = 1 − P(H1H1 | x⃗ x→)

The probability of our data P(x⃗ x→) takes into account the possibility of each hypothesis under consideration to be
true:

P(x⃗ x→) = P(x⃗ x→ | H1H1)P(H1H1) + P(x⃗ x→ | H2H2)P(H2H2)


Level of Significance in Hypothesis Testing
Back to Top

The hypothesis testing follows the following procedure:


Specify the null and alternative hypotheses
Specify a value for αα
Collect the sample data and determine the weight of evidence for rejection the null hypothesis.
This weight is given in the terms of probability, is called the level of significance(p value) of the statistical test. The
level of significance is the probability of obtaining a value of the statistic that is likely or reject H0H0 as the actual
observed value of the test statistic, assuming that null hypothesis is true.

If the level of significance is a small value, then the sample data fail to support null hypothesis and it reject H0H0. If
the level of significance is a large value, then we fail to reject null hypothesis.
Hypothesis Testing Example
Back to Top

Given below are some of the examples on hypothesis testing.


Solved Example
Question: XYL Company, with a very small turnover, is taking feedback on permanent employees. During the
feedback process, it was found that the average age of XYL employees is 20 years. The relevance of the data was
verified by taking a random sample of hundred workers and the common age turns out as 19 years with a standard
deviation of 02 years. Now XYZ should continue to make its claim, or it should make changes?
Solution:
Specify the hypothesis
H0 = 20 (twenty) years
H1 = 20 (twenty) years
State the Significance Level: Since the company would like to maintain its present message to new human
resources, XYZ selects a fairly weak significance level(αα = 0.5). Because this is a two-tailed analysis, half of the
alpha will be assigned to every tail of the allocation. In this condition the important values of Z = +1.96 and -1.96.
Specify the decision rule: If the calculated value of Z geqgeq 1.96 or Z leqleq -1.96, the null hypothesis will be
rejected.

The Five Steps in Hypothesis Testing


There are five steps in hypothesis testing:
Making assumptions
Stating the research and null hypotheses and selecting (setting) alpha
Selecting the sampling distribution and specifying the test statistic
Computing the test statistic
Making a decision and interpreting the results
If you learn these five basic steps, it will help you greatly in hypothesis testing. It gives you a procedure to follow,
regardless of the particular problem you are working with.
Now let's go through the five steps for our gas prices example. We have already done each of these steps, but now we are
doing them more explicitly in terms of the stages.

Making Assumptions
In hypothesis testing we make assumptions about the level of measurement of the variable, the sampling method, the
shape of the population distribution, and the sample size. In our example, we made these assumptions:
We used a random sample.
Our variable, price, is at the interval-ratio level of measurement.
N > 50, so we need not assume a normal population.

Stating the Research and Null Hypotheses and Selecting


Alpha
The substantive hypothesis or research hypothesis (H1) states the relationship in which we are really interested. We
always state research hypotheses in terms of population parameters because we want to use sample statistics to estimate
population parameters. Our research hypothesis was:
H1: µY > $2.86
The null hypothesis (H0) always contradicts the research hypothesis, usually stating that there is no difference between
the population mean and some specified value. Our null hypothesis was:
H0: µY = $2.86
We set alpha at .05, meaning that we would reject the null hypothesis if the probability of the obtained Z was less than or
equal to .05 (P<.05).

Selecting the Sampling Distribution and Specifying the


Test Statistic
In this example, we used the normal distribution and the Z statistic as the test statistic. This will not always be the case,
but you would still follow these steps even if you are using a different distribution and test statistic.

Computing the Test Statistic


We used Formula 9.1 on page 261 to compute the test statistic.

Making a Decision and Interpreting the Results


Because our research hypothesis indicates that the mean (the population parameter) is less than a specified value, we
expect the obtained Z value to be on the right tail of the distribution. This is the case. Our obtained Z value of 14.70 is
greater than the .05 alpha level that we set. Therefore, we can reject the null hypothesis of no difference between the
mean price of gasoline in California and nationally. This supports our research hypothesis, so we conclude that California
gas prices are, on average, significantly higher than the mean prices paid by all Americans. The result is statistically
significant at the .05 level or we can say that the level of significance is less than .0001.

What is Hypothesis Testing?


A statistical hypothesis is an assumption about a population parameter. This assumption may or may not be
true. Hypothesis testing refers to the formal procedures used by statisticians to accept or reject statistical
hypotheses.
Statistical Hypotheses
The best way to determine whether a statistical hypothesis is true would be to examine the entire population. Since
that is often impractical, researchers typically examine a random sample from the population. If sample data are
not consistent with the statistical hypothesis, the hypothesis is rejected.
There are two types of statistical hypotheses.
Null hypothesis. The null hypothesis, denoted by H0, is usually the hypothesis that sample
observations result purely from chance.
Alternative hypothesis. The alternative hypothesis, denoted by H1 or Ha, is the hypothesis
that sample observations are influenced by some non-random cause.
For example, suppose we wanted to determine whether a coin was fair and balanced. A null hypothesis might be
that half the flips would result in Heads and half, in Tails. The alternative hypothesis might be that the number of
Heads and Tails would be very different. Symbolically, these hypotheses would be expressed as
H0: P = 0.5
Ha: P ≠ 0.5
Suppose we flipped the coin 50 times, resulting in 40 Heads and 10 Tails. Given this result, we would be inclined to
reject the null hypothesis. We would conclude, based on the evidence, that the coin was probably not fair and
balanced.
Can We Accept the Null Hypothesis?
Some researchers say that a hypothesis test can have one of two outcomes: you accept the
null hypothesis or you reject the null hypothesis. Many statisticians, however, take issue
with the notion of "accepting the null hypothesis." Instead, they say: you reject the null
hypothesis or you fail to reject the null hypothesis.
Why the distinction between "acceptance" and "failure to reject?" Acceptance implies that
the null hypothesis is true. Failure to reject implies that the data are not sufficiently
persuasive for us to prefer the alternative hypothesis over the null hypothesis.

Hypothesis Tests
Statisticians follow a formal process to determine whether to reject a null hypothesis, based on sample data. This
process, called hypothesis testing, consists of four steps.
State the hypotheses. This involves stating the null and alternative hypotheses. The
hypotheses are stated in such a way that they are mutually exclusive. That is, if one is true,
the other must be false.
Formulate an analysis plan. The analysis plan describes how to use sample data to evaluate
the null hypothesis. The evaluation often focuses around a single test statistic.
Analyze sample data. Find the value of the test statistic (mean score, proportion, t statistic,
z-score, etc.) described in the analysis plan.
Interpret results. Apply the decision rule described in the analysis plan. If the value of the
test statistic is unlikely, based on the null hypothesis, reject the null hypothesis.
Decision Errors
Two types of errors can result from a hypothesis test.
Type I error. A Type I error occurs when the researcher rejects a null hypothesis when it is
true. The probability of committing a Type I error is called the significance level. This
probability is also called alpha, and is often denoted by α.
Type II error. A Type II error occurs when the researcher fails to reject a null hypothesis
that is false. The probability of committing a Type II error is called Beta, and is often
denoted by β. The probability of not committing a Type II error is called the Power of the
test.
Decision Rules
The analysis plan includes decision rules for rejecting the null hypothesis. In practice, statisticians describe these
decision rules in two ways - with reference to a P-value or with reference to a region of acceptance.
P-value. The strength of evidence in support of a null hypothesis is measured by the P-
value. Suppose the test statistic is equal to S. The P-value is the probability of observing a
test statistic as extreme as S, assuming the null hypotheis is true. If the P-value is less than
the significance level, we reject the null hypothesis.
Region of acceptance. The region of acceptance is a range of values. If the test statistic
falls within the region of acceptance, the null hypothesis is not rejected. The region of
acceptance is defined so that the chance of making a Type I error is equal to the significance
level.
The set of values outside the region of acceptance is called the region of rejection. If the
test statistic falls within the region of rejection, the null hypothesis is rejected. In such
cases, we say that the hypothesis has been rejected at the α level of significance.
These approaches are equivalent. Some statistics texts use the P-value approach; others use the region of
acceptance approach. In subsequent lessons, this tutorial will present examples that illustrate each approach.
One-Tailed and Two-Tailed Tests
A test of a statistical hypothesis, where the region of rejection is on only one side of the sampling distribution, is
called a one-tailed test. For example, suppose the null hypothesis states that the mean is less than or equal to 10.
The alternative hypothesis would be that the mean is greater than 10. The region of rejection would consist of a
range of numbers located on the right side of sampling distribution; that is, a set of numbers greater than 10.
A test of a statistical hypothesis, where the region of rejection is on both sides of the sampling distribution, is called
a two-tailed test. For example, suppose the null hypothesis states that the mean is equal to 10. The alternative
hypothesis would be that the mean is less than 10 or greater than 10. The region of rejection would consist of a
range of numbers located on both sides of sampling distribution; that is, the region of rejection would consist partly
of numbers that were less than 10 and partly of numbers that were greater than 10.

You might also like