The pseudo-code for the random number generation looks like the following (which uses the standard trick for inverting an exponential distribution):
for Depth in 1..Probing_Depth loop
Amt_Discovered := 0.0;
for I in 1..N loop -- reduces sampling noise
Draw := Random (0.0 .. 1.0);
Random_Depth := -Depth * Natural_Log (Draw);
if Value > L0 then
Amt_Discovered := L0 + Amt_Discovered;
else
Amt_Discovered := Random_Depth + Amt_Discovered;
end if;
end loop;
-- Print Depth + Amt_Discovered/N
end loop;
The basic idea says that if you draw a depth deeper than L0 (the maximum depth for finding something), then cumulatively you can only pro-rate to L0. Otherwise, you will find discoveries proportional to the depth of the random variable probe, Random_Depth (or lambda below). This gives you an idea of how to do a stochastic integration. Remember, we only have an average idea of what probe depth we have, which gives us the dispersion on the amount discovered.