% % Written by: % -- % John L. Weatherwax 2007-07-01 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clc; format rat; P_F = nchoosek(13,8) * nchoosek(39,18) / nchoosek(52,26) fprintf("%10.6f\n",P_F); P_EF = nchoosek(13,3) * nchoosek(52-13,10) * nchoosek(10,2) * nchoosek(52-13-10,11) / (nchoosek(52,13) * nchoosek(39,13)) fprintf("%10.6f\n",P_EF); P_E_G_F = P_EF / P_F fprintf("%10.6f\n",P_E_G_F); % the "second" way to work this problem: % % S_F = nchoosek(13,8) * nchoosek(39,18) * nchoosek(26,13) * nchoosek(26,13); % S_EF = nchoosek(13,8) * nchoosek(39,18) * nchoosek(26,13) * nchoosek(5,3) * nchoosek(21,10); % S_S = nchoosek(52,13) * nchoosek(39,13) * nchoosek(26,13); % P_F = S_F / S_S % P_EF = S_EF / S_S % S_EF/S_F % = 0.33913