%Sums and products of experts
clear; clf; hold on;
dx=0.1; x=-5:dx:15;
%y1=pdf('chi2',x,4);
%y2=pdf('norm',x);

for shift=0:9
    y(:,shift+1)=exp(-(x-shift).^2./2)./sqrt(2*pi);
    plot(x,y(:,shift+1),':');
end

sy=sum(y,2); sy=sy./sum(sy*dx);
plot(x,sy,'r')
py=prod(y,2); py=py./sum(py*dx);
plot(x,py,'g')
