% % 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. % %----- % Part (a): p = 0.001*1; PN1 = nchoosek(100,0)*(p^0)*((1-p)^(100)) + ... nchoosek(100,1)*(p^1)*((1-p)^(99)) + ... nchoosek(100,2)*(p^2)*((1-p)^(98)) % Part (b): l = 0.1; PN2 = exp(-l) + exp(-l)*(l^1) + exp(-1)*(l^2)/2