% % 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; theta_hat = 0.6; percent = 0.95; alpha = 1 - percent; u_lambda_2 = norminv( 1-alpha/2, 0, 1 ); % <- the "percent" point of the standard normal % all forecasts are the same: z_101_l = 26; ls = 0:8; % <- this is the value of l - 1 stds = u_lambda_2 * ( 1 + ls * ( 1-theta_hat )^2 ).^(1/2); [ [0:8] + 1; z_101_l - stds; z_101_l + stds ]