Suppose that you have a limited amount of data from which to obtain estimates of statistics for a population. The sampling distribution for those estimates can be approximated by drawing new samples from the original data and then computing statistics from each sample. This process is called bootstrapping and can be performed in the Wolfram Language with RandomChoice.
Assuming the original dataset is representative of the larger population it came from, then the resampled values should behave like a sample from the original population. Statistics of a sample from the original dataset should thus simulate sample statistics for the population.
Use Skewness to compute the skewness of the original data:
Here, Table is used to iteratively compute the skewness values for 1000 resampled datasets:
You can use Histogram to visualize the sampling distribution for the skewness values of the 1000 resampled datasets:
Use Quantile to obtain a 95% confidence interval for the sample skewness:
It is often useful to obtain parameter estimates from a dataset, under the assumption that it follows a given distribution. For example, you may wish to use maximum likelihood to estimate the α and β parameters for the data generated from the gamma distribution.
You can obtain the log-likelihood function for the entire dataset by using FindDistributionParameters:
You can now bootstrap the statistics for the parameter estimates by replacing the data with a resampling of values from the original dataset. This can be done using RandomChoice to get the resampled dataset:
Use Table with params to generate 100 estimates for α and β: