Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Hypothesis testing for a single population

In the theory of estimation, we use a sample statistic to estimate the value of an unknown population
parameter. For example, we use sample mean,x̅ , to estimate the population mean, µ. In hypothesis
testing, we use a sample statistic to test an assumption that we have made about the population from
which that sample came from. For example, suppose that the quality-control manager at a lightbulb
factory claims that the mean life of lightbulbs made at the factory is equal to 375 hours. This is an
assumption about the entire population of bulbs made at the factory. A random sample of size n
can be selected from the population and used to reach a conclusion about the mean life of lightbulbs
made at the factory.
Hypothesis testing begins with an assumption that we make about a population parameter. Then we
collect sample data, compute relevant statistics, and use this information to decide how likely it is
that our hypothesized population parameter is correct.

Meaning of a hypothesis
A hypothesis is a claim, or an assertion about a specific population parameter such as mean,
proportion, or standard deviation. It is a statement or assumption about a population parameter
which may or may not be true. For example, the average monthly salary of front office staff in the
hospitality industry in Kenya is Ksh.60,000.
A hypothesis statement can be used only with a population parameter, not a sample statistic. There
is no need to perform a hypothesis test to make a statement about a sample statistic because we can
calculate the sample statistic. The purpose of hypothesis statement is to draw a conclusion about
the population parameter for which we do not have complete knowledge.

Meaning of hypothesis testing


Hypothesis testing is also called test of hypothesis or test of significance. Hypothesis testing entails
making an assumption about the value of a population parameter and then using sample data to
either confirm or disprove the assumption. Hypothesis testing enables us to make inferences about
a population parameter by analyzing differences between the results observed (the sample statistic)
and the results you would expect to get if some underlying hypothesis is actually true.

Null and Alternative hypothesis


There are two types of hypothesis: null hypothesis and alternative hypothesis. They are constructed
so that if one is correct the other one is incorrect. Every hypothesis test has both a null hypothesis
denoted by Ho, and an alternative hypothesis denoted by H1.

The null hypothesis is the statement about the population parameter that will be assumed to be true
during the conduct of the hypothesis test. The null hypothesis will be rejected only when there is
sufficient evidence from the sample data that the null hypothesis is false. If the null hypothesis is
considered false, then something else must be true.

Alternative hypothesis is the hypothesis that must be true if the null hypothesis is false. The
alternative hypothesis is the opposite of null hypothesis. It is a statement that is accepted if the
sample data provide sufficient evidence that the null hypothesis is false. It describes what you will
conclude if you reject the null hypothesis.

The null hypothesis asserts that there is no real difference between the sample statistic and the
population parameter and if there is any difference it is due to the sampling error. The null
hypothesis, represents the current belief in a situation. An alternative hypothesis is constructed so
that the rejection of null hypothesis means the acceptance of the alternative hypothesis. Any
overlapping in the values of the two hypotheses should be avoided.

Page 1 of 7
THE LOGIC BEHIND HYPOTHESIS TESTING
When we select a sample from a population, the sample statistic is usually numerically different
from the hypothesized population parameter. We must decide whether the difference is a true
difference, that is, a significant difference, or whether the difference is due to chance (sampling).

When the decision is made to accept the null hypothesis as probably being true, it is assumed that
the difference between the value of the sample statistic and the population parameter is explained
by the chance variation inherent in sampling.

If the decision is made to reject the null hypothesis as probably being untrue, it is assumed that the
difference between the sample statistic and the population parameter is not explained by the
inherent sampling variation; in other words, the difference between the sample statistic and the
population parameter is significant.

For instance, we might be faced with the hypothesis that the mean monthly commission of
salespeople in the insurance industry in Kenya is Ksh.80,000. We cannot contact all the salespeople
in the industry to ascertain that the mean is Ksh.80,000. To test the validity of the assumption, we
must select a sample from the population of all salespeople in the industry, calculate sample
statistics, and based on certain decision rules, accept or reject the hypothesis. A sample mean of
Sh.30,000 would certainly cause rejection of the hypothesis. However, a sample mean of
Ksh.78,000 requires us to establish whether the difference of Sh.2000 is statistically significant or
whether we can attribute it to chance.

When samples of a specific size are selected from a population, the means of these samples will
vary about the population mean as reflected on the sampling distribution of the sample mean. So,
even if the null hypothesis is true, the mean salary of a sample of salespeople will not, in most cases,
be exactly equal to the population mean of Ksh.80,000. There are two possibilities: Either the null
hypothesis is true, and the difference between the sample mean and the population mean is due to
chance; or the null hypothesis is false, and the sample came from a population whose mean is not
Ksh.80,000, but is some other value.

