% % Written by: % -- % John L. Weatherwax 2007-09-10 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; drawnow; clc; clear; pC = @(x) poisspdf( x, 4 ); pT = @(x) poisspdf( x, 2 ); % Part (a): % num = pC( 4 ) * pT( 0 ); p_c_p_t_4 = sum( pC( 4:-1:0 ) .* pT( 0:4 ) ); % this is P\{ C+T=4 \} num/p_c_p_t_4 % Using the binomial conditional density: (2/3)^4 % Part (b): % num = sum( (0:4) .* pC( 0:4 ) .* pT( 4:-1:0 ) ); num/p_c_p_t_4 % Using the binomial conditional density: 8/3