10170

# Maximum Likelihood Estimators for Binary Outcomes

Often regressions involve binary outcome data: the object is to predict some event that will or will not occur based on various data. This Demonstration shows how to derive the maximum likelihood estimates of the coefficients in probit and logit regressions that are typically used to model data with a binary outcome. You can specify a dataset for examination, make guesses as to the and parameters, and choose a logit or probit regression model. The top panel shows the data, the current regression model (orange line) and the probability (likelihood) that each -value would occur for a given -value, given and . The bottom panel shows the sum of the log of each of these likelihoods. Selection of maximum likelihood estimates of and will make this sum as large as possible and the displayed rectangle as small as possible. You can specify the minimum displayed value of the sum of the log likelihoods. If you are curious, you can also request a computation of the correct answer for each dataset, which may be done either directly or using an iterative weighted least squares (WLS) process.

### DETAILS

The Demonstration employs two alternative methodologies to compute the maximum likelihood estimators: The first method uses global optimization routines to find the values of and that maximize the sum of the logs of the likelihoods of each data point. The second method uses an iterative weighted least squares process which makes assumptions about weights, figures out what coefficients minimize the residuals, figures out what weights are consistent with the resulting model, and so on until convergence is reached. Consistent with predictions, the results of the two methodologies appear to be the same in all cases. On larger datasets, the weighted least squares method is expected to be faster owing in part to the intricacies of global optimization.
The optimization code used here can be readily extended to address more complex models.
The controls of this Demonstration will generally respond more swiftly if "compute MLE" is unchecked.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.