The farther away the sample mean is from the hypothesized population mean, the more evidence
there would be for rejecting the null hypothesis. The probability that the sample came from a
population whose mean is Sh.80,000 decreases as the distance between the hypothesized population
mean and the sample mean increases. The smaller the difference, the greater the likelihood that our
hypothesized value for the mean is correct.

Stating the hypothesis


The null hypothesis, denoted by Ho, represents the current or reported state of affairs (i.e represents
the status quo). It involves stating the belief that the population parameter is less than or equal to
(≤), equal to (=), or greater than or equal to (≥) a specific value. It will always contain the equal
sign. The equal sign will never appear in the alternative hypothesis. This is because the null
hypothesis is the statement being tested, and we need a specific value to include in our calculations.
The null hypothesis is believed to be true unless there is overwhelming evidence to the contrary.

The alternative hypothesis, denoted by H1, represents the opposite of the null hypothesis and is
believed to be true if the null hypothesis is found to be false. The alternative hypothesis always
states that the population parameter is greater than (>), less than (<) or not equal to () a specific
value. The alternative hypothesis, is the opposite of the null hypothesis and represents a research
claim or specific inference you would like to prove. The alternative hypothesis represents the
conclusion reached by rejecting the null hypothesis.

Page 2 of 7
The way the null hypothesis is framed depend on the purpose of the test. The purpose of the test
may be to determine if the population mean is equal to a specific value, whether it is greater than
or equal to a specific value, or if it is less than or equal to a specific value. the alternative hypothesis
reflects the opposite condition.
Illustrations
Identify the null and alternative hypotheses for each of the following scenarios.
1. A researcher reports that the average salary of front office staff in the hospitality industry in
Kenya is Ksh.60,000.
2. A researcher reports that the average salary of front office staff in the hospitality industry in
Kenya is more than Ksh.60,000.
3. A researcher reports that the average salary of front office staff in the hospitality industry in
Kenya is greater than or equal to Ksh.60,000.
4. A production manager hypothesizes that the mean number of defects can be decreased in a
production process of screws by using a new type of material. The mean number of defective
screws per production run is 20.
5. The quality-control manager at a lightbulb factory needs to determine whether the mean life of
the lightbulbs is equal to the specified value of 400 hours. It is known that the population
standard deviation is 100 hours. A random sample of 64 lightbulbs indicates a sample mean
life of 375 hours.
6. As a result of complaints from both students and faculty about lateness, the registrar at a large
university wants to adjust the scheduled class times to allow for adequate travel time between
classes and is ready to undertake a study. Until now, the registrar has believed that 20 minutes
between scheduled classes should be sufficient.
7. The manager of a paint supply store wants to determine whether the amount of paint contained
in 1-gallon cans purchased from a nationally known manufacturer actually averages1gallon. It
is known from the manufacturer’s specification that the standard deviation of the amount of
paint is 0.02 gallon. A random sample of 1-gallon cans is selected, and the sample mean is
0.995 gallons.
8. The government would like to determine the effectiveness of a recent tax-break program for
the first-time home buyers. Prior to the tax break, the average time period a house was on the
market was 60 days. The government would like to test the claim that the current average time
on the market is less than 60 days.
Hypothesis testing and Sampling distribution of a statistic
The logic of hypothesis testing involves determining how likely the null hypothesis is to be true by
considering the data obtained from a sample. The sample statistic is expected to be close to the
hypothesized value of the population parameter if the null hypothesis is true. On the other hand,
the null hypothesis is false if there is a large difference between the value of the statistic and the
hypothesized value of the population parameter.

The difference between the hypothesized population parameter and the sample statistic is evaluated
using the sampling distribution for the sample statistic of interest. (e.g. the sample mean): Because
the sampling distribution for the test statistic often follows a well-known statistical distribution,
such as the normal distribution or t-distribution, we can use these distributions to help determine
whether the null hypothesis is true.
The sampling distribution of the sample statistic is divided into 2 regions, a region of rejection
called the critical region and a region of non-rejection called the acceptance region.
The rejection or critical or non-acceptance region is the range of values of the test statistic that
indicates that there is a significant difference between the population parameter and the sample
statistic and that the null hypothesis should be rejected. The non-rejection or non-critical or
acceptance region is the range of values of the test statistic that indicates that the difference between
the population parameter and the sample statistic was probably due to chance and that the null
hypothesis should not be rejected.

