logistic regression solved example by hand