Anda di halaman 1dari 9

1

OneSampleandTwoSampleMeansTests
1SampletTest
The1samplettestallowsustodeterminewhetherthemean
ofasampledatasetisdifferentthanaknownvalue.
Usedwhenthepopulationvarianceisnotknown.
Canbeusedwhenthesamplesizeissmall.
Usen1degreesoffreedom.
Forexample,weareinterestedindeterminingifthemeanper
capitaincomeofWestVirginiacountiesisdifferentthanthe
nationalaverage,andwesuspectbasedonapriori(before
hand)knowledgethatitislower.
Ourhypothesesare:
H
o
:ThepercapitaincomeofWestVirginiacountiesisnot
significantlylessthanthenationalaverage.
H
a
:ThepercapitaincomeofWestVirginiacountiesis
significantlylessthanthenationalaverage.
ProcedureSteps
1. DetermineifWestVirginiacountypercapitaincomeis
normallydistributed.
2. Proceedwiththe1samplettest.
WedonotneedtoknowthenormalityofUSpercapita
income.Allweneedtoknowisthemean.
2
PerCapita
Income
Median
Household
Income
Median
Family
Income Population Households
UnitedStates $27,334 $51,914 $62,982 308,745,538 116,716,292
WestVirginia $21,232 $38,380 $48896 1,852,994 763,831
n s
x
t
/

=
The t statisticiscalculatedas:
Whereisthesamplemean,isthetruemean,s isthe
samplestandarddeviation,andn isthesamplesize.
x
Wetakethecalculatedtvalueandthedf tothettableto
determinetheprobability.
Althoughweignorethesignonthettable,wecantellfrom
thesignthatWVpercapitaincomeislessthanthenational
average.
54 . 21
2 . 375
8 . 8080
54 / 04 . 2757
0 . 27334 2 . 19253
=

= t
53 1 54 = = df
WestVirginia Mean: 19253.2
S: 2757.04
n: 54
UnitedStates Mean: 27334
t=21.54
df =53
Sinceourdf isnotlisted,use
thenextlowerdf.
Wheredoesthecalculatedt
(3.11)fall?
3
Since21.54<1.684,rejectH
0
.
ThepercapitaincomeofWestVirginiaissignificantlylessthanthenational
average(t
21.54
,p<0.005).
WestVirginiaspercapitaincomeisverylow.
Notethattheconfidenceintervalsforthemeanarecalculated
usingthecriticalt valuefromthetable.
Ifthedfyouneedisnotinthetable,usethenextLOWER
value.
o
o o
=
(

|
.
|

\
|
+ s s |
.
|

\
|
1
, ,
n
s
t x
n
s
t x pr
df df
0 . 19885 4 . 18621
1
54
04 . 2757
684 . 1 2 . 19253
54
04 . 2757
684 . 1 2 . 19253
s s
=
(

|
.
|

\
|
+ s s |
.
|

\
|

o
TwoSampleTTestforMeans
Usedtocompareonesamplemeantoanother.
Twodifferenttest:
Equalvariances
Unequalvariances
Homoscedasticity theassumptionofequalvariances.
Whendatameettheassumptionofnormalitywecanuseconfidenceintervals
toquantifytheareaofuncertainty(inthiscase5%).Hereweare95%
confidentthatthemeansdonotoverlapandthatthesetwogroupsare
significantlydifferent.
4
Inthisexamplethemeanscouldoccurinanoverlappingregionandweareless
than95%certainthattheyaresignificantlydifferent.
Whenthevariancesarenotequal,theregionofoverlapisasymmetrical
andtheprobabilitiesassociatedwiththelocationofthemeanarenotthe
same.ToavoidaType1errorweuseamoreconservativeapproach.
Test1:EqualVariances
Theteststatisticis:
s
2
1
ands
2
2
arethevariances(orsquaredstandarddeviations)for
eachsample,n
1
andn
2
arethegroupsamplessizes.
Thereforet isthedistancebetweenthetwomeans,instandard
deviationunits,takingintoconsiderationsamplesize.
Forthe2samplettestweknow2means,thereforethedegreesof
freedomwouldbe:df=n
1
+n
2
2
2
) 1 ( ) 1 (
1 1
2 1
2
2 2
2
1 1
2 1
2 1
+
+
=
+

=
n n
s n s n
s where
n n
s
X X
t
p
p
Whencomparingtwoormoregroups,eachgroupMUST
testedfornormalityindividually.
Ifwepoolthedataandtestfornormality,thenweare
assumingthatthedataarefromthesamepopulation
whichiswhatwearetryingtodeterminewiththettest.
5
Todetermineifthevariancesareequal,usethe
equation:
) 1 , 1 (
2 1 2
2
2
1
= = n n df
s
s
F
TheF resultsarethencomparedtotheF table.
Notethatthereareseveraladditionalpagesnotshown
Example:2SampleTTestwithEqualVariances
Researchquestion:Isthereadifferenceinthesittingheight
betweentheArctic andGreatPlainsnativeAmericans?
H
0
:Thereisnosignificantdifferenceinthesittingheightsof
ofArcticandGreatPlainsnativeAmericans.
H
a
:Thereisasignificantdifferenceinthesittingheightsof
ofArcticandGreatPlainsnativeAmericans.
Arctic Plains
N 8 16
Mean 864.9 882.7cm
S
2
488.2 432.6
Range 71.2 84.22
Theorderofoperationsforconductingthetestis:
1. Testeachgroupfornormality.Proceedwithttestifboth
groupsarenormal.
2. ConductanFtest.
A. IfH
o
isacceptedthenproceedwithequalvariancest
test.
B. IfHoisrejectedthenproceedwithWelchs
approximatettest.
3. Conductappropriatettest.
6
Testeachgroupfornormality:
399 . 3 , 50 . 2 22 . 3
2 . 488
2 . 71
2 . 488
2 . 71
8
= = =
=
=
=
Critical Arctic
Arctic
Arctic
q q
Variance
Range
n
Arctic
Since2.50<q
3.22
<3.399,acceptH
o
.
Arcticsittingheightisnotdifferent
thannormal(q
3.22
,p>0.05).
Plains
24 . 4 , 01 . 3 049 . 4
6 . 432
22 . 84
6 . 432
22 . 84
16
= = =
=
=
=
Critical Arctic
Plains
Plains
q q
Variance
Range
n
Since3.01<q
4.049
<3.4.24,acceptH
o
.
Plainssittingheightisnotdifferent
thannormal(q
4.049
,p>0.05).
Sincebothgroupsarenormal,proceedtothevariance
(F)test.
VarianceorFTest:
H
0
:Thevariancesare notsignificantdifferent.
H
a
:Thevariancesaresignificantdifferent.
o =0.05
FromtheFtablethecriticalvaluefor15,7df is2.71.
7) (15, 1) 8 1, (16 df 1.13
432.6
488.2
F = = = =
SinceourcalculatedFstatisticislessthanthecriticalvaluefrom
thetable(1.13<2.71)weassumethatthevariancesareequal.
Thevariancesfortwosittingheightsarenotsignificantly
different(F
1.13
,.25<p<0.50.
Nowwecanproceedwiththetwosamplettest
7
95 . 1
19 . 9
8 . 17
16
1
8
1
22 . 21
7 . 882 9 . 864
22 . 21
22
4 . 9906
2 16 8
6 . 432 ) 1 16 ( 2 . 488 ) 1 8 (
=

=
+

=
= =
+
+
=
t
s
p
Sincewedonotcareaboutdirection(largerorsmaller)thesigndoesnot
matter.Ifwedocareaboutdirectionthenthesignisveryimportant.
Arctic Plains
N 8 16
Mean 864.9 882.7cm
S
2
488.2 432.6
Range 71.2 84.22
Nodirectionimplied
(doesntmatter):
Arctictribeshorter
thanplainstribe:
Plainstribetaller
thanarctictribe:
Arctic Plains
Arctic Plains
Plains Arctic
Signhasnomeaning.
Signmeansarctic
thetribesmeanis
1.95cmlessthan
theplainstribes
mean.
Signmeansplains
thetribesmeanis
1.95cmgreater
thanthearctic
tribesmean.
95 . 1
19 . 9
8 . 17
16
1
8
1
22 . 21
7 . 882 9 . 864
=

=
+

= t
95 . 1
19 . 9
8 . 17
16
1
8
1
22 . 21
7 . 882 9 . 864
=

=
+

= t
95 . 1
19 . 9
8 . 17
16
1
8
1
22 . 21
9 . 864 7 . 882
= =
+

= t
Forexample:
Note:usea2tailedtestsincewearejustinterestedinwhether
thereisadifference,notifoneisgreaterorlessthantheother.
InTableA.3thecriticalvaluefordf=22is2.074.
Since1.95<2.074wethereforeacceptH
o
:
Thereisnosignificantdifferenceinthesittingheightsof
ofArcticandGreatPlainsnativeAmericans(t=
1.95
,
0.10>p>0.05).
Theprobabilityrange(e.g.0.10>p>0.05)arefromthettable.
8
Note:2tailedt=1.95foradf(v) of22fallsbetween0.10and0.05.
Test2:UnequalVariances(Welchsapproximatet)
Theteststatisticis:
s
2
1
ands
2
2
arethevariances(orsquaredstandarddeviations)for
eachsample,n
1
andn
2
arethegroupsamplessizes.
Thedfmaybenoninteger,inwhichcasethenextsmallerinteger
shouldbeused.Takethisnumbertothettable.
1 1
2
2
2
2
2
1
2
1
2
1
2
2
2
2
1
2
1
2
2
2
1
2
1
2 1

|
|
.
|

\
|
+

|
|
.
|

\
|
|
|
.
|

\
|
+
=
+

=
n
n
s
n
n
s
n
s
n
s
df and
n
s
n
s
X X
t
VariableDistributionsandTestStatisticDistributions
Thevariablemayhaveanegativeexponentialdistribution
(e.g.frequencyofaEbolacasesperoutbreak).
MostlocationshaveveryfewpeoplewithEbola.
Take100samplesfromthepreviousdistribution.
Calculateameanforeachsample.
Thecentrallimittheoremstatesthatthesamplemeanswill
benormallydistributed.
24samplemeans 48samplemeans 72samplemeans
9
Somesamplesmeanswillbegreaterthanthetruemean,
somewillbeless.
However,ifthenumberofsamplemeansislargetheywill
takeonathepropertiesofanormaldistribution.
Thisistrueeveniftheunderlyingpopulationhasadifferent
distribution.
RobustnessinStatistics
Robust whenastatisticaltechniqueremainsuseful
evenwhenoneormoreofitsassumptionsareviolated.
Ingeneral,ifthesamplesizeislargemoderatedeviations
fromthestatisticaltechniquesassumptionswillnot
invalidatetheresults.
TheFandttestsareconsideredtobefairlyrobustother
testsarenot,sosimplyincreasingthesamplesizemay
notbethebestapproachifthedataviolateassumptions.

Anda mungkin juga menyukai