% data: 7x heads, 1x tail
% posterior = p(\theta|data) (see slide 26)
% posterior = Beta(\theta|5 + 7, 5 + 1)
close all;
x = 0:0.001:1;
figure; 
area(x,betapdf(x,5+7,5+1));
axis([-0.25 1.25 0 5]); xlabel('\theta');ylabel('p(\theta)'); title('posterior');
