#C3.txt, Jan. 29, 2015, Dr. Z.'s Experimental Mathematics #Class (RU) Help:=proc(): print(` S(N,k) , MS(N,k,M) `): end: #S(N,k): a public opinion survey among the first N pos. #integers, to determine the ratio of even integers #using a random sample of k of them S:=proc(N,k) local ra,i,tot,c: ra:=rand(1..N): tot:=0: for i from 1 to k do c:=ra(): if c mod 2=0 then tot:=tot+1: fi: od: tot/k: end: #MS(N,k,M): running S(N,k) M times and recording #the smallest estimate and the largest MS:=proc(N,k,M) local ma,mi,i,cu: ma:=0: mi:=1: for i from 1 to M do cu:=S(N,k): if cu>ma then ma:=cu: fi: if cu