.
formula is a bit hard to comprehend but let’s just type it in. So we need to check if the cumulative probability (i.e., df["RAND"][i] ) is very close to zero (say 0.001) then our sales price (i.e., df["SalesPrice"][i] ) is very close to our minimum if the cumulative probability is very close to one