You are on page 1of 29

Testing of Hypothesis

Definition:

Testing of hypothesis is a procedure which enable us to decide whether to

accept or reject a particular statement or assumption about the population

parameter (s) on the basis of information obtained from sample data.

- Hypothesis: Hypothesis is a
Types of Hypotheses: statement or assumption
-
1. Null Hypothesis about the population
-
parameter under the
2. Alternative Hypothesis - assumption that it is true.
3. Simple Hypothesis
-
-
4. Composite Hypothesis
-
Null Hypothesis and Alternative Hypotheses
Types
A hypothesis which is to be ofpossible
tested for Hypotheses
rejection under the assumption
that is true is called, null hypothesis. On the other hand, if the null
hypothesis is rejected we consider another hypothesis which is called
alternative hypothesis. The null and alternative hypotheses are denoted
by H0 and H1 respectively. For example:

H0: There is no significant difference between the sale/production of

company A and B (µ1-µ2 = 0)

H1: There exist a significant difference between the sale/production of

company A and B (µ1-µ2 Dr.0)


Yousaf Hayat 2
Mean Comparison: Testing of
Mean comparison of two different populations (i.e. two different companies
Hypothesis
in terms of sale/production/saving/profit etc) can be done by using:
1. Two sample t-test (t-test for independent samples)
2. Paired t-test (t-test for dependent samples)

For example:
Comparison of mean production of two different companies. In this case both
the samples taken from company A and company B will be independent.
Comparison of daily mean production of company A in year-1 and year-2.
OR: Comparison of daily mean production of company A before and
after using new technology.
OR: Mean comparison before and after taking loan (credit).

Dr. Yousaf Hayat 3


Mean Comparison: Testing of
Some Basic Definitions:
Hypothesis
1. Significance level

2. Test statistic

3. Critical region and critical values

4. One tailed and two-tailed tests

5. Type-I and Type-II errors

Dr. Yousaf Hayat 4


Main Steps in Testing of Hypotheses
 Stepsthe
State/formulate Involved in Testing
null and alternative of
hypotheses Hypothesis
 Choose the level of significance, generally, 1%, 5% and 10% levels of
significance are used in literature
 Choose the test statistic to be used i.e. Z-test, t-test, F-test etc.
 Compute the value of test statistic from the sample data and available
information given under the null hypothesis, the value so obtain is called
“calculated value”.
 Define the critical value of the test statistic, called tabulated value; OR calculate
the P-value of the test statistic
 Compare the calculated and tabulated values of the test statistic. Reject the null
hypothesis if calculated value of the test statistic is greater than the tabulated
value
 Make the decision and conclude the results.
Dr. Yousaf Hayat 5
COMPARISON OF TWO
Steps Involved in Testing MEANS
of Hypothesis

 The t-test for independent samples

 Populations variances are identical

 Population variances are not identical

 Paired t-test (dependent samples)

Dr. Yousaf Hayat 6


The t-test for Independent Samples (populations have
identical variances)

In order to test the hypothesis that there is no significant difference between


the means of two populations, the following test statistic is applied:

Dr. Yousaf Hayat 7


Independent Samples (populations variances are unequal )

In order to test the hypothesis that there is no significant difference between


the means of two populations, the following test statistic is applied:

X1  X 2 Which under the null hypothesis has t-


t 
s12 s22 distribution with  degrees of freedom,

n1 n2 where:

[( s12 / n1 )  ( s22 / n2 )]2


  2
( s1 / n1 ) 2 ( s22 / n2 ) 2

n1  1 n2  1
where, s12 and s22 are the variances of
sample-1 and sample-2 respectively.

Dr. Yousaf Hayat 8


The t-test for dependent samples (Paired t-test)

The following hypothesis is considred


H 0 : 1  2  0 or H 0 : d  0 VS
H1: 1  2  0 or H1: d  0
To test the above hypothesis, the following t-test is used:
d  d
t , which follow a t-distribution with (n-1) degrees of freedom
sd / n

where, d 
 d
is the mean of "d" values and
n
d  X B  X A OR d  X A  X B ; sd is the standard
deviation of all "d" values and is computed as:

sd 
 (d  d ) 2

n 1

Dr. Yousaf Hayat 9


Example 1: Data showing the Monthly Profit in (0000) of Rs of two companies

Company-A 12 13 14 13.5 10 11 12.5 13.8 15 11.6 15 16


Company-B 13 14 11 10 9 8 9.4 11.5 8 7 9 8.5
H 0 : 1  2  0 (On the average, the monthly profit of both the companies is same)
VS
H1: 1  2  0 (On the average, the monthly profit of both the companies is not same)

Reject the null hypothesis of equal means and conclude the average profit
of both the companies differ significantly.
Dr. Yousaf Hayat 10
Some Questions Regarding Example 1:

1. Write the hypothesis (both null and alternative) that there is no significant

difference between average profit of two companies.

2. Write about the significance of test at 5% level of significance and what

does it indicate?

3. Which test is applied and why?

4. Interpret the result of Levene’s F-test and what will be your hypothesis in

this case

5. Write 95% confidence interval for the difference between means (profit)

of the two companies.

6. Why the value of t-statistic for equal variances is considered?

Dr. Yousaf Hayat 11


Example 2: Monthly Profit, Production and Sales of Company-A and B during
one year (12 months data)

Company-A Company-B
Profit Production Sale Profit Production Sale
12 120 110 13 112 100
13 140 132 14 132 122
14 150 145 11 145 132
13.5 140 123 10 120 100
10 103 90 9 100 70
11 115 100 8 90 80
12.5 123 122 9.4 95 70
13.8 140 135 11.5 115 100
15 160 145 8 90 70
11.6 120 115 7 75 72
15 162 150 9 95 90
16 165 145 8.5 90 88

