%If it is above the threshold, he speaks up
% w1 = error
% w2 = no error

for thresh = 1:500
	for pp = 1:26;
	prior = (pp-1)/25;
	pyatw1 = (sum(pyw1(thresh:500))+.6772)./100;
	pyatw2 = (sum(pyw2(thresh:500))./100);
	pybtw1 = (sum(pyw1(1:thresh)))./100;
	perr(thresh,pp) = (pyatw2*prior)./((pyatw1*(1-prior))+(pyatw2*prior));
	pd(thresh, pp) = (pyatw1)./((pyatw1)+(pybtw1));
end
end
thgrid = (0:.01:4.99)';
prgrid = (0:.04:1)';
surf(1-prgrid, thgrid, perr);
axis([0 1 0 5 0 .05])      
shading('interp');
