pyrad.util.ratio_bootstrapping#
- pyrad.util.ratio_bootstrapping(nominator, denominator, nsamples=1000)[source]#
Computes a set of samples obtained as sum(nominator)/sum(denominator) where the nominator and the denominator are randomly sampled with replacement.
- Parameters:
nominator, denominator (1D array) – The data points in the nominator and the denominator. Nominator and denominator are not independent, i.e. data point i in the nominator is linked to data point i in the denominator
nsamples (int) – Number of iteration, i.e. number of samples desired
- Returns:
samples (1D array) – the resultant samples