• We are pleased to announce that the winner of our Feedback Prize Draw for the Winter 2024-25 session and winning £150 of gift vouchers is Zhao Liang Tay. Congratulations to Zhao Liang. If you fancy winning £150 worth of gift vouchers (from a major UK store) for the Summer 2025 exam sitting for just a few minutes of your time throughout the session, please see our website at https://www.acted.co.uk/further-info.html?pat=feedback#feedback-prize for more information on how you can make sure your name is included in the draw at the end of the session.
  • Please be advised that the SP1, SP5 and SP7 X1 deadline is the 14th July and not the 17th June as first stated. Please accept out apologies for any confusion caused.

April 2022 CS1B Qu 2v

User_111995

Keen member
Hi,
In CS1B paper - April 2022 question 2v it asks you to "determine an estimate of the standard error of the sample mean using bootstrap with a bootstrap sample size of 10,000".

When answering the question, using what we know about calculating the standard error from question iv) (Standard_error = sd(y)/sqrt(length(y)) I calculated the standard error using the following code:
set.seed(12345)
bm<-rep(0,10000)
for (i in 1:10000)
{bm<-sd(sample(y, length(y), replace=TRUE))/sqrt(length(y))}
mean(bm)
# 0.4264077

However, in the examiners report they do the mean of the sample and then take the standard deviation like so:
set.seed(12345)
nsim = 10^4
ybar.sim = numeric(nsim)
for (i in 1:nsim){
y.sim = sample(y, replace=T)
ybar.sim = mean(y.sim)
se.boot = sd(ybar.sim); se.boot
# 0.4318923

Is the standard deviation of the mean of a bootstrap sample the same as the standard error? I've tried googling and I've only found similar code to how I answered the question. Would someone please be able to explain how my code is not calculating the se?

Thank you,
Lily
 
I think I answered my own question and the standard error is the sampling statistic's standard deviation. Since we're bootstrapping the sampling mean we can just take the standard deviation of the sample mean.
 
The standard error of the estimator of the mean is the standard deviation of the estimator - hence they calculate the standard error of the bootstrap distribution of the means.

However, whilst the standard error of each mean is equal to \(S/\sqrt{n}\) there is no reason why the mean of these should be equal to the standard deviation of the distribution of the means (though we'd certainly hope they'd be similar).

So whilst the examiners awarded some marks for this approach, it did not receive full marks.
 
Back
Top