Fitting logistic model to noisy data