Sie sind auf Seite 1von 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.

Types of Hypotheses:
1. 2. 3. 4.
12/19/2011

Null Hypothesis Alternative Hypothesis Simple Hypothesis Composite Hypothesis

Hypothesis: Hypothesis is a
statement or assumption about the population parameter under the assumption that it is true.

Dr. Atta ur Rahman

Null Hypothesis and Alternative Hypotheses

Types of Hypotheses A hypothesis which is to be tested for possible 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
12/19/2011

0)
Dr. Atta ur Rahman 2

Mean comparison of two different populations (i.e. two different companies

Mean Comparison: Testing of Hypothesis in terms of sale/production/saving/profit etc) can be done by using:
1. 2. Two sample t-test (t-test for independent samples) 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).
12/19/2011
Dr. Atta ur Rahman 3

Mean Some Basic Definitions:


1. 2. 3. 4. 5. Significance level Test statistic

Comparison: Testing of Hypothesis

Critical region and critical values One tailed and two-tailed tests Type-I and Type-II errors

12/19/2011

Dr. Atta ur Rahman

Main Steps in Testing of Hypotheses


Steps Involved in Testing of State/formulate the null and alternative hypotheses


significance are used in literature

Hypothesis

Choose the level of significance, generally, 1%, 5% and 10% levels of 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. Atta ur Rahman 5

12/19/2011

COMPARISON Testing of Hypothesis Steps Involved in OF TWO MEANS


The t-test for independent samples Populations variances are identical Population variances are not identical

Paired t-test (dependent samples)

12/19/2011

Dr. Atta ur Rahman

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:

12/19/2011

Dr. Atta ur Rahman

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
2 s1 n1

X2
2 s2 n2

Which under the null hypothesis has tdistribution with degrees of freedom, where:

2 [( s12 / n1 ) ( s2 / n2 )]2 2 ( s12 / n1 ) 2 ( s2 / n2 ) 2 n1 1 n2 1 2 where, s12 and s2 are the variances of

sample-1 and sample-2 respectively.


12/19/2011
Dr. Atta ur Rahman 8

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


The following hypothesis is considred H0: 1 0 or H 0 : d 0 VS 2 H1:
1 2

0 or H1:

To test the above hypothesis, the following t-test is used: t d d , which follow a t-distribution with (n-1) degrees of freedom sd / n d n X A OR d (d d ) 2 n 1
Dr. Atta ur Rahman 9

where, d d XB

is the mean of "d" values and XA X B ; sd is the standard

deviation of all "d" values and is computed as: sd

12/19/2011

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


Company-A Company-B
H0 : VS H1:
1

12 13
2

13 14

14 11

13.5 10

10 9

11 8

12.5 9.4

13.8 11.5

15 8

11.6 7

15 9

16 8.5

0 (On the average, the monthly profit of both the companies is same) 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.
12/19/2011
Dr. Atta ur Rahman

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 and what does it indicate, decide on the basis of P-value?

3.
4.

Which test is applied and why?


Interpret the result of Levenes 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. Atta ur Rahman 11

12/19/2011

Example 2: Monthly Profit, Production and Sales of Company-A and B during one year (12 months data)
Company-A Profit 12 13 14 13.5 Production 120 140 150 140 Sale 110 132 145 123 Profit 13 14 11 10 Company-B Production 112 132 145 120 Sale 100 122 132 100

10
11 12.5 13.8

103
115 123 140

90
100 122 135

9
8 9.4 11.5

100
90 95 115

70
80 70 100

15
11.6 15 16
12/19/2011

160
120 162 165

145
115 150 145
Dr. Atta ur Rahman

8
7 9 8.5

90
75 95 90

70
72 90 88
12

SPSS out put

12/19/2011

Dr. Atta ur Rahman

13

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

t-ratio
Variable Profit Production Sale Mean 13.12 136.5 126 SE 0.514 5.868 5.607 Mean 9.87 104.92 91.17 SE 0.613 5.841 5.967 4.060** 3.815** 4.254**

P-value

0.001 0.001 0.000

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

12/19/2011

Dr. Atta ur Rahman

14

Company A 160 140 120


Mean value

Company B

100 80 60 40 20 0 Profit Production Sale

12/19/2011

Dr. Atta ur Rahman

15

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

12
13 14 13.5

120
140 150 140

110
132 145 123

17
20 18 16

125
145 179 158

115
140 160 150

10
11 12.5 13.8

103
115 123 140

90
100 122 135

12
14 13 15

110
134 135 150

105
125 124 145

15
11.6 15 16
12/19/2011

160
120 162 165

145
115 150 145

17
13 17 20

170
145 170 170

160
142 165 163
16

Dr. Atta ur Rahman

12/19/2011

Dr. Atta ur Rahman

17

Some Questions Regarding Example 3:


1. 2. 3. Write the null and alternative hypotheses for such a problem. Which test is applied for comparison and why? 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.

12/19/2011

Dr. Atta ur Rahman

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
Variable Profit Production Sale Mean 13.12 136.50 126.00 SE 0.514 5.868 5.607 Mean 16 149.25 141.17 SE 0.769 6.064 5.771 -5.436** -5.413** -6.407**

P-value

0.000 0.000 0.000

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


19

12/19/2011

Dr. Atta ur Rahman

Company A 160 140 120 100 80 60 40 20 0 Profit

Company B

Mean value

Production

Sale
20

12/19/2011

Dr. Atta ur Rahman

COMPARISON OF MORE THAN TWO Steps Involved in Testing of Hypothesis


MEANS
Analysis of Variance (ANOVA) technique One-way ANOVA Two-way ANOVA Multi-way ANOVA

12/19/2011

Dr. Atta ur Rahman

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


SS Total = SS Treatments + SS Error SS Total = SSTr + SSE

OR

ANOVA TABLE
SOV
Between groups With in groups Total
12/19/2011

df
(t-1) t(r-1) (tr-1)

SS
Bet. SS SS Error SS Total
Dr. Atta ur Rahman

MS
(Bet. SS)/(t-1) = MSB (SS Error)/t(r-1) = MSE (SS Total)

F-ratio
MSB/MSE

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 Company-B Company-C 40 20 45 38 22 46 35 18 50 42 23 48 44 25 54 37 24 56

Which test you will apply and why? Is it possible to apply t-test, if Yes/No, why, explain.

12/19/2011

Dr. Atta ur Rahman

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.

12/19/2011

Dr. Atta ur Rahman

24

Pair-wise comparison (application of two samples t-test)

12/19/2011

Dr. Atta ur Rahman

25

Pair-wise comparison -continued

12/19/2011

Dr. Atta ur Rahman

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
Company-C Company-D

14
18 20

17
19 22

16
17 15

11
14 13

14
12 11

12
19 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

12/19/2011

Dr. Atta ur Rahman

27

Significant (P < 0.05)

12/19/2011

Dr. Atta ur Rahman

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
Company-A Company-B Company-C
12/19/2011

I
40 60 45

II
38 55 46
Dr. Atta ur Rahman

III
35 50 43

IV
42 47 48
29