% this program calculates the the probebility that m = 3 function[probthree] = prob3() probthreem = zeros(5,5,5,5,5,5); for i = 1:5 for j = 1:5 for k = 1:5 for l = 1:5 for m = 1:5 for n = 1:5 A = [i,j,k]; f = [l/100,m/100,n/100]; probthreem(i,j,k,l,m,n)= probability(A,f); end end end end end i end probthree=sum(probthreem(:))/((25)^3);