Você está na página 1de 14

HypothesisTesting(2)

Lecture 8 Lecture8
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
HypothesisTesting(2)
Sofarwehavelookedathypothesistestingaboutasingle
population parameter populationparameter
H
0
:=5000
Nowwelookattestinghypothesesaboutdifferencesbetween
twopopulationparameters
E.g.arewomenpaidlessthanmen?
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
FormalLayoutofaProblem
1. Specifythenullandalternativehypothesis
2 Choose significance level e g 5% 2. Choosesignificancelevel,e.g.5%
3. Lookupcriticalvaluefromzorttables
4. Calculatetheteststatistic
5 D i i j t d t j t H 5. Decision:rejectordonotrejectH
0
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
TestingtheDifferenceofTwoMeans
Totestwhethertwosamplesaredrawnfrompopulationswith
thesamemean
H
0
:
1
=
2
orH
0
:
1

2
=0
H
1
:
1
=
2
orH
0
:
1

2
= 0
1

1

2 0

1

2
Theteststatisticis
( ) ( ) x x ( ) ( )
2
2
2
1
2 1 2 1
s s
x x
z
+

=

2 1
n n
+
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Example: Car Company has Two Factories Example:CarCompanyhasTwoFactories
isOutputtheSame?
Average daily output for 30
days
420 408
days
Standard dev of daily output 25 20
H
0
:
1
=
2
or
1

2
=0
0

1

2

1

2
H
1:

2
=0
Significancelevelof1%impliesz
*
0.005
=2.57
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
( ) ( ) ( ) ( ) 0 408 420 x x ( ) ( ) ( ) ( )
05 . 2
20 25
0 408 420
2 2 2
2
2
1
2 1 2 1
=
+
=
+
=
s s
x x
z

30 30
2 1
+ +
n n
z<z
*
so it falls in the non-rejection region and therefore we
do not reject the null hypothesis do not reject the null hypothesis.
There does not seem to be enough evidence to reject the g j
claim that output is the same in each factory
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Testing the Difference of Two TestingtheDifferenceofTwo
Proportions
Totestwhethertwosampleproportionsareequal
H
0
:t
1
=t
2
orH
0
:t
1
t
2
=0
0 1 2 0 1 2
H
1
:t
1
= t
2
orH
1
:t
1
t
2
= 0
The test statistic is Theteststatisticis
( ) ( )
2 1 2 1
p p t t ( ) ( )
( ) ( )
2 1 2 1

1

1

n n
p p
z
t t t t
+

=
2 1
2 2 1 1

n n
p n p n
+
+
= t
2 1
n n
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Example:CustomerSatisfaction
Are Customers Equally Satisfied with Different Tours? AreCustomersEquallySatisfiedwithDifferentTours?
proportion who say they are satisfied 45/75 48/90
H
0
:t
1
t
2
=0
H
1
:t
1
t
2
=0
Significance level of 5%, z
*
0 025
=1.96 Significancelevelof5%,z
0.025
1.96
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
564 . 0
90 75
533 . 0 * 90 6 . 0 * 75

2 2 1 1
=
+
+
=
+
+
=
p n p n
t
( ) ( )
2 1 2 1
p p t t
90 75
2 1
+ + n n
( ) ( )
( ) ( )

1

1

2 1 2 1

=
n n
p p
z
t t t t
( ) ( )
( ) ( )
86 . 0
0 533 . 0 6 . 0
2 1
=

=
n n
( ) ( )
90
564 . 0 1 564 . 0
75
564 . 0 1 564 . 0
+

z<z
*
so we do not reject the null hypothesis
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
S ll S l T ti th Diff SmallSamples:TestingtheDifference
of Two Means ofTwoMeans
Theteststatisticis
( ) ( )
) 2 ( ~
2 1
2 2
2 1 2 1
+

= n n t
S S
x x
t

h S i th l d i
2 1
+
n
S
n
S
2
whereS isthepooledvariance
( ) ( ) 1 1
2
2 2
2
1 1
2
+ s n s n
S
2
( ) ( )
2
2 1
+
=
n n
S
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Independent and Dependent Samples IndependentandDependentSamples
Sofarassumedoursamplesaredrawnindependently
Of h d d l ( b f d f Oftenwehavedependent samples(e.g.beforeandaftertests,
orscoresonmacroandmicroexams)
Weuseadifferentapproachtousetheinfo.thatthedata
comesfromthesameobservation
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Example: Paired Samples Example:PairedSamples
W k 1 2 3 4 5 6 7 8 9 10 Worker 1 2 3 4 5 6 7 8 9 10
Before
21 24 23 25 28 17 24 22 24 27
After
23 27 24 28 29 21 24 25 26 28
Improve
ment
2 3 1 3 1 4 0 3 2 1
10 , 10 . 3 , 5 . 23 = = = n s x
B B
10 247 1 00 2
10 , 55 . 2 , 5 . 25
I I
= = =
= = =
n s x
n s x
A A
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
10 , 247 . 1 , 00 . 2
t Improvemen t Improvemen
n s x
0 :
t improvemen 0
= H
833 1
0 :
*
t improvemen
>
t
H
A

07 5
0 0 . 2
833 . 1
9 , 05 . 0

=
t
t
07 . 5
10
247 . 1
2
= = t
10
t t* j t th ll h th i d l d th t t>t* so we reject the null hypothesis and conclude that
training has improved worker productivity
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Summary Summary
Theprinciplesarethesameforalltests:calculatethetest
statisticandseeifitfallsintotherejectionregion
Theformulafortheteststatisticdependsupontheproblem
(mean,proportion,etc)
Therejectionregionvaries,dependinguponwhetheritisaone
ortwotailedtest
Forlargesampleswecanalwaysuseaztest
If n is small we can still use z test if the population variance is Ifnissmallwecanstilluseztestifthepopulationvarianceis
known
Otherwise use a t (and pool variances)
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Otherwiseuseat(andpoolvariances)

Você também pode gostar