Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following data that represents a random sample of the monthly rainf

ID: 3261020 • Letter: C

Question

Consider the following data that represents a random sample of the monthly rainfall in Liverpool, England in cm taken from all possible months going back its founding: 0.43, 4.89, 5.29, 5.16, 0.59, 7.50, 4.48, 6.22 (a) Create a QQ plot of the data. Do you think it is reasonable to assume that the population distribution is normal? Explain your answer. (b) Regardless of your answer to (a), use R to perform the bootstrap with 2000 resamplings to create a 90% CI for . Since answers will dier for this question, it is critical that you show your R code and output to get full credit. (c) Regardless of your answer to (a), assume the population distribution is normal and use that fact to create a 90% CI for . (d) Compare your answers to parts (b) and (c). Which one do you think is more correct, and why?

Explanation / Answer

x=c(0.43, 4.89, 5.29, 5.16, 0.59, 7.50, 4.48, 6.22)
y=rnorm(8,mean(x),sd(x))
qqplot(x,y)
m=numeric(2000)
for (i in 1:2000)
{
  
m[i]=sum(sample(x,4,replace=TRUE))/4
}
m
quantile(m,.05)
quantile(m,.95)

output

> x=c(0.43, 4.89, 5.29, 5.16, 0.59, 7.50, 4.48, 6.22)
> y=rnorm(8,mean(x),sd(x))
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Error during wrapup: evaluation nested too deeply: infinite recursion / options(expressions=)?
> qqplot(x,y)
> m=numeric(2000)
> for (i in 1:2000)
+ {
+   
+ m[i]=sum(sample(x,4,replace=TRUE))/4
+ }
> m
[1] 4.1750 4.9150 5.5400 4.0725 5.7425 3.8125 4.0825 4.4250 4.2750 2.8600 4.8675
[12] 4.5475 4.9775 2.8075 3.9125 5.8425 4.8600 5.1600 2.7050 3.1400 5.6900 4.1050
[23] 2.6250 2.6650 3.7125 4.0050 3.7125 3.3650 1.6250 4.5475 3.4525 3.8725 4.6975
[34] 2.7950 6.1950 5.7850 2.6975 3.7750 6.1600 3.9500 4.3475 4.9900 5.8725 4.2075
[45] 5.6075 4.0450 4.0050 5.3375 5.0900 4.8675 4.2475 4.3475 5.1175 4.4400 2.8000
[56] 5.6075 2.6975 1.7650 4.5675 4.6025 5.0175 2.7050 3.0725 2.6650 4.4400 4.2425
[67] 4.6500 4.8275 3.6775 1.5450 4.9900 4.1125 5.9900 4.4675 3.4525 4.7600 4.8600
[78] 4.8275 4.5350 4.2750 5.8400 6.0750 3.0725 5.8100 4.3250 5.7550 5.6225 6.0100
[89] 3.6775 5.9550 5.0900 5.2200 4.1125 4.5275 1.5225 2.6600 4.4800 4.0100 3.8400
[100] 4.8000 4.5950 4.1075 4.9900 4.4250 4.8000 6.1050 3.0600 4.8675 4.0450 4.2475
[111] 5.6425 5.0875 5.4050 3.9825 1.8775 5.1200 5.3575 4.8000 5.2875 4.0425 6.2075
[122] 4.5625 4.5350 4.2150 4.0450 2.7950 4.5075 6.0425 5.0175 3.9425 4.4325 5.4050
[133] 5.1200 3.9150 4.6275 4.0450 6.6275 4.0050 5.7550 4.0050 4.7600 4.2750 2.5975
[144] 4.1050 5.3375 4.3150 5.1925 3.7725 3.9825 6.5275 4.4675 3.6375 4.3925 6.2750
[155] 3.9825 3.8800 4.3925 5.7100 6.0425 4.5625 5.2875 4.9550 2.6250 5.3575 2.5575
[166] 3.6775 4.6850 3.4600 6.2625 5.9550 4.7525 3.3925 5.8725 4.1050 4.4675 4.5350
[177] 4.0100 6.2950 3.9425 3.2900 6.2950 3.7800 3.9025 4.2150 3.3800 4.2475 3.4200
[188] 6.2950 5.1875 5.9425 4.1050 3.0925 3.6850 6.0100 4.2150 2.8675 3.9650 5.2200
[199] 4.0150 3.8400 4.2475 3.8750 3.1000 2.6650 5.0550 3.0725 4.3925 3.7125 3.0925
[210] 3.3650 3.1325 3.7400 5.1325 3.1000 1.5450 5.8725 2.8275 5.4575 4.5400 5.4525
[221] 5.9750 3.9750 4.0500 5.1575 4.6350 2.6650 4.4400 2.9925 4.6275 5.5750 6.2950
[232] 5.4525 3.0325 2.9300 4.0150 5.4900 4.6275 2.4950 3.1325 5.1250 3.7250 6.3075
[243] 4.4800 4.1075 5.1800 4.6025 5.2875 1.6650 2.6375 4.4950 4.9225 5.6100 4.6575
[254] 3.6100 4.5275 4.8275 6.2625 3.9025 2.6975 5.6100 4.9550 5.9425 4.6975 6.2075
[265] 4.0100 5.4900 4.9150 6.3075 2.9000 4.4675 5.5075 3.8750 4.8000 4.3475 3.8150
[276] 3.9825 2.7000 5.4125 5.7100 5.3225 2.9300 5.1475 2.4550 4.4800 4.9225 4.5075
[287] 4.2225 5.2250 5.1875 4.0725 7.1800 2.5975 4.2750 6.2750 2.7600 2.5975 4.4325
[298] 4.0050 5.3500 5.4575 4.0750 6.3950 5.4375 2.7675 3.6725 5.0925 4.0050 4.6850
[309] 5.2200 2.8675 6.4250 4.4325 5.7425 5.7550 5.8400 5.6550 3.8400 4.9775 6.5950
[320] 2.7675 4.4675 5.1875 3.9750 3.9150 4.2075 5.7225 4.0150 3.3800 5.4375 5.1200
[331] 5.4575 2.2775 2.8075 3.3925 5.7100 6.3950 5.7425 3.7725 5.6075 4.0150 5.3225
[342] 4.1750 1.4425 5.5400 5.7450 5.5525 4.3925 4.4250 4.9550 4.7525 5.1875 3.0725
[353] 2.9075 5.7100 4.2150 4.1125 3.9025 4.0050 6.2625 5.7725 2.9700 3.1725 5.7100
[364] 6.0925 4.1750 4.3925 6.1925 5.0925 4.8600 6.4250 4.4950 4.8275 4.9000 4.8000
[375] 4.8275 5.6700 4.0050 5.9425 6.8600 4.2150 1.6525 4.1475 5.1875 4.5475 6.8600
[386] 5.9750 5.5525 3.0925 4.5475 4.7600 4.2150 1.4825 2.7600 3.8400 4.5275 2.6575
[397] 5.1875 5.4900 5.7850 5.6775 6.0750 5.9550 4.2075 5.2875 4.1475 5.5200 4.8000
[408] 5.5400 4.0050 5.8725 4.5275 2.8075 5.6100 5.4575 6.1925 3.6850 4.0100 5.8400
[419] 5.1875 4.6575 4.6575 2.1975 3.9125 2.2375 3.7400 2.8075 3.1400 5.1800 6.0925
[430] 3.2500 2.5575 2.7050 3.0600 5.4900 3.7100 3.9825 1.6525 5.7100 5.1200 4.3925
[441] 3.6450 6.2625 2.8675 3.1725 4.7850 5.4900 0.5100 1.9175 3.0325 4.8600 3.1000
[452] 4.6975 4.1050 4.8850 1.6450 5.2900 5.5525 2.6975 2.7000 5.1175 5.7725 3.9150
[463] 6.3300 4.0100 3.6775 5.5400 4.8600 5.0550 4.0100 3.7725 5.5225 4.2750 4.2075
[474] 5.3900 4.5475 3.7800 3.4600 4.7600 4.6975 5.9425 2.1975 3.9825 2.9300 1.5225
[485] 3.0725 4.9000 4.6975 5.0225 4.0450 6.3625 5.2900 5.5075 4.2075 6.2625 4.5950
[496] 5.1575 3.2500 5.9425 3.2100 3.7725 5.6100 4.0050 4.7525 4.4400 5.2550 1.6925
[507] 5.8750 3.9025 3.9425 5.1875 3.4525 5.5075 5.2875 5.7225 4.3150 3.6100 3.7400
[518] 5.5425 4.7850 5.0575 4.5625 5.3225 4.9550 5.7725 5.1800 3.1000 4.4950 3.7800
[529] 5.0225 5.4525 4.6575 5.9425 3.1000 2.5975 4.0450 5.7100 2.7600 4.7525 5.6075
[540] 2.9700 4.5675 5.7725 3.9125 4.3250 4.6850 3.7800 4.8550 5.6550 4.9550 4.6025
[551] 4.1075 1.4825 5.2200 3.4600 5.5550 4.1075 3.2900 3.8125 3.9750 3.6700 4.0450
[562] 4.3650 5.2550 3.5075 4.9775 4.5950 6.2950 2.8350 2.9700 5.7325 3.7725 3.0925
[573] 3.4200 5.3575 3.9425 1.4825 5.1250 4.9575 4.8600 5.1875 4.8000 1.6925 3.1000
[584] 5.2225 3.2100 1.6525 3.1000 3.6775 2.8000 4.9550 1.7250 2.6650 1.5450 3.1400
[595] 5.1325 4.6975 4.6350 4.2750 3.7725 2.9075 5.0850 5.3375 6.4250 3.9500 2.8000
[606] 4.4800 4.3150 3.9825 4.8000 4.6675 4.4275 1.4825 4.0050 5.0925 4.0825 6.2950
[617] 5.2200 4.4250 1.9175 4.2225 5.5750 5.6400 2.8000 3.7800 2.9700 5.8725 3.9825
[628] 1.6850 4.2225 4.3375 3.8075 2.6575 3.7125 2.6250 6.0750 5.1875 3.3925 2.6975
[639] 5.7725 2.5575 4.4675 3.6775 5.3200 4.5475 3.0600 4.2425 4.4800 4.3250 3.9150
[650] 1.7325 2.6575 5.8100 2.6575 5.4225 3.0325 4.6350 5.4375 4.4325 1.5850 3.9025
[661] 4.8000 3.3525 3.6375 4.0150 2.8000 2.5975 5.9425 4.0450 5.9425 4.0725 5.4125
[672] 1.4425 4.8275 4.0825 3.7400 2.8675 3.2500 5.9425 2.7375 5.6550 4.3475 2.8075
[683] 4.1475 4.5675 4.6675 5.5750 5.0850 3.7725 4.2150 2.6600 4.5675 2.7600 4.4325
[694] 4.5350 5.1575 3.0600 2.7600 4.0450 4.9875 3.9500 5.3375 3.8800 4.5950 5.1325
[705] 5.8725 4.6275 4.6350 5.2875 4.0150 4.3150 4.8600 4.1750 5.6075 2.7675 4.0100
[716] 4.8000 3.1400 5.3575 4.4950 4.5625 3.3525 3.8725 4.6675 2.6375 5.0250 4.8000
[727] 2.7000 4.3925 6.3300 3.7400 4.6025 3.6450 4.0725 4.6575 5.2350 4.8550 5.4900
[738] 3.6700 1.6525 5.1250 2.2375 3.2900 3.2100 5.2200 5.2200 2.7950 5.9900 5.9425
[749] 4.6975 2.8675 5.2200 3.7800 2.7000 4.0425 5.2875 3.6850 4.7850 4.0725 4.5075
[760] 3.3800 4.6575 3.8825 5.4375 1.6250 1.4825 4.2475 4.1450 4.4250 2.2775 5.8725
[771] 5.9750 4.8000 4.9550 4.8000 5.8400 4.6675 2.9075 6.0750 3.3800 2.9925 5.6400
[782] 5.5400 2.8000 2.7375 3.5700 5.1875 5.9875 6.1925 5.4575 3.8800 3.2900 4.5625
[793] 4.6975 5.6400 3.9100 1.6450 4.3925 2.6975 6.1925 3.9125 5.6075 5.3375 4.2750
[804] 5.4400 3.0325 6.2750 5.8400 2.7675 5.2550 4.5950 4.2150 2.7600 4.3775 5.1250
[815] 4.0150 3.9750 2.2775 4.3250 4.0825 2.9000 4.1050 4.6575 2.7000 4.4325 4.8275
[826] 5.5400 4.5350 3.9425 3.8075 5.6400 4.2225 4.9875 4.5950 5.2200 4.9000 5.8725
[837] 4.8525 5.8725 3.9825 3.9100 4.4950 2.2775 5.4525 4.2225 4.5350 3.3525 4.9225
[848] 5.6075 4.0450 4.6575 4.4800 6.2950 2.7000 5.5075 4.6275 3.8125 4.6675 4.2475
[859] 5.0900 4.4800 4.6350 6.0925 5.6100 3.3925 5.8725 1.7325 5.1575 5.1475 3.2500
[870] 4.6350 3.7250 5.7100 2.6975 3.8075 6.8475 5.0925 4.3775 3.2500 2.9400 4.1050
[881] 5.9425 1.5450 3.9150 3.8800 3.8475 5.8725 5.3900 4.4950 5.0925 2.6375 4.8200
[892] 4.3475 3.7400 2.9075 4.3650 1.5850 4.4275 4.5625 5.8750 2.5975 5.8725 5.7550
[903] 3.9500 3.9825 3.0325 3.7800 4.8600 5.1200 3.2500 4.8875 3.8400 5.7100 1.6525
[914] 4.0100 2.6650 5.1875 5.2225 2.6650 4.4950 4.5475 1.9575 5.5750 4.0750 3.8475
[925] 4.2425 4.0050 3.6700 6.2950 2.7600 3.8800 4.4950 2.2375 5.3225 2.8400 6.3625
[936] 4.1050 3.3525 4.9000 4.2150 4.3650 3.6775 1.5225 5.0175 3.0725 4.1050 3.8425
[947] 4.2075 5.1175 5.2875 4.0175 4.7725 4.4400 4.0725 4.8875 2.6650 4.8275 2.9300
[958] 4.8200 3.7800 4.2475 4.2750 5.1200 4.2475 5.1900 6.0100 5.3900 4.5075 5.6075
[969] 4.0450 5.0850 2.8000 4.4250 4.4950 4.5625 5.4525 3.0325 6.6275 1.5225 5.0925
[980] 5.6100 3.9425 1.6525 4.5400 4.3375 4.0450 1.6850 5.1175 5.5075 5.4525 6.3625
[991] 5.6400 4.5400 6.0100 2.7050 4.9150 2.7950 4.0425 3.3125 5.4225 5.0850
[ reached getOption("max.print") -- omitted 1000 entries ]
> quantile(m,.05)
5%
2.533
> quantile(m,.95)
95%
6.075

as the qq plot is not straight line data is not normal

for c.i. we take middle 90% of the set conatinig mean of all samples

by normal approximation c.i. is

> qnorm(.05,m1,s)
[1] 0.1604666
> qnorm(.95,m1,s)
[1] 8.479533
[.1604666,8.479533]

here we are taking the .05 and .95 th quantile of the normal distribution to get the c.i.

the one with bootstrap method is better since we are not assuming any distribution

but next case we are using normal when it is not normal

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote