function [] = chap_4_prob_15() % % Written by: % -- % John L. Weatherwax 2007-04-02 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; % compute P{X=1}: % P_X_1 = 11/66 % compute P{X=2}: % k = 2:11; pt1 = (12 - k)/66; pt2 = 11./(54+k); P_X_2 = sum( pt1.*pt2 ) % compute P{X=3}: % P_X_3 = 0.0; for k=2:11, jvals = [ 2:(k-1), (k+1):11 ]; % the j indices without the index k pt1 = (12 - jvals)/66; pt2 = (12 - k)./(54 + jvals); pt3 = 11./(42+jvals+k); P_X_3 = P_X_3 + sum( pt1 .* pt2 .* pt3 ); end P_X_3 P_X_4 = 1 - P_X_1 - P_X_2 - P_X_3