Unit 3_hypothesis Testing
Unit 3_hypothesis Testing
Hypothesis is usually considered as the principal instrument in research. The main goal in many
research studies is to check whether the data collected support certain statements or predictions.
A statistical hypothesis is an assertion or conjecture concerning one or more populations. Test
of hypothesis is a process of testing of the significance regarding the parameters of the
population on the basis of sample drawn from it. Thus, it is also termed as “Test of
Significance’.
In short, hypothesis testing enables us to make probability statements about population
parameter. The hypothesis may not be proved absolutely, but in practice it is accepted if it has
withstood a critical testing.
Points to be considered while formulating Hypothesis
H1: µ > µHo (The alternative hypothesis is that the population mean
is greater than 100)
H1: µ < µHo (The alternative hypothesis is that the population mean
is less than 100)
The null hypothesis and the alternative hypothesis are chosen before the sample is
drawn (the researcher must avoid the error of deriving hypotheses from the data that
he/she collects and then testing the hypotheses from the same data). In the choice of
null hypothesis, the following considerations are usually kept in view:
1. Alternative hypothesis is usually the one which one wishes to prove and the null
hypothesis is the one which one wishes to disprove. Thus, a null hypothesis
represents the hypothesis we are trying to reject, and alternative hypothesis
represents all other possibilities.
2. Null hypotheses should always be specific hypothesis i.e., it should not state
about or approximately a certain value.
3. In testing hypothesis, there are two possible outcomes:
• Reject H0 and accept H1 because of sufficient evidence in the sample in
favour of H1;
• Do not reject H0 because of insufficient evidence to support H1.
BASIC CONCEPTS CONCERNING TESTING OF HYPOTHESES
1. The level of significance: This is a very important concept in the context of hypothesis
testing. It is always some percentage (usually 5%) which should be chosen with great
care, thought and reason. In case we take the significance level at 5 per cent, then this
implies that H0 will be rejected when the sampling result (i.e., observed evidence) has
a less than 0.05 probability of occurring if H0 is true. In other words, the 5 per cent level
of significance means that researcher is willing to take as much as a 5 per cent risk of
rejecting the null hypothesis when it (H0) happens to be true. Thus, the significance
level is the maximum value of the probability of rejecting H0 when it is true and is
usually determined in advance before testing the hypothesis.
2. Decision rule or Test of Hypothesis: A decision rule is a procedure that the researcher
uses to decide whether to accept or reject the null hypothesis. The decision rule is a
statement that tells under what circumstances to reject the null hypothesis. The decision
rule is based on specific values of the test statistic (e.g., reject H0 if Calculated value >
table value at the same level of significance)
3. Types of Error: In the context of testing of hypotheses, there are basically two types
of errors we can make.
a. Type 1 error: To reject the null hypothesis when it is true is to make what is
known as a type I error. The level at which a result is declared significant is
known as the type I error rate, often denoted by α.
b. Type II error: If we do not reject the null hypothesis when in fact there is a
difference between the groups, we make what is known as a type II error. The
type II error rate is often denoted as β.
H0 : μ=82
H1 : μ>82
From the z table the critical value at αα = 1.645
As 3.6 > 1.645 thus, the null hypothesis is rejected and it is concluded that there is enough evidence to support the
teacher's claim.
Problem 2 :
An online medicine shop claims that the mean delivery time for medicines is less than 120 minutes with a
standard deviation of 30 minutes. Is there enough evidence to support this claim at a 0.05 significance level if 49
orders were examined with a mean of 100 minutes?
As the sample size is 49 and population standard deviation is known, this is an example of a left-tailed one-sample z
test.
As -4.66 < -1.645 thus, the null hypothesis is rejected and it is concluded that there is enough evidence to support the
medicine shop's claim.
As this is a two-tailed test the alpha level needs to be divided by 2 to get 0.025.
As 2.62 > 1.96 thus, the null hypothesis is rejected and it is concluded that there is a significant difference between the
two lines.
Answer: Reject the null hypothesis
Conclusion:
A hypothesis is an educated guess about something in the world around us. Hypotheses are theoretical
guesses based on limited knowledge; they need to be tested. Thus, hypothesis testing is a decision-
making process for evaluating claims about a population. We use variousstatistical analysis to test
hypotheses and answer research questions. In formal hypothesis testing, we test the null hypothesis
and usually want to reject the null because rejection of the null indirectly supports the alternative
hypothesis to the null, the one we deduce from theory as a tentative explanation. Thus, a hypothesis
test mutually exclusive statements about a population to determine which statement is best supported
by the sample data.
It is used to find out whether there is any significant difference between observed frequencies and
expected frequencies pertaining to any particular phenomenon. Here frequencies are shown in the
different cells (categories) of a so-called contingency table. It is noteworthy that we take the
observations in categorical form or rank order, but not in continuation or normal distribution.
The test is applied to assess how likely the observed frequencies would be assuming the null
hypothesis is true.
This test is also useful in ascertaining the independence of two random variables based on
observations of these variables.
This is a non parametric test which is being extensively used for the following reasons:
1. This test is a Distribution free method, which does not rely on assumptions that the data are
drawn from a given parametric family of probability distributions.
2. This is easier to compute and simple enough to understand as compared to parametric test.
3. This test can be used in the situations where parametric test are not appropriate or
measurements prohibit the use of parametric tests.
It is defined as:
(𝑂−𝐸)2
2 = ∑
𝐸
Where O refers to the observed frequencies and E refers to the expected frequencies.
Uses of Chi-Square Test
Chi Square test has a large number of applications where paremertic tests can not be applied.
Their uses can be summarized as under along with examples:
This test is helpful in detecting the association between two or more attributes. Suppose we
have N observations classified according to two attributes. By applying this test on the given
observations (data) we try to find out whether the attributes have some association or they are
independent. This association may be positive, negative or absence of association. For example
we can find out whether there is any association between regularity in class and division of
passing of the students, similarly we can find out whether quinine is effective in controlling fever
or not. In order to test whether or not the attributes are associated we take the null hypothesis
that there is no association in the attributes under study. In other words, the two attributes are
independent.
After computing the value of chi square, we compare the calculated value with its corresponding
critical value for the given degree of freedom at a certain level of significance. If calculate value
of 2 is less than critical or table value, null hypothesis is said to be accepted and it is
concluded that two attributes have no association that means they are independent. On the
other hand, if the calculated value is greater than the table value, it means that the results of the
experiment do not support the hypothesis and hypothesis is rejected, and it is concluded that
the attributes are associated.
Illustration 1: From the data given in the following table, find out whether there is any
relationship between gender and the preference of colour.
Null Hypothesis 𝐻0: There is no relationship between gender and preference of colour.
Alternative Hypothesis 𝐻𝑎: There is relationship between gender and preference of colour.
We have to first calculate the expected value for the observed frequencies. These are shown
below along with the observed frequencies:
Since the calculated 2 =31.33 exceeds the critical value of 2 , the null hypothesis is rejected.
Hence, the conclusion is that there is a definite relationship between gender and preference of
colour.
It is the most important utility of the Chi Square test. This method is mainly used for testing of
goodness of fit. It attempts to set up whether an observed frequency distribution differs from an
estimated frequency distribution. When an ideal frequency curve whether normal or some other
type is fitted to the data, we are interested in finding out how well this curve fits with the
observed facts.
The following steps are followed for the above said purpose:
iv. On the basis of given actual observations, expected or theoretical frequencies are derivedthrough
probability. This generally takes the form of assuming that a particular probability distribution is
v. The observed frequencies are compared with the expected or theoretical frequencies.
vi. If the calculated value of 2 is less than the table value at a certain level of significance (generally 5%
level) and for certain degrees of freedom the, fit is considered to be good. i.e.. thedivergence between the
actual and expected frequencies is attributed to fluctuations of simple sampling. On the other hand, if the
calculated value of 2 is greater than the table value, the fitis considered to be poor i.e. it cannot be
attributed to the fluctuations of simple sampling rather itis due to the inadequacy of the theory to fit the
observed facts.
Illustration 2:
In an anti malaria campaign in a certain area, quinine was administered to 812 persons out of a
total population of 3248. The number of fever cases is shown below:
Applying 2 test:
(𝐴)𝑋(𝐵)
Expectated frequency of say AB = = 200𝑋 170 = 136
𝑁 250
Or 𝐸1, i.e., expected frequency corresponding to first row and first column is 60.The
O E (O-E)2 (O-E)2 /E
140 136 16 0.118
60 64 16 0.250
30 34 16 0.471
20 16 16 1.000
(𝑂−𝐸)2
∑ = 1.839
𝐸
(𝑂−𝐸)2
2 = ∑ = 1.839
𝐸
The calculated value of 2 i.e. 1.839 is less than the table value i.e. 3.84, the null hypothesis is
accepted. Hence quinine is not useful in checking malaria.
(C) A test of homogeneity
The 2 test of homogeneity is an extension of the 2 test of independence. Such tests indicate
whether two or more independent samples are drawn from the same population or from different
populations. Instead of one sample as we use in the independence problem, we shall now have
two or more samples. Supposes a test is given to students in two different higher secondary
schools. The sample size in both the cases is the same. The question we have to ask: is there any
difference between the two higher secondary schools? In order to find the answer, we have to set
up the null hypothesis that the two samples came from the same population. The word
‘homogeneous’ is used frequently in Statistics to indicate ‘the same’ or ‘equal’. Accordingly, we
can say that we want to test in our example whether the two samples are homogeneous. Thus, the
test is called a test of homogeneity.
Illustration 3: Two hundred bolts were selected at random from the output of each of the five
machines. The number of defective bolts found were 5, 9, 13, 7 and 6 . Is there a significant
difference among the machines? Use 5% level of significance.
As there are five machines, the total number of defective bolts should be equally distributed among
these machines. That is how we can get expected frequencies as under:
Decision: The critical value of 2 at 0.05 level of significance for 4 degrees of freedom is
9.488. As the calculated value of 2 = 5 is less than the critical value, 𝐻𝑂 is accepted. In
other words, the difference among the five machines in respect of defective bolts is not
significant.