Вы находитесь на странице: 1из 11

1

NonParametricTwoSampleAnalysis:
TheMannWhitneyUTest
Whensamplesdonotmeettheassumptionofnormality
parametrictestsshouldnotbeused.
Toovercomethisproblem,nonparametrictestscanbe
used.
Thesetestsaredistributionfree(donotassume
normality.
Theyarefairlyrobustandnearlyaspowerfulas
parametrictests.
TheyoftenuseRANKSratherthanobservedvalues.
EarthquakeDepth
Chileanearthquakes
Tests of Normality (May)
Kolmogorov-Smirnov(a) Shapiro-Wilk
Statistic df Sig. Statistic df Sig.
Mag .235 20 .005 .755 20 .000
Tests of Normality (June)
Kolmogorov-Smirnov(a) Shapiro-Wilk
Statistic df Sig. Statistic df Sig.
Mag .259 18 .002 .756 18 .000
2
Independent Samples Test
2.644 .113 2.142 36 .039 .6650 .3104 .0354 1.2946
2.108 30.985 .043 .6650 .3155 .0215 1.3085
Equal variances
assumed
Equal variances
not assumed
Magnitude
F Sig.
Levene's Test for
Equalityof Variances
t df Sig. (2-tailed)
Mean
Difference
Std. Error
Difference Lower Upper
95%Confidence
Interval of the
Difference
t-test for Equalityof Means
Usingattestgivestheresultthatthemagnitudeofthe
earthquakesinMayandJunewassignificantlydifferent.
Ranks
18 22.36 402.50
20 16.93 338.50
38
Month
5
6
Total
Magnitude
N MeanRank Sumof Ranks
Test Statistics
b
128.500
338.500
-1.511
.131
.133
a
Mann-WhitneyU
WilcoxonW
Z
Asymp. Sig. (2-tailed)
Exact Sig. [2*(1-tailed
Sig.)]
Magnitude
Not correctedfor ties. a.
GroupingVariable: Month b.
Usinganonparametrictestgivestheresultthatthemagnitude
oftheearthquakesinMayandJunewasnotsignificantlydifferent.
Whenthedistributionofthedatasetsdeviatesubstantiallyfrom
normal,itisbettertousenonparametric(distributionfree)tests.
Therearenoassumptionsmadeconcerningthesample
distributions.
Tiedranksareassignedtheaveragerankofthetied
observations.
TheMannWhitneyUtestisapproximately95%aspowerfulas
thettest.
Ifthedataareseverelynonnormal,theMannWhitneyUtestis
substantiallymorepowerfulthanthettest.
TheMannWhitneyUtest(2tailed)
ComparethecriticalUvaluetoeitherUorU,whicheverislarger.
1 group for ranks the of sum the is where
2
) 1 (
1
2 1
'
1
1 1
2 1
R
U n n U
R
n n
n n U


3
Tiedranksaredealtwithbyassigningtheaverage
ranktothetiedobservations:
Obs
Order Value Rank(withties) Rank
1 22 2 2
2 26 6 6
3 23 3 4
4 23 4 4
5 23 5 4
6 27 7 7.5
7 21 1 1
8 27 8 7.5
(3+4+5)/3=4
(7+8)/2=7.5
TheUtestusestherankofthepooledobservations.Fora
2tailedtest,rankscanbefromhighesttolowestorlowest
tohighest.
Oceanic Rank
Oceanic
Continental Rank
Continental
3.9 1 4.1 3.5
4.0 2 4.3 7
4.1 3.5 4.3 7
4.3 7 4.3 7
4.3 7 4.4 11
4.4 11 4.4 11
4.5 13.5 4.5 13.5
4.8 16 4.6 15
5.4 20 5 17
6.3 21 5.1 18.5
6.8 22.5 5.1 18.5
6.8 22.5
147
EarthquakeMagnitudesinChile
H
o
:Thereisnosignificantdifferencemagnitudeofoceanic
versuscontinentalearthquakesinChile.
H
a
:Thereisasignificantdifferencemagnitudeofoceanicversus
continentalearthquakesinChile.
=0.05
n1=12
n2=11
df=n1,n2=12,11
Notethatweareperforminga2tailedtest,sowewillusethe
largeroftheteststatisticseitherUorU.
99
11 , 12
69
63 ) 11 )( 12 (
63
147 78 132
147
2
) 1 12 ( 12
) 11 )( 12 (
'
'


critical
U
df
U
U
U
U
U
IMPORTANT:
ThisMannWhitneytableis1tailed.Our levelis0.05.Fora2
tailedtestusinga1tailedtable,youMUSTdividethe level
betweeneachofthe2tails
Sothe levelwelookuponthetableis0.025,orof0.05.
4
69<99
SinceUislessthanU
Critical
,AcceptH
o
.
Thereisnosignificantdifferenceinthemagnitudesofoceanic
versuscontinentalearthquakesinChile(U
69
,p>0.10).
SPSSTestStatistics
a
Magnitude
MannWhitneyU 63.000
WilcoxonW 129.000
Z .186
Asymp.Sig.(2tailed) .853
ExactSig.[2*(1tailedSig.)] .880
b
a.GroupingVariable:Location
b.Not corrected forties.
MannWhitneyUtest(1tailed)
Performinga1tailedMannWhitneytestissomewhatdifferent
thanothermethods.Theappropriateteststatisticisdetermined
usingthefollowingmethod:
UsingdepthofepicenterdataforthesameChileanearthquakes,
a1tailedtestisperformedwiththedatarankedfromlowtohigh
andcontinentalearthquakesasgroup1.
H
o
:Continentalearthquakedepthsarenotsignificantlydeeper
thanoceanicearthquakesinChile.
H
a
:Continentalearthquakedepthsarenotsignificantlydeeper
thanoceanicearthquakesinChile.
Thereforetheteststatisticwillbe:
5
Oceanic Rank
Oceanic
Continental Rank
Continental
75 13 69 10
32 3 99 17
50 9 135 23
38 6 115 20.5
19 1 33 4.5
44 7 92 15.5
33 4.5 118 22
102 19 115 20.5
28 2 92 15.5
70 11.5 89 14
49 8 101 18
70 11.5
180.5
EarthquakeDepths(km)inChile
102>94
SinceUisgreaterthanU
Critical
,rejectH
o
.
Continentalearthquakedepthsaresignificantlydeeperthan
oceanicearthquakesinChile(U
102.5
,0.025>p>0.01).
94
11 , 12
5 . 102
5 . 29 ) 11 )( 12 (
5 . 29
5 . 180 78 132
5 . 180
2
) 1 12 ( 12
) 11 )( 12 (
'
'


critical
U
df
U
U
U
U
U
6
PairedSampletTest
PairedSampletTest
ThisttestisusedONLY whenthedataarerepeatmeasurements
(e.g.measurementattime
1
andtime
2
)orwhensamplesare
pairedinsomemanner.Theequationis:
whereisthemeandifferencebetweenpairedobservations,
andisthestandarddeviationofthepaireddifferences.
Letstestthenullhypothesisthatunemploymentratesin2007
werelowerthanin2008forselectedcities.
n
s
d
t
d

d
d
s
2007 2008 d
LosAngeles 5.0 8.8 3.8
SanFrancisco 4.6 7.0 2.4
WashingtonDC 3.0 4.7 1.7
Bethesda 2.6 4.0 1.4
FortLauderdale 4.1 7.1 3.0
Miami 3.9 7.0 3.1
Chicago 5.0 7.1 2.1
Boston 3.4 5.5 2.1
Detroit 9.1 11.7 2.6
LongIsland 4.4 6.6 2.2
Newark 4.0 6.5 2.5
Camden 4.1 6.8 2.7
Philadelphia 4.2 6.3 2.1
Wilmington 3.5 6.1 2.6
DallasFortWorth 4.2 5.8 1.6
Seattle 3.7 6.1 2.4
Tacoma 4.7 7.2 2.5
n=17 d 2.400
v=171=16 S
d
0.583
UnemploymentRateforSelectedCities
97 . 16
1414 . 0
4 . 2
17
583 . 0
4 . 2

t
t
critical(1)
=1.746
t=16.97>1.746,rejectH
o
.
Unemploymentin2007was
significantlylowerthanin2008for
selectedcities(t
16.97
,p<0.0005).
Thepairedttestdoesnothavetheassumptionofnormality
ofthegroupsorofequalityofvariances.
Thisisbecauseweareusingthepaireddifferences
ratherthantheactualobservations.
Theonlyassumptionisthatthepaireddifferencesare
normallydistributed.
Thistestisconsideredtobefairlyrobust.
7
SpatialDataConsiderations
SpatialSampling
Sampleframe:thelistofallelementswithinapopulation.
e.g.Alltownshipswithinacounty.
Samplingmethod:theruleswhichgovernhowsamples
ofapopulationaretaken.
Thethreemostcommonare:
1. Random
2. Stratifiedrandom
3. Stratifiedsystematic
Randomsamplingisoftenusedwhenitisfairlycertain
thatlocationdoesnotinfluenceindependence.
Stratifiedrandom samplingisoftenusedwhenlocation
doesinfluenceindependenceandthedegreeofinfluence
isknownandcanbemapped.
Stratifiedsystematic samplingisoftenusedwhenlocation
doesinfluenceindependencebutthedegreeofinfluence
isunknownandcannotbemapped.
8
SpecialConsiderationswithSpatialData
1. Modifiablearealunitproblem
2. Boundaryproblem
3. Spatialsamplingprocedures
4. Spatialautocorrelation
1.Modifiablearealunitproblem:
Changesinarealunitsinfluencetestresults.
Crossboundarymigration Nocrossboundarymigration
2.Boundaryproblem
Changesinthestudyareaboundaryinfluencetest
results.
Smallstudyarea,
evenspreadofpoints
Largestudyarea,
clusteringofpoints
3.Spatialsamplingprocedures
Samplingmethodsinfluencetestresults.
Random Stratified,Random Stratified,Regular
9
4. Spatial autocorrelation
Location near each other often (but not always)
influence each other. Non-independence.
These locations have
a greater chance of
being similar since they
are close together.
SpatialDataandNonindependence
Oneandtwosampletestsassumethatthedataare
independent(i.e.oneobservationdoesnotinfluence
another).
Unfortunately,withspatialdataoneobservationoften
does influenceanother.
Forexample,twopondsneareachothermayhave
havefrogsbecausetheybotharelocatedinthe
correctmicroclimate.
ImplicationsofNonindependence
Nonindependencereducestheeffectivesamplesize.
Inflatesthedegreesoffreedom.
Reducesthecriticalvalue.
Artificiallyincreasesthelikelihoodofgettingsignificant
results.
A B
C
Inthisexample,
AandBarestudy
sites.Cisavery
distincthabitat
type.
HabitatCinfluences
theobservation
valuesandmakes
testingbetweenAand
Bdifficult.
Bettertotestbetween
A,B,andC.
10
SpatialUnitSizeandProbabilityProblem
Probabilitiestendtobelargerwithlargerspatialunits.
Theprobabilitythataneventwilloccurishigher
withlargerspatialunits.
Smallarealunitstendtohaveverylowfrequenciesfor
randomeventsunlesstheeventisextremelycommon.
Undertheseconditionsanormaldistributionisalmost
impossibletoattain.
Thechanceofastatehavinga
dotinitishigh.
Thechanceofacountyhavinga
dotinitislow.
SmallFrequencyandSmallSpatialUnitProblem
Frequenciestendtobesmallerwithsmallerspatialunits.
- Thefrequencywithwhichaneventoccursdecreases
asthespatialunitsdecreases,allotherthingsbeing
equal.
21outof50stateshavedots.
(21/50)x100=42%
25outof3140countieshave
dots.(25/3140)x100=0.8%
11
AdditionalIssueswithSpatialData
1. EcologicalFallacy
Interpretationerrorsthatoccurwhenresultsderived
fromaggregatedataareappliedtodisaggregatedata.
Itissomethingakintotryingtodetermine
someonesgradeinaclassbylookingatthe
classaverage.
2.TheProblemofScale
Scaleonlyhasmeaningwithinthecontextofthe
measuringtechniquesappliedandthequestions
beingasked.
Doesitmakesensetomeasurepercentforest
coverto5decimalplaces?Arewecreating
differenceswherenoneactuallyexist?
3.LocationalFallacy
Notallprocesseshaveaspatialexpression.Certain
phenomenonareaspatial.
Forexample,burglarieshaveaspatialcomponent
andcanbemapped.Embezzlementdoesnot.
4.AtomisticFallacy
Anattempttouseindividualordisaggregatedatato
explainaggregatedatawhileignoringthecontextof
theindividuals.
Forexample,ifwenoticethatnooneissmoking
inabar,thenwemayconcludethatpeopleare
smokinglessoritcouldbeasmokefreebar.

Вам также может понравиться