You are on page 1of 17

Business Statistics

Week 18 - Lecture 1 Hypothesis Testing:

Summary of the basics The prob-value approach Significance, effect size and power Tests: proportion, difference between two means

Reference: Quantitative Methods topic 9

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

One-Tail Test: recall the Franchise Problem


H 0 : = 5,000 H1 : < 5,000 26 random samples : X = 4,900, S = 280 According to the Null : X ~ N ( = 5,000, 2 =
Cass Business School

280 2 ) 26
2

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Figure 5.2: The sampling distributions of x under H0 and H1.


One-Tail Test

H1

H0

I xD

II _ x Non-rejection region

P(type I error)

Rejection region

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Five Steps in hypothesis testing (One Tail)


1. Write down the hypotheses:

H H

0 1

: = X

: < X

2. Choose significance level of test, prob. of type I error, (e.g., 0.05). 3. Find the critical value of the test in the statistical table Here z * =1.64 4. Calculate the test statistic according to the null, i.e.
x

Z=

/n
2

5. Decision rule: compare test statistic with critical value. If z < -Z* reject H 0 in favour of H 1
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 4

Returning to our problem we have:


Z *= 1.64 (tail area = 0.05) The test statistic is : Z= x = 4,900 5,000 280 2 26 = 100 280 2 26 = 1.82

-1.82<-1.64 Hence we reject the null that the weekly turnover is 5,000 In favour of the alternative hypothesis that it is less than 5,000.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 5

Now suppose, we tested:


Figure 6.1: A two tail hypothesis test
H0 H1 H1

H 0 : = 5,000 H1 : 5,000

Reject H0

Reject H0

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Steps for two-tail test


As for one-tail test except:

: X

(instead of H 1 : < X or H 1 : > X )

Note: Critical value Z* excludes 2.5% below Z* and 2.5% above Z*(instead of 5% below Z*).

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Z*= 1.96 to cut off 2.5% in each tail of the standard Normal distribution. The test statistic is the same as before: z = -1.82>-1.96 So the null hypothesis cannot be rejected in this case.

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

The prob-value approach


Prob-value (P-value) is the significance level of the calculated test statistic

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

The prob-value approach in the franchise


example

x
Test statistic:

100

s /n

2 280 / 26

= -1.82

( H 1 : < 5,000 ), we use a one-tail test

If we test whether the mean is less than 5,000

Z = -1.82 cuts off 3.44% of the standard Normal distribution. So

H 0 can be rejected at the 3.44% significance level (or with 96.56% confidence).
QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 10

Cass Business School

The prob-value approach in the franchise


example
If we test whether is different from 5,000 ( H 1 : 5,000 ), we use a two-tail test. Z = 1.82 cuts off 3.44% in each tail of the standard Normal distribution: a total of 6.88%. So H 0 could be rejected at the 6.88% significance level (or with 93.12% confidence), which does not meet the 5% criterion that is usually used. That is, we would not reject.

Usual criterion: reject if p-value 0.05


Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 11

The production manager of Nwindow Inc. has asked you to evaluate a proposed new procedure for manufacturing one of its line of double-hung windows. The present process has a mean production of 80 units per hour with a population standard deviation of 8. The manager indicates that he does not want a change to a new procedure unless there is strong evidence that the mean production level is higher with the new process. You obtain a random sample of 25 production hours using the new process, which leads to a mean of 83 production hours. What do you conclude based on this sample?
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 12

H 0 : = 80 H1 : > 80

= 8; n = 25
test statistic : x 80 83 80 = = 1.875 > 1.645 8/5 / n Reject the null at 5%. But, strong evidence P-value = 0.0304>0.01 better judge at 1% : z= No change
Cass Business School

Table A2: P(z>1.87)=0.0307 P(z>1.88)=0.0301


QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 13

Another example:
It is claimed that an average child spends 15 hours per week watching television. A survey of 100 children finds an average of 14.5 hours per week, with standard deviation 8 hours. Is the claim justified?
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 14

The claim would be wrong if children spend either more or less than 15 hours watching TV. The rejection region is split across the two tails of the distribution. This is a two tailed test.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 15

A two tailed test diagram


H1 H0 H1

2.5%

2.5%

Reject H0
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Reject H0
16

Solution
1. H0: = 15 H1: 15 2. Calculate the test statistic:
z= x s2 n = 14.5 15 82 100 = 0.625

3. Decision: we do not reject H0 since 0.625 < 1.96 and does not fall into the rejection region or P-value= 2 (0.266) ~0.52 >0.05 4. The claim is acceptable, no reason to be rejected.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 17

Significance and effect size


If the sample is large, the result of a test may be statistically significant (have a low significance level) even if the difference is small. Example We have data for 100 franchises, giving an average weekly turnover of 4,975 with standard deviation 143. Can we reject the hypothesis that the average weekly turnover is 5,000?

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

