% % problem 241 % example 211 % % 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; % our alternative H_1 hypothesis: mualt = 10:120; % our "critical value" used in determining whether to reject H_0 or not: cv = 1.645; % in terms of physical variables of H_0 this translates into mu_0 = 45; sigma_0 = 15; pcv = mu_0 + cv*sigma_0; % the probability of a type II error (as a function of \mu) is then: pII = normcdf( pcv, mualt, sigma_0 ); figure; plot( mualt, pII, '-rx' ); axis tight; grid on; title( 'the probability of a type II error' ); xlabel( '\mu' ); ylabel( 'probability' ); saveas( gcf, 'ex_6_2_p_type_II_error', 'epsc' );