Page 3 of 7
To make a decision concerning the null hypothesis, you first determine the critical value(s) of the
test statistic. The critical value(s) divides the sampling distribution into non-rejection region and
the rejection region. The particular test statistic is computed from sample data.
Significance level and critical values of the test statistic
The purpose of hypothesis testing is to make a judgement about the difference between a sample
statistic and a hypothesized population parameter. We use a known probability distribution to
compare the null hypothesis with a sample statistic
Significance level is the probability of rejecting a null hypothesis when it is in fact true. A
significance level is used to determine the critical value of a test statistic from a table for the
appropriate test e.g from a normal distribution table. A critical value separates the critical region
from the non-critical region.
Two tailed and one tailed test
A two tailed test of a hypothesis will reject the null hypothesis if the sample mean is significantly
higher than or lower than the hypothesized population mean. Thus, in a two tailed test, there are 2
rejection regions. A two tailed test is appropriate when the null hypothesis is 𝜇 = 𝜇𝐻𝑜 (𝜇𝐻𝑜 being
some specified value) and alternative hypothesis is µ  𝜇𝐻𝑜 . 𝜇𝐻𝑜 is the hypothesized mean. If the
sampling distribution follows a normal distribution 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 𝑣𝑎𝑙𝑢𝑒𝑠 𝑜𝑓 𝑡ℎ𝑒 𝑡𝑒𝑠𝑡 𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 𝑎𝑟𝑒
−𝑍𝛼 and 𝑍𝛼
2 2

Reject Ho

/2 Accept H0 /2 Reject Ho

𝑍𝛼/2 µHo 𝑍𝛼/2

A one tailed test is either a right tailed test or a left tailed test. A left tailed test is used if the
hypotheses are Ho: 𝜇 ≥ 𝜇𝐻𝑜 and H1: µ < 𝜇𝐻𝑜 . The critical value of the test statistic is -Z. A left
tailed test is shown graphically as follows:

Reject Ho
Accept Ho

-Z µHo
A right tailed test is used if the hypotheses are Ho: 𝜇 ≤ 𝜇𝐻𝑜 and H1: µ > 𝜇𝐻𝑜 . The critical value
of the test statistic is Z. A right tailed test is shown graphically as follows:

Reject Ho

Accept Ho

µHo Z
Page 4 of 7
Interpretation of a 5% level of significance for a two tailed normal test.
 = 5% = 0.05
1 -  = 1 – 0.05 = 0.95

Reject Ho
0.95
/2 /2=0.025

𝑍𝛼/2 = −1.96 µHo 𝑍𝛼/2 = −1.96

𝜇𝐻𝑜 is the hypothesized mean. −𝑍𝛼 and 𝑍𝛼 𝑎𝑟𝑒 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 𝑣𝑎𝑙𝑢𝑒𝑠 𝑜𝑓 𝑡ℎ𝑒 𝑡𝑒𝑠𝑡 𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐.
2 2
Within the acceptance region, there is no significant difference between the observed value of the
sample statistic and the hypothesized value of the population parameter. Thus, the unshaded area
is the area where we accept the null hypothesis. We accept the null hypothesis if the sample statistic
falls in the unshaded region. In the shaded region, representing a total of 5% of the area under the
normal curve, a significant difference exists between the sample statistic and the hypothesized value
of the population parameter. We would reject the null hypothesis if the sample statistic lies in the
shaded regions.
There are three methods used to test hypothesis:
1. The Critical Value Approach
2. The P-value method
3. The confidence interval method.
The Critical Value Approach
The researcher decides what level of significance to use. After a significance level is chosen, a
critical value is selected from a standard table for the appropriate test. If Z test is used, the Z table
is consulted to find the critical value. The critical value determines the acceptance and rejection
region. There are two specific statistical tests used for hypothesis concerning means: The Z test
and the t test.
Hypothesis Testing Using the p-Value Approach
The p-value is the probability of getting a test statistic equal to or more extreme than the sample
result, given that the null hypothesis, is true. The p-value is also known as the observed level of
significance. The decision rules for rejecting in the p-value approach are:

- If the p-value is greater than or equal  to do not reject the null hypothesis.
- If the p-value is less than  reject the null hypothesis
Deciding which distribution to use in hypothesis tests for mean
We have a choice between the normal distribution and the t distribution. The table below shows the
conditions for using the normal and t distributions in testing hypotheses about means.

When the population When the population standard


standard deviation is known deviation is not known
1. Sample size, n, is larger Normal distribution, Z table Normal distribution, Z table
than 30
2. Sample size n is 30 or Normal distribution, Z table t distribution, t table
less and the population is
normal or approximately
normal

Page 5 of 7
3. Sample size n is 30 or t distribution, t table Use non-parametric tests
less and the population is
not normal

