对于bootstrap的一些粗浅认识

什么是bootstrap?

bootstrap就是从一个原始样本中进行有放回的重复采样,采样大小和原始样本大小相同,采样次数根据计算量而定。从每个重新样的样本中可以计算某个统计量的bootstrap 分布,比如说均值,多个重采样样本的均值构成了原始样本均值的bootstrap分布。在采样完后需要检查待研究统计量的bootstrap分布是不是符合正态分布。此外,统计量的bootstrap标准误等于该统计量bootstrap分布的标准差。

bootstrap分布与样本分布的比较

当我们不知道样本分布的时候,bootstrap方法最有用。bootstrap分布和样本分布的shape相似,因此可以用前者来估计后者。某统计量的bootstrap标准误差等于bootstrpa分布的标准差。

两个概念的比较:

bias:the difference between the mean of its sampling distribution and the true value of the parameter;

bootstrap estimate of bias:the difference between themean of the bootstrap estimate of bias distribution and the value of the statistic in the original sample。Small bias means that the bootstrap distribution is centered at the statistic of the original sample and suggests that the sampling distribution of the statistic is centered at the population parameter.

Trimmed mean的含义:

A trimmed mean is the mean of only the center observations in a data set. In particular, the 25% trimmed mean x25% ignores the smallest 25% and the largest 25% of the observations. It is the mean of the

middle 50% of the observations.

怎样计算95%的bootstrap 可信度区间?

如果统计量的bootstrap分布符合正态分布,且boostrap偏差很小,该统计量的标准误差等于该统计量的bootstrap分布的标准差,根据公式statistic ± t∗SEboot 就可以计算出来该统计量的95%区间,其中t表示在自由度等于原始样本大小情况下t分布的95%可信度对应的统计量大小。需要注意的是,如果boostrap分布不符合正态分布,或者偏差很大,那么不能计算可信度区间。

如何用bootstrap比较两个样本的均值?

当两个样本都不符合正态分布,而且不是很大时,可以采用bootstrap重采样的方法,每次重采样都计算两个重采样样本的均值差异,重复N次,看样本差异的分布。如果符合正态分布,则可以根据正态分布计算概率和差异的可信度区间。

bootstrap分布是否受到采样次数的影响?

当重采样次数很大时,来自同一个样本分布的bootstrap分布基本上相同。然而,bootstrap分布受到样本的影响很大,特别是样本量很小时,bootstrap分布会差异较大,这种情况下从bootstrap分布更多反映的是样本的特征,而不是样本分布,根据它得到的总体分布的推论需要注意。此外,bootstrap的方法不太适合用来计算中位数或者分位数的分布,除非样本很大。(Unless you have expert advice or undertake further study, avoid bootstrapping the median and quartiles unless your sample is rather large)

bootstrap percentile confidence interval和bootstrap t confidence interval的比较

先说bootstrap percentile confidence interval的概念,它是指某统计量的bootstrap分布的2.5%和97.5%的间距。两种可信度区间的应用条件不一样,当bootstrap distribution近似符合正态分布,而且bias很小的时候,一般用t可信度区间,而如果不符合正态分布,但是bias很小时,只能够用bootstrap percentile 可信度区间。也就是说,用前者的时候不一定能够用后者,而能够用后者的时候肯定能够用前者。如果最终得到的两个区间不是很一致,则不推荐使用任何一种。

当上面两种可信度区间都不可用时,该用哪种可信度区间呢?下面是两种可以使用的可信度区间:BCa and tilting interval.

The bootstrap bias-corrected accelerated (BCa) interval is a modification of the percentile method that adjusts the percentiles to correct for bias and skewness.

The bootstrap tilting interval adjusts the process of randomly forming resamples (though a clever implementation allows use of the same resamples as other bootstrap methods).

The BCa method requires more than 1000 resamples for high accuracy. Use 5000 or more resamples if the accuracy of inference is very important. Tilting is more efficient, so that 1000 resamples are generally enough. Don’t forget that even BCa and tilting confidence intervals should be used cautiously when sample sizes are small, because there are not enough data to accurately determine the necessary corrections for bias and skewness.

参考自:Bootstrap Methods and Permutation Tests by Tim Hesterberg et al.

发表评论

匿名网友