Deviationbeginning

beginning  时间:2021-05-17  阅读:()
BeginningStepsinSPSSKeithE.
EmmertSoadEmmertDepartmentofMathematics,TarletonStateUniversityE-mailaddress:emmert@tarleton.
eduDepartmentofMathematics,TarletonStateUniversityE-mailaddress:semmert@tarleton.
eduContentsChapter1.
FirstStepswithSPSS11.
1.
Introduction11.
2.
EnteringData11.
3.
OpeninganExistingDataset21.
4.
ChangingHowVariablesareListed31.
5.
AnalyzingaDataset41.
6.
CreatingaBoxplot51.
7.
CreatingHistogramsandQ-QPlots91.
8.
StandardizedScoresz-Scores141.
9.
ScatterPlotsandRegression141.
10.
TestingHypothesesaboutPopulationMeansUsingthet-Distribution161.
11.
χ2GoodnessofFit181.
12.
ContingencyTablesorCrossTabulations–TestingforIndependence201.
13.
Two-SampleInference231.
14.
One-WayANOVA27vCHAPTER1FirstStepswithSPSS1.
1.
IntroductionSPSSstandsforStatisticalPackagefortheSocialSciences.
Itwasdevelopedin1968,byNormanH.
Nie,C.
Hadlai(Tex)HullandDaleH.
Bent.
Norman,frustratedwithmainframesoftwarewhichwasinadequateforhisneeds,neededaprogramtoquicklyanalyzevolumesofsocialsciencedatagatheredthroughvariousmethodsofresearch.
TheywroteSPSS,therstofitskind,andtargetedthePC.
Theybegansellingtootherprofessorsatotheruniversitiesandby1974wasmakingover$200,000peryear–withoutmarketing!
1.
2.
EnteringDataWhenyourstopenSPSS,youwillseeawindowaskingyouwhatyouwouldliketodoinSPSS,muchlikethatinFigure1.
Tostartcreatingyourowndataset,selectthe"Typeindata"option.
Figure1.
SplashScreenforSPSSOnceyouclickthe"OK"button,youwillbegivenablankdatatable.
Now,clickontheVariableViewtablocatedatthebottomleftcornerofthewindow.
Hereiswhereyouwilldeclareyourvariables.
Youwillnoticethatthecolumnheadershavechanged.
ThecolumnheadersshouldlookliketheheadersinFigure2Figure2.
VariablesTabforSPSS121.
FIRSTSTEPSWITHSPSSForthepurposesofthistutorial,wewillcreateasimpledatasetwithtwovariables.
Thedatasetwillcontainalistofpeople'sheightandgender.
Tostartenteringyourvariables,typethenameofthevariableintothe"Name"box.
Thedefaultvaluesareloadedintoalltheotherboxes.
Tochangethevariabletype,clickthegreydottedareainthe"Type"box.
ThewindowshowninFigure3shouldopen.
Thisiswhereyoucanselectthevariabletype.
Forourexampleweleave"Height"asanumericandchangethedefaultvalueof"Gender"tobeastring.
Figure3.
EnteringVariablesinSPSSNowthatwehavedeclaredourvariables,wecanstartenteringthedata.
Toaddthedata,clickontheDataViewtablocatedatthebottomleftcorner.
Thefollowingwindowwillappear,whereyoucanaddthedata.
ThewindowwilllookasshowninFigure4Figure4.
EnteringDatainSPSSusingtheDataViewTosavethegivendataset,clickontheFilemenuandchooseSave.
Thefollowingwindowwillappear.
Hereyoucanchoosethelocationofwhereyouwanttosavethedataset.
Bydefaultyourleissavedina".
sav"format.
1.
3.
OpeninganExistingDatasetToopenadataset,openSPSSandthefollowingscreenwillappearasshowninFigure5.
Choose"Openanexistingdatasource.
"ThetextbookcontainsmanydatasetswhicharelocatedontheCD.
Bydefault,theonlydatasetsthatwillbevisiblewillbedatasetsthathavetheleextension".
sav.
"However,manyoftheolderdatasetswillhavethe".
sys"extension.
Toviewthese,justchangethe"Filesoftypes:"drop-downmenusettingto"SYS/PC+"andyouwillbeabletoseethe.
sysles.
1.
4.
CHANGINGHOWVARIABLESARELISTED3Figure5.
OpenaSavedDataSetinSPSS1.
4.
ChangingHowVariablesareListedWhenyoustarttorunanalyses,youwillndthatthevariableswillbelistedbytheirlabelintheordertheyappearonthedataset.
Becausesomedatasetscancontainover100variables,ndingaspecicvariablecanbedicult.
YoucanchangethewaythevariablesarelistedbyusingtheOptionswindow.
ThiscanbereachedbychoosingOptionsundertheEditmenu.
Herewecanchangethedisplaytolistthedatasetsinalphabeticalorder(insteadofle)andtodisplaythe"Names"insteadofthe"Labels.
"Afterchoosingyouroptions,click"OK,"ascanbesseninFigure6.
AwarningaboutthechangingofoptionsintheVariableListgroupwillresetalldialogboxsettingwillbedisplayed.
Justclick"OK.
"Now,whenyourunananalysis,thevariableswillbelistedbytheirnameinalphabeticalorder.
Thisgreatlyspeedsuptheprocessofndingvariables.
Figure6.
OptionsWindowinSPSS.
Changetoalphabeticallistingofvariablesanddisplaynames.
41.
FIRSTSTEPSWITHSPSS1.
5.
AnalyzingaDatasetThisiswherewebegintoperformstatistics.
ClickontheAnalyzemenu.
WewillbeusingtheFrequenciesanalysis,sogototheDescriptiveStatisticssub-menuandselectFrequencies.
.
.
,asshowninFigure7.
Figure7.
SelecttoperformdescriptivestatisticsusingtheFrequencies.
.
.
option.
TheFrequencies.
.
.
optionallowsyoutoanalyzevariablesindividuallyasopposedtoanalyzingtheminrelationwithanothervariable.
Withthistypeofanalysis,youcanmeasureavariable'sindividualpropertiessuchasmean,median,mode,etc.
Tostarttheanalysis,intheFrequencieswindow,movethevariablesyouwishtoanalyzefromtheleftlisttotherightlist.
Thisisdonebyselectingthevariablesfromtheleftlistandclickingtheright-arrowbuttonlocatedbetweenthetwolists.
Ifyouwishtoremoveavariable,simplyreversetheprocessandmoveitbacktotheleftlist.
SeeFigure8.
Figure8.
TheFrequencies.
.
.
dialogwindow.
Onceyouhavechosentherequiredvariablesandsetyourdisplayoptions,clickthe"OK"button.
AnotherwindowwillopenupwiththeoutputsdisplayedinthefollowingformatasshowninFigure9.
Youcansavethisoutputwindowbyclickingonthe"Save"button.
Youcanclosethiswindowoncetheoutputhasbeensaved.
Youcanalsodeletetheoutput,byclickingonthe"Output"optionintheleftwindow,andthenhittingthe"Delete"button.
Ifyouleavethiswindowopen,andrunanotheranalysis,thentheoutputforthatrunwillbestackedundertheexistingoutput.
Ifyouprintthisoutput,then1.
6.
CREATINGABOXPLOT5Figure9.
TheFrequencies.
.
.
results.
alltheanalysisoutputswillbeprinted,soitisrecommendedthatyoudeletetheoutputanalysisfromtheoutputwindowonceyouhavesavedthem.
Fortherestofthissection,youwillneedtochangehowthevariablesarelistedintheanalysiswindows.
Ifyouneedhelp,pleaserefertoSectionFour:Changinghowvariablesarelisted.
Ifyouwishtoseesomebasicdescriptivestatistics,thenchooseAnalyzefollowedbyDescrip-tiveStatisticsfollowedbyFrequencies.
.
.
.
Again,youselectyourvariable(Height)andchoosetheStatistics.
.
.
buttonasshowninFigure10.
Figure10.
TheFrequencies.
.
.
dialog-accessingtheStatistics.
.
.
options.
.
Thiswillopenanewwindow,theFrequencies:Statisticsdialogbox.
CheckMean,Median,Mode,Variance,StandardDeviation,Range,andQuartiles.
Pressthe"Continue"button.
Nowchoose"OK.
"SPSSshouldstacktheresultsbelowyourfrequenciesasseeninFigure12.
NoticethatSPSScalculatesthevenumbersummary,plusx,s,s2,andrange.
1.
6.
CreatingaBoxplotLet'sopenupalargerdataset.
SPSSprovidesuswith"cars.
sav.
"Thereareseveralvariablesinthe"cars.
sav"dataset:mpg,engine,horse,weight,accel(0-60mph),year(1970-1982),origin,cylinder,andlter$.
First,let'createaboxplotformpg.
ChooseAnalyze-DescriptiveStatistics-Explore.
.
.
toopentheExploredialogboxasshowninFigure13.
Goaheadandadd"mpg"totheDependentListandselect"Plots"itheDisplaygroup.
Next,selectthePlots.
.
.
buttonwhichopenstheExplore:Plotsdialogbox,ascanbeseeninFigure14.
Select"Factorlevelstogether"(itshouldalreadybeselected)inthe"Boxplots"groupanduncheck"Stem-and-leaf"inthe"Descriptive"group.
SelectContinueandthenOK.
TheresultswillappearinanoutputwindowandshouldlookliketheimageinFigure15.
Noticethatoneoutlier(observation#330)isplottedasacircle.
61.
FIRSTSTEPSWITHSPSSFigure11.
TheFrequencies:Statisticsdialog-accessingtheadditionaldescriptivestatistics.
Figure12.
TheDescriptives.
.
.
results:Fivenumbersummary,plusx,s,s2,andrange.
Figure13.
TheExplore.
.
.
dialogforexploringdatasets.
1.
6.
CREATINGABOXPLOT7Figure14.
TheExplore:Plots.
.
.
dialogforexploringdatasets.
Figure15.
Theboxplotformpg.
Ofcourse,thisisabitmisleadingsinceitcombinescarsoveraspanof13years.
Perhapsweshouldbreakthemupintosmallerpieces.
Tomakeboxplotsforthempgbaseduponagivenyear,chooseAnalyze-DescriptiveStatistics-Explore.
.
.
toopentheExploredialogboxasshowninFigure16.
NoticethatIhavealreadyadded"mpg"totheDependentList,"year"totheFactorList,andselected"Plots"intheDisplaygroup.
ClickthePlots.
.
.
buttontoopentheExplore:PlotsdialogboxasshowninFigure17.
Choosethebulletfor"Factorlevelstogether"tomakeaseparateBoxplotforeachofthevariablesinthe"DependentList"intheExploredialogbox.
IfthereareseveralvariablesintheDependentList,choosethebulletforDependentstogethertoobtainside-by-sideBoxplots.
SelectContinueandthenOK.
Theresultingside-by-sideboxplotsareshowninFigure18.
81.
FIRSTSTEPSWITHSPSSFigure16.
TheExplore.
.
.
dialogforexploringdatasets.
Figure17.
TheExplore:Plots.
.
.
dialogforexploringdatasets.
Figure18.
Theside-by-sideboxplotsofmpgbaseduponagivenyear.
1.
7.
CREATINGHISTOGRAMSANDQ-QPLOTS9Supposethatyouwishtoviewside-by-sideboxplotsofmpgandaccelerationbaseduponyear.
Theprocedureisvirtuallythesame.
Justaddthe"Accel"variabletothe"DependentList"andclickonthePlots.
.
.
buttontoopentheExplore:Plotsdialog.
IntheExplore:Plotsdialog,makesureyouselect"Dependentstogether"inthe"Boxplots"section.
Theresultingside-by-sideboxplotsareshowninFigure19.
Figure19.
Theside-by-sideboxplotsofmpgandaccelerationbaseduponagivenyear.
Itisinterestingtonoticethatduringcertainyears,'72,'74,'78,'79,and'82,thereareinstancesofcarsthathaveextremelyslowacceleration.
In'78,thereisacarthatreceivedexceptionalgasmileage.
Noticethatthiswasnottheslowestcarthatyear,either(butifyoulookatthedataset,itwasclose).
1.
7.
CreatingHistogramsandQ-QPlotsLet'srstseewhathowahistogramandQ-Qplotfromanormaldistributionlookslike.
TheplotsinFigure20weregeneratedfrom200samplesofarandomvariablewhichfollowsN((2,1.
26492).
NoticethatinFigure20a,weseeahistogram.
Itisunimodal(moundshaped)andsymmetric,bothofwhicharecharacteristicsofanormaldistribution.
Now,inFigure20b,weseeaQ-QPlot.
Mostofthesamplearegroupedinthemiddle(againindicatingsymmetry).
Moreimportantly,mostofthedata(i.
e.
inthemiddle)liesonastraightline.
Thestraightlineisa"perfect"normaldistribution(usingthesamplemeanandstandarddeviation,thatisN(2.
09,1.
2392)),sothecloserwecometothisline,themorelikelywehavestumbledacrossanormaldistribution.
Now,let'scomparesomenon-normalhistogramsandQ-Qplots.
We'llconsidersamplesfromabinomialrandomvariable,binomial(10,0.
2),log-normalwithparameters2and0.
5,andnallyauniformwithparameters1.
8and5.
8.
First,thebinomialrandomvariable.
Figures21aand21barethehistogramandQ-QPlotforthisbinomialrandomvariable.
Noticethatthemeanis=2andthestandardisσ=1.
2649,whichisthe101.
FIRSTSTEPSWITHSPSS(a)HistogramforaNormalRandomVariable(b)Q-QPlotforaNormalRandomVariableFigure20.
HistogramandQQ-PlotforaNormalRandomVariable.
sameasthemeanandstandarddeviationofthenormalusedabove.
Noticethatthehistogramshowsthatthebinomialisabitrightskewedandcertainlynotverysymmetric.
TheQ-QPlotonlylistspointsonintegervalues(duh!
,it'sabinomial!
Itcountssuccesses).
Clearly,thisisnotanormaldistribution.
(a)HistogramforaBinomialRandomVariable(b)Q-QPlotforaBinomialRandomVariableFigure21.
HistogramandQQ-PlotforaBinomialRandomVariable.
Next,thelog-normalrandomvariable,whichisacontinuousrandomvariable.
Figures22aand22barethehistogramandQ-QPlotforthislog-normalrandomvariable.
Noticethatthehistogramshowsthatthelog-normalisadenitelyrightskewedandnotsymmetric.
IntheQ-QPLot,dataisgroupedcloselytogether,justnotthemiddle50%portionofthedata.
Also,ontheendsoftheQ-QPlot,thedatamovessignicantlyawayfromtheline.
Thisindicatespotentialoutliersandisnotusualforanormalrandomvariable.
Again,thisisnotanormaldistribution.
1.
7.
CREATINGHISTOGRAMSANDQ-QPLOTS11(a)HistogramforaLog-NormalRan-domVariable(b)Q-QPlotforaLog-NormalRan-domVariableFigure22.
HistogramandQQ-PlotforaLog-NormalRandomVariable.
Finally,weconsiderauniformrandomvariable,whichisacontinuousrandomvariable.
Figures23aand23barethehistogramandQ-QPlotforthisuniformrandomvariable.
Noticethatthehistogramshowsthattheuniformisadenitelyrightskewedandnotsymmetric.
IntheQ-QPLot,dataisgroupedcloselytogether,justnotthemiddle50%portionofthedata.
Also,ontheendsoftheQ-QPlot,thedatamovessignicantlyawayfromtheline.
Thisindicatespotentialoutliersandisnotusualforanormalrandomvariable.
Again,thisisnotanormaldistribution.
(a)HistogramforaUniformRandomVariable(b)Q-QPlotforaUniformRandomVariableFigure23.
HistogramandQQ-PlotforaUniformRandomVariable.
Onenalcheckisusingoneofthetestsofnormality.
SPSSusesKolmogorov-SmirnovandShapiro-Wilk.
NotethatShapiro-Wilkonlyappliestosamplesizesupto2,000.
Thereareotherteststhatare121.
FIRSTSTEPSWITHSPSSmoreusefulinothersituations.
Itisquitedangeroustousethesetestsonsmallsamplesizes,especially≤10.
TheKolmogorov-Smirnovtestmayhavesomeproblemswithlargesamplesizes,say≥1,000.
Inallcases,theparticularhypothesesbeingtestedareH0:Thedataisfromanormaldistribution.
Ha:ThedataisNOTfromanormaldistribution.
Afailuretorejectindicatesthatthesampleappearstocomefromanormaldistribution.
SeeFigure24.
Forthesamplecomingfromanormaldistribution,theSig.
is0.
200forKolmogorov-Smirnovand0.
411forShapiro-WIlk.
Hence,wefailtorejectH0.
Itappearsthatthesample(baseduponthistest)comesfromanormaldistribution.
Comparethistobinomial,lognormal,anduniform.
Allhavesmallp-values,certainlylessthat0.
05.
Hence,theconclusionisthatthesampledoesnotappeartobefromanormaldistribution.
Figure24.
SummaryofTestsofNormalityFirst,youneedtoopenadataletoanalyze.
Wewillanalyze"EmployeeData.
sav.
"SelectAnalyze→DescriptiveStatistics→Explore.
Selectthevariable"Salary"andaddittothe"DependentList.
"Clickon"Plots.
.
.
"andselect"Histogram"and"Normalityplotswithtests.
"Deselectthe"Stem-and-leaf"box.
SeeFigure25.
Click"Continue"and"OK"toruntheprocedure.
YoushouldobtainFigure25.
Explore:Plots,usedtocreateHistogramsandQ-QPlotsoutputasseeninFigure26.
1.
7.
CREATINGHISTOGRAMSANDQ-QPLOTS13ThehistogramandQ-QPlotareshowninFigures26aand26b.
Noticethatmostofthedataisconcentratedtotheleft.
Thisisclearlyseeninthehistogram.
TheQ-QPlotalsohasadistinctbendinit.
Thesecharacteristicssuggestthatthedataisnotnormallydistributed.
(a)HistogramforSalary(b)Q-QPlotforSalaryFigure26.
HistogramandQQ-PlotforSalary.
Anothersimplevisualcheckistooverlayanormalcurveusingthecalculatedsamplemeanandsamplestandarddeviationontopofyourhistogram.
Ifthedataisnormallydistributed,thentheyshould(mostly)agree.
InthehistogramshowninFigure28a,anormalcurveinalsoplottedwiththesamemeanandstandarddeviationasthedata.
Noticethatthisdoesnotmatchupwellwiththehistogram.
Comparethistothedatawhichwastakenfromanormaldistribution(i.
e.
N(2.
1,1.
26492)atthebeginningofthissection;seealsoFigure20a,thehistogramwithoutthenormalcurve).
ThehistogramwithasuperimposednormalcurveshowninFigure28bhasamuchclosert.
Inordertosuperimposeanormalcurveontoahistogram,openyourdataset,suchas"Employ-eeData.
sav.
"SelectAnalyze→DescriptiveStatistics→Frequencies.
Then,selectthevariable,suchas"Salary"andclickthe"Charts"button.
Selectthe"Histograms"radiobuttonandthenclickthe"Shownormalcurveonhistogram"box.
SeeFigure27.
Figure27.
Frequences:Charts-CreatingHistogramswithNormalCurves141.
FIRSTSTEPSWITHSPSS(a)HistogramwithNormalCurveforSalary(b)HistogramwithNormalCurveus-ingNormalDataFigure28.
HistogramandNormalCurves.
Finally,inFigure29,weseethestatisticaltestsfornormality.
Theextremelylowsignicancelevelof0.
0000indicatesaverystrongrejectionofH0.
Thatis,wearefairlycondentthatthedatadoesnotcomefromanormallydistributedpopulation.
Figure29.
SummaryofTestsofNormalityforSalary.
1.
8.
StandardizedScoresz-ScoresCreatingstandardizedscoresisquickandpainlessusingSPSS.
Openanydatale,suchas"Employ-eeData.
sav.
"SelectAnalyze→DescriptiveStatistics→Descriptives.
Selectavariableofinterest,suchas"Salary"andclickthe"SaveStandardizedValuesasVariables"box,asshowninFigure30.
Anewcolumnofdatawillbecreatedforeachselectedvariable.
1.
9.
ScatterPlotsandRegressionOneoftherstthingsyoushoulddowithanewdatasetistolookatitpictorially.
Ifyouhaveresponseandexplanatoryvariables,thenonesimplegraphisascatterplot.
Openthedataset"customersubset.
sav".
UsingSPSS,selectGraphs→LegacyDialogs→Scatter/Dot.
Selectthe"SimpleScatter"optionintheScatter/Dotdialogboxandclick"Dene".
Forthey-axis,usethevariable"carvalue"andforthex-axisusethevariable"income".
Click"OK".
TheresultscanbefoundinFigure31.
Noticethattheredoesappeartobealineartrendinthedata.
So,perhapsweshouldperformlinearregression.
LinearregressionisquicklyperformedbyselectingAnalyze→Regression→Linear.
Thisopens1.
9.
SCATTERPLOTSANDREGRESSION15Figure30.
SavingSelectedVariablesasz-Scores.
Figure31.
ScatterPlotofPrimaryVehicleStickerPricevsHouseholdIncomeinDollars.
theLinearRegressiondialogbox.
Select"carvalue"fortheDependent(y-variable)and"income"fortheIndependent(x-variable).
Clicking"OK"performstherequestedregression.
Alotofoutputisgenerated,butthemoreinterestingpartisshowninFigure32.
Noticethatthesignicancelevelfortheslopeis0.
000(whichreallymeansthatitisreallysmall.
.
.
i.
e.
ts),forarighttailedtestandpositiveteststatistic.
(b)p-Value=Pr(T>ts),forarighttailedtestandnegativeteststatistic.
(c)p-Value=Pr(T|tts|),wherettsistheteststatistic.
Supposethatyouarestudyingblood-pressurelevels(mmHg)in10womenwhilenotusingandwhileusingaparticulardrug.
ThedataarefoundinTable3Determinewhetherornotthereisadierenceinthemenblood-pressurelevels.
EnterthedataintoSPSSusingvariables"Id,""NoDrug,"and"WithDrug.
"Youcanuseintegerssincedecimalsarenotpresentinanyofthedata.
First,wereallyshouldchecktoseeifthedierencesinthedatacomesfromanormaldistribution.
So,weshouldaddanewvariabletoholdthedierences.
Insteadofcomputingthedierencesbyhand,wemightaswelluseSPSStodothemforus.
ClickonTransform→ComputeVariable.
Inthedialogbox,typebpDiinthe"TargetVariable"box.
Inthe"NumericExpression"box,typeNoDrug-WithDrug.
Noticethatyoucanusethearrowtomovedenedvariablesintothe"NumericExpression"box.
.
.
justsupplythe".
"SeeFigure45OK,nowwehaveournewcolumn.
Testfornormality.
Ataminimum,runaQQPlotandtheNormalityTests.
AHistogramisoftennicetohaveaswell,especiallyifyouoverlayaNormalCurve(doubleclickthehistogramtoeditit).
SelectAnalyze→Descriptives→Explore.
Use"bpDi"inthe"DependentList"box.
Clickthe"Statistics"buttonandcheck"Histogram"and"Normalityplotswithtests.
"InFigures46aand46barethehistogram(withasuperimposednormalcurve)andtheQQPlot.
Thingsappearalittledisturbingtowardstheendsofthedistribution,butnotoverlyso.
Itdoesappearthatwehaveasymmetricdistribution.
InFigure47,wefailtorejectthenullhypothesisthatthevariable"bpDi"followsanormaldistribution.
So,perhapswecanproceed.
241.
FIRSTSTEPSWITHSPSSFigure45.
TheComputeVariabledialogbox.
(a)Histogram(b)QQPlotFigure46.
AQQPlotandahistogram.
Figure47.
NormalityTests.
1.
13.
TWO-SAMPLEINFERENCE25SelectAnalyze→CompareMeans→Paired-SamplesTTesttoopenthe"Paired-SamplesTTest"dialogbox.
Selectthevariables"NoDrug"and"WithDrug"ascanbeseeninFiugre48.
Figure48.
Paired-SamplesTTestDialogBox.
TheresultsfromthisareshowninFigure49.
Thereported(two-tailed)p-Valueis0.
009with9degreesoffreedomandateststatisticof-3.
325.
Wealsohavesomesummarystatisticssuchasthemeanandstandarddeviation.
Hence,baseduponthep-value,werejectthenullhypothesisandconcludethatthemedicationappearstoeectbloodpressure.
Figure49.
ResultsofthePairedTTest.
1.
13.
2.
IndependentSamples.
Herewehavetwogroupsofdataandwishtocomparethemeans.
ThehypothesesareLetDbethemeandierencebetweenobservations,thenthehypothesesareH0:D=0Ha:D=0Theteststatisticist.
Sincethisisatwo-tailedtest,yourp-valueisp-Value=Pr(t>|tts|),wherettsistheteststatistic.
Thingsareabitcomplicatedsincethetestchanges,dependinguponwhetherornotthevariancesareequal(orappeartobeequal!
).
Whenthevariancesareequal,thenitisapooledtest,whennonequal,itisanon-pooledtest.
SPSSiskindenoughtorunLevene'stestforyouandthenreportsbothpooledandnon-pooledresults.
Itisuptoyoutochoosethecorrectresults.
Themainassumption(apartfromindependentvariables)isbothvariablesarenormallydistributed.
261.
FIRSTSTEPSWITHSPSSTable4.
ResultsofVitaminCStudyVitaminC4034434326hlinePlacebo7846646466Asanexample,astudywasconductedontheabilityofVitaminCtopreventcolds.
Atotaloftwentyindividualswereusedinthestudy.
TenindividualswererandomlyselectedtoreceivevitaminCandanothertenwererandomlyselectedtoreceiveaplacebo.
Thenumberofcoldsovera12-monthperiodweretrackedandappearinTable4.
TestthehypothesisthatvitaminCpreventsthecommoncold.
Well,enterthedata,usinginterestingnamesforvariablessuchas"NumberColds"andagroupingvariable,suchas"Grouping.
"Goaheadandlabelthevariable"Grouping"accordingtothefollowingkey:VitaminC1Placebo2Remember,todothis,whilein"VariableView"clickothe"Values"cellforthevarialbe"Grouping.
"Youcanthenentertherequiredlabels.
(a)Independent-SamplesTTestbeforeGrouping(b)Independent-SamplesTTestafterGroupingFigure50.
Independent-SamplesTTestDialogBox.
Figure51.
DeneGroupsDialogBox1.
14.
ONE-WAYANOVA27SelectAnalyze→CompareMeans→Independent-SamplesTTest.
Movethevariable"Number-Colds"intothe"TestVariable(s)"boxandthevariable"Grouping"intothe"GroupingVariable"box.
Notice,asinFigure50a,SPSSlists"Grouping()"inthe"GroupingVariable"box.
Thisisbecauseitisunsurehowtogroupitems.
Clickthe"DeneGroups"buttonandentertheinformationasshowninFigure51.
Now,noticethatthe"Independent-SamplesTTest"nowhasthegroupingvariablelistedas"Grouping(12)"asFigure50bshows.
ClickOKtorunthetest.
Figure52.
ResultsoftheIndependentTTest.
TheresultsoftheindependentTTestisshowninFigure52.
First,Levene'sTestforEqualityofVariancesindicatesthatthevariancesappeartobeequal(Thereportedp-valueof0.
850isratherlarge!
).
Hence,wereportinformationfromthe"EqualVariancesAssumed"rowofthetable.
Theteststatisticis-3.
684,with18degreeoffreedom,andasignicance(2-tailedp-value)of0.
002.
Thus,werejectthenullhypothesisandconcludethatvitaminCappearstowardothecommoncold.
1.
14.
One-WayANOVAOne-wayANalysisOfVAriance(ANOVA)isusedtodeterminewhethertherearesignicantdier-encesbetweenthreeormorepopulationmeans.
ThehypothesesareH0:1=2kHa:Atleasttwomeansaredierent.
Importantassumptionsinclude(1)Thedependentvariableisnormallydistributedineachgroup.
Whenthisfails,eithertransformthedatasothatthenormalityconditionpassesuseanon-parametrictestsuchastheKruskal-WallisTest.
(2)Thereishomogeneityofvariances,thatthepopulationvariancesareequal.
Whenthisfails,theWelch(ormaybetheBrown-Forsythe)testismostlikelythewaytogo.
281.
FIRSTSTEPSWITHSPSSTable5.
CanyousoberupARACAP0.
510.
500.
160.
580.
580.
300.
100.
120.
520.
470.
200.
620.
470.
360.
290.
430.
610.
39-0.
140.
260.
000.
220.
180.
500.
320.
20-0.
350.
440.
530.
210.
310.
200.
500.
150.
160.
420.
460.
100.
040.
430.
340.
02-0.
250.
40(3)Independentvariables(i.
e.
sampleindependentlyorrandomlyassigntheexperimentalunitstothetreatments).
Whenthisfails,gotalktoastatistician.
You'vegotproblems.
Asanexample,ExperimentalandClinicalPsychopharmacology,(Feb2005)studied44malecollegestudents.
Thestudyconcernedhowstimulants(suchascoeeorpoliceabouttoticketyou)helpyousoberupafterdrinking.
Theywereaskedtomemorize40words(20onagreenlistand20onaredlist).
Studentswererandomlyassignedtofourgroups,andstudentsinthreeofthegroupsweregiventwoalcoholicbeveragestodrinkpriortoperformingawordcompletiontask.
StudentinGroupAreceivedonlythealcoholicdrinks,studentingroupAChadcaeinepowderdissolvedintheirdrinks,andGroupARreceivedtwoalcoholicdrinksandamonetaryawardforcorrectresponses.
GroupP(theplacebogroup)weretoldthattheywouldreceivealcohol,butreceivedtwodrinkswithcarbonatedbeverage(nodoubttheyfeltcheated).
Theyallconsumedtheirdrinksandrestedfor25minutesbeforeperformingthewordcompletiontask.
Thereportedscorerepresentsthedierencebetweentheproportionofcorrectresponsesonthegreenlistandtheproportionofincorrectresponsesontheredlist.
SeeTable5.
Testforequalityofmeansunderasignicancelevelof5%.
Figure53.
EnteringDataforanANOVA.
So,wehavetwovariables,thecategoricalvariablewithvaluesP,AR,AC,andA(whichwewillcodeusingnumbers1,2,3,and4)andtheactualnumericresultsofthetests.
Placetheoverallresponsesinavariablelabeled"Responses.
"Createanewvariable,"Factors,"whichisanintegerandcorrespondstothefollowingtableofcategoricalvalues.
1.
14.
ONE-WAYANOVA291234PARACARemember,thatyoucancreatelabelsusingthe"Values"column(whenin"VariableView")whichopensthe"ValueLabels"dialogbox(enter1foraValueandPforaLabel,etc.
).
So,enteronecolumnofdata,sayP,inthe"Responses"columnandplacea1inthe"Factors"column.
Whenyouenterthenextgroupofnumbersinthe"Responses"column,sayAR,usea2inthe"Factors"column.
SeeFigure53.
Figure54.
EnteringtheFactorandDependentVariablesforanANOVA.
(a)One-WayANOVA:PostHocTests(b)One-WayANOVA:OptionsFigure55.
OptionsforanANOVA.
Nowthatthedataisentered,selectAnalyze→CompareMeans→OneWayANOVA.
Enter"Factors"inthe"Factor"box,and"Responses"intothe"DependentList.
"Clickthe"PostHoc"buttonandselectthe"Tukey"checkbox.
Click"Continue"andthenthe"Options"button.
Selectthefollowingcheckboxes:"Descriptive,""Homogeneityofvariancetest,"and"Welch.
"Clickthe"Continue"buttonandthenthe"OK"button.
SeeFigures54,55a,and55b,respectively.
First,let'stalkabouttheOne-WayANOVAoptionsselected.
301.
FIRSTSTEPSWITHSPSSFigure56.
DescriptiveSummariesfromanANOVA.
Descriptive.
ThisgivessummarystatisticssuchasMean,StandardDeviation,etc.
SeeFig-ure56HomogeneityofVariances.
ThisrunsLevene'sTest.
ThenullhypothesisisH0:σ21=σ22σ2kHa:Atleasttwoaredierent.
Wereallywouldprefernottorejectthenullhypothesisinthistest.
SeeFigure57afortheresultsofthistest.
If,however,wedo,thenoneoftheassumptionsforANOVAfailsandweshouldconsiderWelch'sTest,shownintheRobustTestsofEqualityofMeansTableratherthantheANOVATable.
Welch.
ThisrunsadierenttypeoftestforequalityofmeansandisreportedintheRobustTestsofEqualityofMeansTableshowninFigure57bOnlyconsiderthisifthevariancesappeartobedierent,i.
e.
yourejectH0intheHomogeneityofvariancesTest.
(a)HomogeneityofVariancesTablefromanANOVA.
(b)RobustTestsofEqualityofMeansTablefromanANOVA.
Figure57.
TestingforHomogeneityofVariancesandtheRobustTestsofEqualityofMeans.
Noticethatwefailtorejectthenullhypothesisthatthevariancesaredierent.
Hence,Welch'sTest(RobustTestsofEqualityofMeans)isnotrequired.
So,weskipdirectlytotheANOVATable,asshowninFigure58a.
Thisindicatesthereissomesortofdierencebetweenthemeans,wejustdon'tknowwhichoneisdierent.
1.
14.
ONE-WAYANOVA31(a)TheANOVATable.
(b)PostHocTablefromanANOVAFigure58.
ResultsAfteranANOVA.
Post-hoctestsorposterioritestsareonlyconsideredifthereisadierencedetectedbetweenthemeans.
Thesetestsattempttocontroltheexperimentwiseerrorrate.
Ifyourdatameettheassumptionofhomogeneityofvariances,theneitheruseTukey'shonestlysignicantdierence(HSD)orSchee'sTest.
NotethatSchee'stestismoreconservative(lesslikelytodetectdierences)thanTukey'sHSD.
Ifyourdatafailtheassumptionofhomogeneityofvariances,thentryGamesHowellorDunnett'sC.
Again,fromFigure57a,weseethatitappearsthatthehomogeneityofvariancesissatised,souseTukey'sHSD.
TheresultingPostHocTestsTableinFigure58bindicatesthatAisdierentfromP,AR,andAC.
However,noneoftheothercombinationsaresignicantlydierent.