Hypothesis testing for the population mean when  is known


Hypothesis testing procedure
1. Specify the population parameter of interest e.g. mean = .
2. Formulate the null and alternative hypothesis.
3. Specify the desired significance level (). This is the probability of rejecting the null hypothesis
when it is actually true.
4. Determine the appropriate critical value. If the population standard deviation is known, the
appropriate critical value is the Z score. The critical Z score identifies the rejection and
acceptance region.
5. Compute the test statistic. The test statistic represents the number of standard deviations
between the sample mean and the population mean. It is found using the formula
𝑋̅−𝜇
Z =
𝜎/√𝑛
6. Compare the Z test statistic with the critical Z score and decide whether to accept or reject the
null hypothesis. If the test statistic falls into the region of non-rejection, you do not reject the
null hypothesis. If the test statistic falls into the rejection region, you reject the null hypothesis.
A critical value is the boundary between the rejection region and the acceptance region. It
depends on the chosen level of significance and is obtained from statistical tables.
There are two specific statistical tests used for hypothesis concerning means. The Z test and the t
test. The Z test (normal test) is used to test a sample mean against a population mean when the
population variance is known. The t-test is used to test a sample mean against a mean when the
population standard deviation is unknown.
Example 1
A daily newspaper article reported that internet users in a certain city spent an average of 55 seconds
looking at a web page. Suppose a sample of 60 internet users spent an average of 47.3 seconds
looking at a web page. Assume that the standard deviation for this population is estimated to be 32
seconds based on previous research. Conduct a hypothesis test at 5% level of significance.
Example 2
A company that produces energy saving light bulbs claims that a new bulb it has developed has an
average lifetime that exceeds the current industry average of 8000 hours. Suppose the average life
of a random sample of 36 of the new bulbs is 8,120 hours. Assume that the population standard
deviation for the life of energy saving light bulb is 500 hours. Conduct a hypothesis test at 5%
significance level.
Example 3
A Grocery store claims that customers spend an average of less than 5 minutes waiting for service
at the stores counter. A random sample of 45 customers was timed at the counter, and the average
service time was found to be 4.5 minutes. Assume the standard deviation is 1.7 minutes per
customer. Using  = 5%, determine whether the sample provide enough evidence to support the
claim made by the Grocery’s management.

Page 6 of 7
Hypothesis testing for the population mean when  is unknown
Illustration
The number of hours of television that 12 people watch during a week are as follows:
3.3, 1.3, 2.8, 4.6, 5.5, 3.4
5.0, 5.1, 3.1, 4.5, 6.0, 5.8

 Test the claim that the average person watches 5 hours of television per week at 5% level
of significance.
 Test the claim that the average person watches less than 5 hours of television per week at
5% level of significance.
 Test the claim that the average person watches more than 5 hours of television per week at
5% level of significance.
Type 1 and Type II Error
A type 1 error occurs if one rejects the null hypothesis when it is true. The probability of type 1
error (which is also the significance level of the test) is symbolized  (alpha). A type II error occurs
if one accepts (does not reject) the null hypothesis when it is false. Its probability is symbolized
(Beta).
There is a trade-off between these two errors. The probability of making one type of error can be
reduced only if we are willing to increase the probability of making the other type of error. In order
to get a low , we will have to put up with a higher . To deal with this trade-off decision makers
decide the appropriate level of significance by examining the costs or penalties attached to both
types of errors.
Ho is true Ho is false
Reject Ho Type 1 error Correct decision
Accept Ho Correct decision Type II error

Hypothesis Testing for the Proportion of a population

ILLUSTRATION
In January 2011, the French government passed a legislation requiring that at least 40% of corporate
board members of large companies to be female within six years. A survey performed by corporate
women Directors International in 2013 found that 25% of corporate board members in large French
companies were women. Suppose the French government would like to test the hypothesis that the
proportion of female board members is currently more than the reported 25% in 2013 due to the
current legislation. Out of a random sample of 240 French board members, 73 were found to be
women. Test the hypothesis with  = 0.05.
Procedure
1. Identify the null and alternative hypotheses.
2. Set a value for the significance level.
3. Determine the appropriate critical value, Z.
4. Calculate the appropriate test statistic.
𝑥
𝑃=
𝑛
𝑃̅− 𝑃𝐻𝑜
𝑍𝑃 = 𝑃𝐻𝑜 (1−𝑃𝐻𝑜)

𝑛
5. Compare the Z-test statistic (Zp) with the critical Z-score (Z).
6. State your conclusions.

Page 7 of 7

You might also like