% % epage 241 % % pure empirical booststrap standard confidence interval for the second moment % % 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 forearm; % get the standard percentile interval for the sample second moment: % technically "var" is not the sample second moment but for this exercise the approximation is OK % the cstoolbox function "mom" didn't seem to work fn = @var; B = 1500; alpha = 0.1; qhat = bootstrp_sci( B, fn, forearm, alpha ); fprintf( 'the variance for the forearm data = %10.5f:\n', var(forearm) ); fprintf( 'the empirical bootstrap computed estimates percentile interval are given by:\n' ); fprintf( '%10.5f', qhat ); fprintf('\n');