TmhHost暑假活动:高端线路VPS季付8折优惠,可选洛杉矶CN2 GIA/日本软银/香港三网CN2 GIA/韩国双向CN2等

tmhhost怎么样?tmhhost正在搞暑假大促销活动,全部是高端线路VPS,现在直接季付8折优惠,活动截止时间是8月31日。可选机房及线路有美国洛杉矶cn2 gia+200G高防、洛杉矶三网CN2 GIA、洛杉矶CERA机房CN2 GIA,日本软银(100M带宽)、香港BGP直连200M带宽、香港三网CN2 GIA、韩国双向CN2。点击进入:tmhhost官方网站地址tmhhost优惠码:Tm...

简单测评melbicom俄罗斯莫斯科数据中心的VPS,三网CN2回国,电信双程cn2

melbicom从2015年就开始运作了,在国内也是有一定的粉丝群,站长最早是从2017年开始介绍melbicom。上一次测评melbicom是在2018年,由于期间有不少人持续关注这个品牌,而且站长貌似也听说过路由什么的有变动的迹象。为此,今天重新对莫斯科数据中心的VPS进行一次简单测评,数据仅供参考。官方网站: https://melbicom.net比特币、信用卡、PayPal、支付宝、银联...

阿里云服务器绑定域名的几个流程整理

今天遇到一个网友,他之前一直在用阿里云虚拟主机,我们知道虚拟主机绑定域名是直接在面板上绑定的。这里由于他的网站项目流量比较大,虚拟主机是不够的,而且我看他虚拟主机已经有升级过。这里要说的是,用过阿里云虚拟主机的朋友可能会比较一下价格,实际上虚拟主机价格比云服务器还贵。所以,基于成本和性能的考虑,建议他选择云服务器。毕竟他的备案都接入在阿里云。这里在选择阿里云服务器后,他就蒙圈不知道如何绑定域名。这...

beginning为你推荐
2019年全国职业院校技能大赛支持ipad支持ipad支持ipad支持ipad支持ipad支持ipad支持ipad国家标准苹果5C1:山东品牌商品馆
中文域名查询 亚洲大于500m qq云存储 华为云服务 isatap 国内永久免费云服务器 香港cdn 免备案cdn 美国主机代购 wdcp gitcafe 美国php空间 lamp配置 183是联通还是移动 免费高速空间 raid10 双12 web应用服务器 中国联通宽带测速 测速电信 更多