View Source Statistex.Robust.Bootstrap (statistex_robust v0.1.0)

Provides a method for estimating the original data range from a sample using bootstrapping with extrapolation. This approach generates resampled data, calculates the min and max values for each resample, and applies a percentage-based extrapolation to estimate a wider range than the sample might initially suggest.

Example

iex> data = [57, 57, 57, 58, 63, 66, 66, 67, 67, 68, 69, 70, 70, 70, 70, 72,
...>         73, 75, 75, 76, 76, 78, 79, 81]
iex> n_resamples = 1000
iex> extrapolation_percentage = 0.10
iex> Statistex.Robust.Bootstrap.extrapolate(data, n_resamples, extrapolation_percentage)
{51.3, 89.1}

Summary

Functions

Performs bootstrapping with extrapolation to estimate a wider range for the original data based on the provided sample.

Estimates range using extrapolate/3 for a specified column (index) of a matrix.

Functions

Link to this function

extrapolate(data, n_resamples, extrapolation_percentage)

View Source

Performs bootstrapping with extrapolation to estimate a wider range for the original data based on the provided sample.

  • data: A list of numbers representing the sample data.
  • n_resamples: The number of bootstrap resamples to generate.
  • extrapolation_percentage: The percentage of extrapolation to apply on the lower and upper bounds.

Returns a tuple {extended_min, extended_max} representing the estimated range with extrapolation applied.

Link to this function

extrapolate(matrix, n_resamples, extrapolation_percentage, index)

View Source

Estimates range using extrapolate/3 for a specified column (index) of a matrix.