In this tutorial I explain the RANSAC algorithm, their corresponding parameters and how to choose the number of samples:

N = number of samples

e = probability that a point is an outlier

s = number of points in a sample

p = desired probability that we get a good sample

N =log(1-p) /log(1- (1- e) s )

ref: 1