function [] = chap_4_prob_4() % % 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; format rat; % create the factorial fractional part: p_x_i = [] for ii = 5:10, p_x_i = [ p_x_i, factorial(ii-1)/factorial(ii-5) ]; end % % multiply in by the fixed constant: p_x_i = (5/(10*9*8*7*6))* p_x_i; % display these probabilties: p_x_i % check we sum to 1.0: sum(p_x_i)