Sei sulla pagina 1di 8

Hypothesis Testing

Introduction
Last week we looked at building condence intervals for our estimates of the population mean. This week we are taking this a step further and looking to test such questions as, is the population mean really 100, or has there been an improvement in sales? To do this we rely upon a set of techniques known as hypothesis testing.

Methodology for Hypothesis Testing


All hypothesis test follow the same basic methodology although the actual calculations may vary with the data available. 1. State the Null Hypothesis This is the statement you are attempting to test to see if it is true. For example are you asking , or are two separate population means equal?. This is is the population mean equal to written as follows
   



Where is any constant. 2. State the Alternative Hypothesis This is the conclusion to be reached if the null hypothesis is found to be false. For example the population mean does not equal 100, or the population mean is less than 100, or the two population means are not equal.
"!#%$ "!#'& "!#%$   

"!## $ 

Where is any constant. 1

3. State the Signicance level of the test ( ( ) This is the proportion of the time you are prepared to be wrong. That is the proportion of the the time you reject the null hypothesis when it is infact true. 4. Find the Critical Value This is taken from the appropriate tables. This is the value the test statistic has to reach before we can reject the null hypothesis. This appropriate tables depend on the information we have available, we will return to this later. The value also depends on whether we are looking at a one sided (tailed) test, that is testing if greater than or less than in our alternative hypothesis or a two sided (tailed) test just looking if not equal. For example
)01235466 )"7#12'8466

is a one tailed test, where as


)01235466 )"7#12%5 93 466

is a two tailed test. 5. Calculate the Test Statistic This is calculated using the available data and the appropriate formula, we will come back to this in more detail later. 6. Reach a Conclusion Compare the test statistic and the critical value. If the test statistic is greater than the critical value we have enough evidence to reject the null hypothesis and conclude that the alternative hypothesis is true. If the test statistic is not greater than the critical value we do not have sufcient evidence to reject the null hypothesis. The above six steps are universal to all hypothesis testing.

Testing One Mean


If we have a sample mean we are testing to see if the population mean is at a level, @ . 1. State the Null Hypothesis
)A012B3 @

That is we are saying that we believe th population mean to equal @ .

2. State the Alternative Hypothesis Here we have three option, we could test whether or not the mean was equal to C , or greater than or less than C . These would be written as
DFE#GHPQ I DFE#GHSR DFE#GHST C C C

3. State the Signicance level of the test ( U ) This will all most always be either VW or XYW , we write this as
U U Q Q `bac` V `bac` X

4. Find the Critical Value What is the appropriate table?


de known

Use standard normal tables. The next question is is this a one or two tailed test.
U ` af` V b `baf` X de unknown but s is large (s d e unknown but s is small (s R T q` ) q` )

1 Tailed 2 Tailed
X afgh p afqq X afig p a Vr

Use standard normal tables as above We can not use standard normal tables here and like last week we use t tables instead. (a) Calculate the degrees of freedom t Q
svuwX .

(b) 1 tailed test, look down the U column and across the appropriate t row and read off the critical value. (c) 2 tailed test, look down the Uyxp column and across the appropriate t row and read off the critical value. 5. Calculate the Test Statistic Again this depends on the data available.
d e known

The test statistic is .


Q u H

d e xs

 unknown but is large (" )

The test statistic is .


g h edf ji  unknown but is small ("k )

The test statistic is l .


l g h mdf i

6. Reach a Conclusion Compare the test statistic with the critical value and decide whether or not to reject the null hypothesis. Word your conclusions in the terms of the original question.

Examples
A chain of shops believes that the average size of transactions is npoq with a variance of r . The takings of one branch were analysed and it was found that the mean transaction size was npos over the 100 transactions in one day. Based on this sample is the true mean npo . Test at the tu and oYu levels.
vAwyx vF{px d } zo

zo d | P ~ct

Since  is known we use standard normal tables with a two tailed test and our critical value is therefore o~fr . Calculate the test statistic

g df i g oYs o i r o 

s~f

Since our test statistic is greater than our critical value we have enough evidence to reject our null hypothesis that the population mean is npo at the tu level. However at the oYu level our critical value is s~t which is larger than our test statistic and therefore at the ou we can not reject the null hypothesis. Alternatively since npos is smaller than or proposed value of npo we could set the problem up as follows

Bz "S f c

This is now a one tailed test and the critical value from tables is , the test statistic is as before f . The test statistic is greater than the critical value and hence we reject the null hypothesis and q accept the alternative hypothesis that the population mean is less than .

The batteries for a re alarm system are required to last for 20000 hours before they require replacing. 16 batteries were tested and they were found to have an average life of 19500 hours and and a  standard deviation of 1200 hours. At a signicance level do the batteries last 20000 hours?
AB F#S   bf

Since we have a small sample we use the t tables. This is a one tailed test so we look in the bf column and the #5pw#5Y row and read off the critical value of c .
e q   q

f

The test statistic is less than the critical value and therefore we can not reject the null hypothesis. The batteries last for 20000 hours.

0.1

Testing Two Means

If we have two independent random samples from two populations we can test to see if the means are the same. This requires the use of the same common methodology as for one mean tests however slightly different calculations are required for the test statistics.

If and

are known

Use standard normal tables to nd the critical value and calculate the test statistic using

If and are unknown Use t tables with


degrees of freedom.

First check to see if the variances can be pooled, is


v q Aw

If so proceed, if not you can not test in this case. The test statistic is calculated using the following formula
q

where

Example A company is interested in knowing if two branches have the same level of average transactions at a  signicance level. The company sample as small number of transactions and calculates the following statistics. Shop 1 Shop 2
 Y  Y

Can we pool the variances?


v q   j

 w

Okay to pool variances


"

y bf

# #

%Y Y 

 From tables the critical value for   e


degrees of freedom is c

Y ! ! #" %$ &  & ' 




)("

Our test statistic is less than our critical value and therefore we do not reject the null hypothesis, the two shops have the same level of average transactions.

Exercise for 15/02/2002


1. A machine for lling Coke can has a process variance of 400. A sample of 100 cans is taken and it is found that the average contents are 240ml. Is this consistent with the cans containing the stated weight of 250ml? Test at the 01 level and assume a two tailed test. 2. A company manufactures bolts. One production line produces bolts that are designed to be 100mm long. A sample of 50 bolts is taken and and measured they are found to have an average length of 97.5mm with variance 150. Are the bolts being made too short? Test at the 01 signicance level. 3. A company is in dispute with its work force. The workers claim that under a new exitime system they are working longer than the standard 37.5 hour week. The time cards of 10 workers were selected at random and these showed the following hours worked, 35,40,45,41,36,37,39,38,42,32. At a 01 level are the staff working more than a standard week? 4. A chain of record shops believes that its Northumberland Street store (Shop 1) is more successful than its Metro Centre branch (Shop 2). The management take a random sample of daily taking and nd the following summary statistics. Shop 1 Shop 2 At a 01
2436587@9A0BBB 2 587@9RHTS0DB E CD3FEG5HIBB C E 5VUBB E PQ589#B PQ5WSB

level is the managements belief correct?

Potrebbero piacerti anche