Dr. Yousaf Hayat 12


SPSS out put

Dr. Yousaf Hayat 13


Results Presentation

Table 1: Average comparison of Company-A and B for the year-XXXXX

Company-A Company-B

t-ratio P-value
Variable Mean SE Mean SE

Profit 13.12 0.514 9.87 0.613 4.060** 0.001

Production 136.5 5.868 104.92 5.841 3.815** 0.001

Sale 126 5.607 91.17 5.967 4.254** 0.000


SE = Standard Error of Mean; ** indicates significant at 1% level of probability

Dr. Yousaf Hayat 14


Company A Company B

160
140
120
100
Mean value

80
60
40
20
0
Profit Production Sale

Dr. Yousaf Hayat 15


Example 3: Monthly Profit, Production and Sales of Company-A before and after
adopting a new technology (12 months data)
Before New technology After new technology

Profit Production Sale Profit Production Sale


12 120 110 17 125 115
13 140 132 20 145 140
14 150 145 18 179 160
13.5 140 123 16 158 150
10 103 90 12 110 105
11 115 100 14 134 125
12.5 123 122 13 135 124
13.8 140 135 15 150 145
15 160 145 17 170 160
11.6 120 115 13 145 142
15 162 150 17 170 165
16 165 145 20 170 163
Dr. Yousaf Hayat 16
Dr. Yousaf Hayat 17
Some Questions Regarding Example 3:

1. Write the null and alternative hypotheses for such a problem.

2. Which test is applied for comparison and why?

3. Write 95% confidence interval for the difference between means (profit,

production and sale).

4. Is there any impact on the profit, sale and production of adopting the new

technology, how, discuss it.

5. What does the p-value (sig.) indicate and how you will utilize this value

in results interpretation.

Dr. Yousaf Hayat 18


Results Presentation

Average comparison of different items of the company before and after


adopting a new technology

Before New Tech. After New Tech.

t-ratio P-value
Variable Mean SE Mean SE

Profit 13.12 0.514 16 0.769 -5.436** 0.000

Production 136.50 5.868 149.25 6.064 -5.413** 0.000

Sale 126.00 5.607 141.17 5.771 -6.407** 0.000


SE = Standard Error of Mean; ** indicates significant at 1% level of probability

Dr. Yousaf Hayat 19


Company A Company B

160

140

120

100
Mean value

80

60

40

20

0
Profit Production Sale

Dr. Yousaf Hayat 20


COMPARISON
Steps InvolvedOF MORE
in Testing of THAN TWO
Hypothesis
MEANS

 Analysis of Variance (ANOVA) technique

 One-way ANOVA

 Two-way ANOVA

 Multi-way ANOVA

Dr. Yousaf Hayat 21


ONE-WAY ANOVA (Analysis of Variance):
In case of One-way ANOVA, the data is classified according to one criteria, e.g.
profit, sales, production of more than two companies; different marketing
policies adopted by the same company etc. It (ANOVA) partition the total
variation into different components (between groups and within groups) of
variation. i.e.
SS Total = Between SS + Within SS OR
SS Total = SS Treatments + SS Error
SS Total = SSTr + SSE

SOV df ANOVA TABLE


SS MS F-ratio

Between groups (t-1) Bet. SS (Bet. SS)/(t-1) = MSB MSB/MSE

With in groups t(r-1) SS Error (SS Error)/t(r-1) = MSE

Total (tr-1) SS Total (SS Total)


Dr. Yousaf Hayat 22
Example 4: Profit (0000) of three different companies for every two months of

a particular year. Analyze the data and draw your conclusions.

Company-A 40 38 35 42 44 37

Company-B 20 22 18 23 25 24

Company-C 45 46 50 48 54 56

Which test you will apply and why?

Is it possible to apply t-test, if Yes/No, why, explain.

Dr. Yousaf Hayat 23


One-Way ANOVA Results: SPSS Out Put

Maximum profit = Company C


Minimum Profit = Company B

Maximum

The P-value in the ANOVA


Table shows that the profits
of three companies are
significantly different.

Dr. Yousaf Hayat 24


Dr. Yousaf Hayat 25
Pair-wise comparison -continued

Dr. Yousaf Hayat 26


Example: Profit (0000) of three different companies for every two months of a
particular year
Company-A 12 10 9 15 8 12
Company-B 14 17 16 11 14 12
Company-C 18 19 17 14 12 19
Company-D 20 22 15 13 11 16

Compare the average profit of these companies at 5% level of significance and test the
hypothesis that, is there any significant difference among the profits of these companies?

Also apply LSD (least significant difference) test and separate the mean profits which
are significantly different from one another.
Compare means

Dr. Yousaf Hayat 27


Significant (P < 0.05)

Dr. Yousaf Hayat 28


TWO-WAY ANOVA (Analysis of Variance):
In two-way ANOVA, the data is classified according to two criteria (describing
one at rows and other at columns) e.g. sales of a particular commodity of
different companies at various cities of the country; different marketing policies
adopted by a group of companies; etc. In this case
SS Total = Row SS + Column SS + Error SS
Or SS Total = SSR + SSC + SSE
Example: Sale of three different companies by adopting four different marketing policies.

Marketing Policy
Company I II III IV
Company-A 40 38 35 42
Company-B 60 55 50 47
Company-C 45 46 43 48

Dr. Yousaf Hayat 29

You might also like