R studio homework help
1.Asampleof12radondetectorsofacertaintypewasselected,andeachwasexposedto100 pCi/L ofradon.Theresultingreadingswereasfollows:105.6,90.9,91.2,96.9,96.5,91.3,
100.1,105.0,99.6,107.7,103.3,and92.4.
(a) Dothedatasuggest that thepopulationmeanreadingundertheseconditionsdiffers from100?Stateandtestappropriatehypothesesusingα=0.05.Clearlystateyour assumptions.
H0: μ = 100 (The population mean reading under these conditions is 100)
Ha:μ ≠ 100(The population mean reading under these conditions differ from 100)
α=0.05 n=12 s=6.1167 mean=98.375
(b) Constructa95%confidenceintervalforthe populationmeanreading.
(c) Supposethat priortotheexperiment,avalueofσ=9.0hadbeenassumed.What samplesizewouldhavebeenappropriate toobtainβ=0.10forthealternativeµ=95?
2.SupposewearetestingH0:µ=5againstH1:µ<5foranormalpopulationwithσ=1.A
randomsampleofsizen=9isavailable from thispopulation.Theztestisusedwithα=0.05,
the rejection region for this test is or, equivalently, .
(a)Onthesamegraph,useRtoplotthesamplingdistribution oftheteststatisticwhen
µ=5andwhenµ=4.2.
(b) Onyourgraph,shadeandlabeltheareathatrepresentstheprobabilityoftypeIerror
[eitherusingRorbyhand].
(c)Onyourgraph,shadeandlabeltheareathatrepresentstheprobabilityof typeIIerror
[eitherusingRorbyhand].
(d) ComputetheprobabilityoftypeIIerrorwhenµ=4.2.ProvidetheappropriateRcodes.
3.Astudywasconductedtoassessthedietoftwo sizemorphsoftheeasternhornedlizard Phrynosomadouglassibrevirostreinwhichthestomachcontentsof45lizardscollectedover timewheredetermined.Theresearch seekstodetermineifthereisanyevidencethatthe meancontentsofmilligramsofdrybiomassofColeoptrainthestomachsofadultfemalesis largerthanthatofadultmalesandyearlingfemales.Foradultmalesandyearlingfemales thevaluesobtainedfrom 24lizardswere256,209,0,0,0,44,49,117,6,0,0,75,34,13,0,90,
0,32,0,205,332,0,31,and0.Foradultfemalesthevaluesobtainedfrom21lizardswere0,
89,0,0,0,163,286,3,843,0,158,443,311,232,179,179,19,142,100,0,and432.Assume thatthesedataareobtained asindependentrandomsamplesfromtherespectivepopulations.
(a) Statethenullandalternativeshypothesesclearly.Carefullydefineallquantities.
(b) Conductatestofhypothesesusingthetwo-samplepooledttest,youmaytakeα=0.05. Inreportingtheresultsyoushouldclearlystatethenecessaryassumptionsforthetest, showthecalculationoftheobservedvalueoftheteststatistic, definetherejection region,presenttheP-value,andinterprettheconclusionsofthetestinthecontextof thisexample.AttachanyRcodesthatyouuse.
(c) Repeatpart(b)forthetwo-sampleunpooledttest.
(d) Repeatpart(b)fortheWilcoxonranksumtest. ComputetheP-valuebysimulating from thepermutationdistribution.
(e) Whichofthethreetestsabovewouldyourecommend? Useappropriategraphs/summary statisticstojustifyyouranswerbasedontheassumptionsofeachtest.
4. SupposewetakearandomsamplefromaN(µ,σ2)population.Considerthefollowingthree estimatorsofσ2:
, ,
|
(a)ConductasimulationstudyinR tocompletethefollowingtablewhenµ=0andσ2=1.
|
PresentyourRcode.
1 2 1 2 1 2
(b) Comparethebiasofthesethreeestimators.
(c)Comparethevarianceofthesethreeestimators.
(d) Comparethemeansquarederrorofthesethreeestimators.
(e)Basedonyourresults,whichestimatorwouldyourecommend?
5.Suppose thatwewishtoestimatetheaverage sulfateconcentration(ppm)observedinground- wateratabackgroundwell.Supposethatitisreasonabletoassumethatthepopulationof sulfateconcentrationmeasurementsingroundwateratthebackgroundwellisdescribedbya normaldistribution. Thereforea100(1−α) %confidenceintervalformeansulfateconcentra- tioncanbeobtainedusingtheusualonesampletinterval.
WhenthesamplestandarddeviationSiscomputedfromaaniidsamplefromaN(µ,σ2)
population,itcanbeshownthat
E(S) =
|
where foru>0istheGammafunction.
(a) Usetheresultabovetoobtainanexpressionfortheexpectedwidthoftheonesamplet
confidenceinterval.
(b) Plottheexpectedwidthof theonesampletconfidenceintervalasafunctionof nwhen
σ=20.[Hint: UsegammatoevaluatetheGammafunctioninR.]
(b) Supposethat σ=20isareasonableapproximation. Ifwewant theexpectedwidth oftheconfidenceintervaltobe10,howmanyobservationsfromthebackgroundwell shouldbetaken?Clearlyjustifyyouranswer.
11 years ago
Purchase the answer to view it
- r_studio_response.docx