least one useful result after running. RANSAC returns a successful result if in some iteration it selects only inliers from the input data set when it chooses the points from the data set from which the model parameters are estimated. Let be the probability of choosing an inlier each time a single point is selected, that is, = number of inliers in data / number of points in data A common case is that is not well known beforehand, but some rough value can be given. Assuming that the points needed for estimating a model are selected independently, is the probability that all n points are inliers and is the probability that at least one of the points is an outlier, a case which implies that a bad model will be estimated from this point set. That probability to the power of is the probability that the algorithm never selects a set of points which all are inliers and this must be the same as . Consequently, which, after taking the logarithm of both sides, leads to This result assumes that the data points are selected independently, that is, a point which has been selected once is replaced and can be selected again in the same iteration. This is often not a reasonable approach and the derived value for should be taken as an upper limit in the case that the points are selected without replacement. For example, in the case of finding a line which fits the data set illustrated in the above figure, the RANSAC algorithm typically chooses two points in each iteration and computes maybe_model as the line between the points and it is then critical that the two points are distinct. To gain additional confidence, the standard deviation or multiples thereof can be added to . The standard deviation of is defined as Advantages and disadvantages An advantage of RANSAC is its ability to do robust estimation of the model parameters, i.e., it can estimate the parameters with a high degree of accuracy even when a significant number of outliers are present in the data set. A disadvantage of RANSAC is that there is no upper bound on the time it takes to compute these parameters (except exhaustion). When the number of iterations computed is limited the solution obtained may not be optimal, and it may not even be one that fits the data in a