Chapter 5: priors in slope and angle

To see the prior over slope that results from assigning a uniform prior over line-angle, we perform a transformation of variables (see Appendix C).

alphas=linspace(-.9*pi/2,.9*pi/2,501)';

fTX=@(alphanow) tan(alphanow); %betanow=tan(alphanow)

pri=pTX(alphas,ones(size(alphas)),fTX); %transformation of variables into angle prior

figure; plot(pri(:,2),(pri(:,1)/max(pri(:,1))),'k.'); xlim([-7 7]); box off

Notice this prior encodes the conservative preference for assuming that there is no relationship between the input and output variables unless the data suggest otherwise.