% % Written by: % -- % John L. Weatherwax 2008-02-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear all; close all; N_SAMPS=1e5; % this beta distribution takes a while to sample: % alpha = 3; beta = 3; data = rubinstein_beta(alpha,beta,N_SAMPS); [N,h] = hist( data ); figure; bar( h, N/(h(2)-h(1))/N_SAMPS, 1, 'w' ); %saveas( gcf, 'prob_4_7_pt1', 'epsc' ); % this beta distribution is quicker to sample: % alpha = 0.5; beta = 0.5; data = rubinstein_beta(alpha,beta,N_SAMPS); [N,h] = hist( data ); figure; bar( h, N/(h(2)-h(1))/N_SAMPS, 1, 'w' ); %saveas( gcf, 'prob_4_7_pt1', 'epsc' );