Cosmetic changes only.
This commit is contained in:
parent
4051549b27
commit
2d7bc36fee
@ -9,17 +9,17 @@ function [LoadingRate, StandardError, ConfidenceInterval] = bootstrapErrorEstima
|
||||
if ~isnan(CorrelationFactor)
|
||||
SampleLength = floor(CorrelationFactor);
|
||||
NumberOfBootsrapSamples = 1000;
|
||||
MeanLoadingRatioInEachSample = zeros(1,NumberOfBootsrapSamples);
|
||||
MeanCaptureRatioInEachSample = zeros(1,NumberOfBootsrapSamples);
|
||||
for SampleNumber = 1:NumberOfBootsrapSamples
|
||||
BoostrapSample = datasample(NumberOfLoadedAtoms, SampleLength); % Sample with replacement
|
||||
MeanLoadingRatioInEachSample(SampleNumber) = mean(BoostrapSample) / n; % Empirical bootstrap distribution of sample means
|
||||
MeanCaptureRatioInEachSample(SampleNumber) = mean(BoostrapSample) / n; % Empirical bootstrap distribution of sample means
|
||||
end
|
||||
|
||||
LoadingRate = mean(MeanLoadingRatioInEachSample) * ovenObj.ReducedFlux;
|
||||
LoadingRate = mean(MeanCaptureRatioInEachSample) * ovenObj.ReducedFlux;
|
||||
|
||||
Variance = 0; % Bootstrap Estimate of Variance
|
||||
for SampleNumber = 1:NumberOfBootsrapSamples
|
||||
Variance = Variance + (MeanLoadingRatioInEachSample(SampleNumber) - mean(MeanLoadingRatioInEachSample))^2;
|
||||
Variance = Variance + (MeanCaptureRatioInEachSample(SampleNumber) - mean(MeanCaptureRatioInEachSample))^2;
|
||||
end
|
||||
|
||||
StandardError = sqrt((1 / (NumberOfBootsrapSamples-1)) * Variance) * ovenObj.ReducedFlux;
|
||||
|
Loading…
Reference in New Issue
Block a user