# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- # Exercise 28: # draws = rbinom( 50, size=1, prob=0.5 ) # random draws from a Bernoulli RV print( sum(draws)/length(draws) ) # an estimate of the probability of a *1*