% % epage 242 % % Written by: % -- % John L. Weatherwax 2008-02-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear all; close all; clc; addpath('../../Code/CSTool'); load quakes; mu = mean(quakes); % the sample mean ... % get the bootstrapped estimate of the confidence interval: B = 1000; alpha = 0.1; % <- 0.1 probability of making a type I error % bootstrp-sci: use the function aimed at computing the bootstraped standard confidence interval: qhat = bootstrp_sci( B, @mean, quakes, alpha ); fprintf( 'the mean for the quake data = %10.5f:\n', mu ); fprintf( 'the empirical bootstrap computed estimates percentile interval are given by:\n' ); fprintf( '%10.5f', qhat ); fprintf('\n');