Please refer to pp. 33-34 Example 1.18 The False-Positive Puzzle http://www.cs.utexas.edu/~jason777/School/introduction%20to%20probability%20(bertsekas,%202nd,%202008).pdf I too arrived at 0.0187 there. However, simulating a model of this in both R and matlab shows a converergence to 0.0197~0.02 instead of 0.0187. Would someone mind looking at the following matlab code to see if I've modelled it correctly? This is for a 10,000 sample population (also tried with other samples, same result) -
function out = carloexample(trials) for j = 1:trials positives=0; population=[zeros(9991,1); ones(9,1)]; for i = 1:length(population) r=rand(1); if population(i) == 0 if r >=0.05 elseif r<0.05 positives=positives+1; end elseif population(i) == 1 if r>=0.05 positives=positives+1; elseif r<0.05 end end end total(j)=positives; end out=1/mean(total); end
Join our real-time social learning platform and learn together with your friends!