% % Written by: % -- % John L. Weatherwax 2009-04-21 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; drawnow; clear functions; rehash; clc; n = 9; p=1; beta_hat = 0.8; alpha = 0.05; y10 = 4; sum_y2 = 216 - y10^2; % our confidence interval in "y_11": % ci_y11 = beta_hat*y10 + [ -tinv( 1-0.5*alpha, n-2 ), +tinv( 1-0.5*alpha, n-2 ) ] * sqrt( 1 + y10^2 / sum_y2 ) tinv( 1 - 0.5*alpha, n-2 ) ci_z11 = ci_y11 + 100