The independent random variables Y_{1},Y_{2},...,Y_{n}, each Y_{i}\in\{0,1\}, are postulated to depend on covariates x_{1},x_{2},...,x_{n} through the model,
log\frac{\pi_{i}}{1-\pi_{i}}=\beta x_{i}

a) Derive the equation which the maximum likelihood estimator of \beta satisfies.

b) For the special case where each x_{i} \in \{-1,0,1\} solve the equation in part (a). You may assume that the number of x_{i} = j is n_{j}, j=-1,0,1 and that y_{i}=1 for r_{j} of the cases where x_{i}=j

I'm really stuck on the part (b), can anyone either point me in the right direction or come up with a solution? Thanks!