18

Significance and effect size


4,975 5,000

Z=

143 /100

= 1.75

Since this value of z is less than Z*= -1.64 the null hypothesis is rejected with 95% confidence. We conclude that the true weekly turnover is less than 5,000. But the difference of 25 may be unimportant even if it is statistically significant. We should look at the size of the difference (the effect size) and ask whether it is important or not. While statistically significant, a difference of 25 in 5,000 is not economically significant.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 19

Power
Power of a test = 1 Pr (Type II error) = 1 -

is the probability of not rejecting false

when it is

The power of a test is the probability of rejecting H 0 when it is false.

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

20

The power of a test

H1

H0

xD
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 21

Maximising the power of a test


is desirable, provided it does not increase prob(Type I error). Three possible ways: 1. Avoid situations where the effect size is small (the difference between the means under H 0 and H 1 is

small). 2. Use a large sample size, so that the sampling variance of x under both H 0 and H 1 is reduced and the distributions under the two hypothesis are more distinct. 3. Use sampling methods that have small sampling variances (same effect as increasing the sample size).
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 22

Testing a proportion
A car manufacturer claims that no more than 10% of its cars should need repairs in the first three years of their life. A random sample of 50 three-year-old cars found that 8 had required attention. Does this contradict the makers claim?

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

23

The sampling distribution of the sample proportion in large samples is given by:

p ~ N ( ,

(1 )
n

Under the null hypothesis (the makers claim): = 0.10 The sample data are: p = 8/50 = 0.16 n = 50

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

24

Solution
H H
0

: 1

= 0.10 > 0.10

Significance level: = 0.05 Critical value of a one-tail test at the 5% level is Z*= 1.64

z=

p
n

(1 )

0.16 0.10
0.10.9 50

= 1.41

The test statistic is less than the critical value. It falls in the nonrejection region. We do not reject the null hypothesis. We accept the manufacturers claim.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 25

It is claimed that 5% of adults fall asleep while watching TV. In a recent survey of 60 adults, 16.4% indicated that they had fallen asleep in front of the television in the past month. Do we have support for the claim?

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

26

H 0 : = 0.05 H1 : 0.05 p = 0.164; n = 60 z= 0.164 0.05 = 4.05 0.05 0.95 60


QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Two-tail

P-value~0

We reject the claim.


Cass Business School 27

Testing the difference of two means


The random variable to examine is x1 x2 , the difference between the average output, whose distribution for large samples is:
2 2 1 + 2 ~ , N x1 x2 2 1 n n 1 2

The population variances 1 and


2

2 which are not known


2
2 2

may be replaced by their sample estimates s1 and s 2 H0: = 0

H
Cass Business School

2 2

0
28

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Testing the difference of two means


H0: 1 = 2 or H0: 1 - 2 = 0 H1: 1 2 or H0: 1 - 2 0 The test statistic is
z=
Assumption: independent samples future lecture

(x1 x2 ) (1 2 )
2 s12 s2 + n1 n2
QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 29

Cass Business School

Testing the difference of two means


A car company wishes to compare the performance of its two factories producing an identical car model. Is there any difference between the two factories at a confidence level of 99%? Output is monitored for 30 days, chosen at random, with the following results: Factory 1 Factory 2 Average daily output 420 408 Standard deviation of daily output 25 20 Do these provide evidence of difference between the two means?
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 30

Testing the difference of two means


This is a two-tail test: there is no a priori reason to believe that the output of one factory is higher than that of the other.
Significance level: = 0.01 Lower than normal: the management does not want to interfere, unless it is really confident of some difference between the factories.

z* = 2.57. This cuts off 0.5% in each tail of the standard Normal distribution.
The critical value of the test is
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 31

Testing the difference of two means


The test statistic is:

( x x ) ( ) = (420 408) 0 = 2.05 25 + 20 s1 + s 2 30 30 n n


1 2 1 2 2 2 2 2 1 2

Decision rule: Z <Z* The test statistic falls in the non-rejection region. => No significant difference between the two factories.

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

32

Exercises (prepare for Fridays lecture) - 1


An employment opportunities committee suspects that females are not as well paid as their male counterparts in comparable jobs. A random sample of 75 males and 64 females in junior academic positions are selected and the following annual salary data is obtained: Male Female Mean 32,530 31,250 Standard Deviation 780 810 What do you conclude?
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 33

Exercises (prepare for tutorial) - 2


Quantitative Methods:
Exercise 5.5 (page 696) Problems 5.10 to 5.14 (page 712)

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

34

Business Statistics
Week18 - Lecture 2

Hypothesis Testing (cont.)


Testing the difference between 2 means Testing the difference of two proportions

Reference: Quantitative Methods, topic 9

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

35

Testing Difference of Two Means


H0: 1 = 2 or H0: 1 - 2 = 0 H1: 1 2 or H0: 1 - 2 0 The test statistic is
z=
2 s12 s2 + n1 n2
QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 36

Assumption: independent samples future lecture

(x1 x2 ) (1 2 )

Cass Business School

Recall the example from the last lecture


A car company wishes to compare the performance of its two factories producing an identical car model. Is there any difference between the two factories? Output is monitored for 30 days, chosen at random, with the following results: Factory 1 420 25 Factory 2 408 20

Average daily output Stand. Dev. (daily output)

Is there evidence of difference between the two means?


Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 37

Two tail-test: Z*=1.96 The test statistic is:

( x x ) ( ) = (420 408) 0 = 2.05 25 + 20 s1 + s 2 30 30 n n


1 2 1 2 2 2 2 2 1 2

Hence, difference between the two factories

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

38

An employment opportunities committee suspects that females are not as well paid as their male counterparts in comparable jobs. A random sample of 75 males and 64 females in junior academic positions are selected and the following annual salary data is obtained: Male Female Mean 32,530 31,250 Standard Deviation 780 810 What do you conclude?

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

39

Hypotheses:

H 0 : M F = 0 H1 : M F > 0

Sample Info:
Mean S N Male 32,530 780 75 Female 31,250 810 64

The test statistic is


z=

(xM

x F ) ( M F ) s s + nM nF
2 M 2 F

32 ,530 31, 250 780 2 810 2 + 75 64

= 9 .45!!

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

40

A union claims that the average income for its members in the UK is below that of employees of the same company in Spain. A survey of 60 employees in the UK showed an average income of 895/week with a standard deviation of 120. A survey of 100 workers in Spain, after making adjustments for various differences between the two countries and converting to sterling, gave an average income of 914 with a standard deviation of 90. Test at the 1% level if Spanish workers earn more than their British counterparts.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 41

H 0 : B S = 0 H1 : B S < 0 = 0.01 z* = 2.33 z= (895 914) 120 2 90 2 60 + 100 = 1.06 > 2.33

No evidence that the Spanish earn more than their British counterparts
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 42

Testing the difference of two proportions - 1


In a comparison of two holiday companies customers, of the 75 who went with Happy Days Tours, 45 said they were satisfied, while 48 of the 90 who went with Fly by Night Holidays said they were satisfied. Is there a significant difference between the two companies? The sample evidence is: p1 = 45/75 n1 = 75

p = 48/90
2

n = 90
2

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

43

Testing the difference of two proportions - 2


H H
0

: 1


1 1

2 2

=0 0

Significance level:

= 0.05 Critical value: Z*= 1.96

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

44

Testing the difference of two proportions - 3


The distribution of p1 p2 is: (1 1) 2 (1 2) , 1 + p1 p2 ~ N 1 2 n1 n2 so the test statistic is:

z=

1 (1 1)
n
1

( p p ) (
1 2 1

2 (1 2)
n
2

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

45

The null hypothesis states that the proportions are the same. Hence, a reasonable estimate for the common value is the overall proportion...

1 = 2 = =
Cass Business School

n1 p1 + n2 p2 n1 + n2
46

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

Summary: Testing Difference in Proportion


H0: 1 = 2 or H0: 1 - 2 = 0 H1: 1 2 or H0: 1 - 2 0 The test statistic is
z=

( p1 p2 ) ( 1 2 ) (1 ) (1 ) +
n1 n2

n1 p1 + n2 p2 n1 + n2

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

47

Hence, in our example:


The test statistic becomes:

0.6 0.533 0

0.564 (1 0.564) 0.564 (1 0.564) + 75 90

= 0.86

The test statistic is less than the critical value, so the null hypothesis cannot be rejected. There is not sufficient evidence to demonstrate a difference between the performance of the two companies.

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

48

Exercises (prepare for next Mondays lecture) - 1


A market research company wants to know if shoppers are sensitive to the prices of items sold in a supermarket. A random sample of 802 shoppers was obtained and 387 were able to state the correct price of an item immediately after placing it in the trolley. Test at the 7% level the null hypothesis that at least 50% of all shoppers can state the correct price.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 49

Exercises (prepare for next Mondays lecture) - 2


A manufacturer believes that a new promotional campaign will increase favourable perception of the product by 10%. Before the campaign, a random sample of 500 consumers showed that 20% had favourable reactions to the product. After the campaign, a second random sample of 400 consumers found favourable reactions among 28%. Test at the 5% significance level whether there has been a 10% improvement in favourable perceptions.
Cass Business School QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10 50

Exercises (prepare for tutorial) - 3


Quantitative Methods:
Exercises 5.6 and 5.8 (page 701) Problems 5.15 to 5.18 (page 713)

Cass Business School

QM Sem. 2 - Week 7 28/02/11 & 04/03/11 - CR10

51

You might also like