Exercise

Try other candidate distributions

Proper choice of input probability distributions is key for performing Monte Carlo simulations. In the video, three distributions were evaluated to determine which was the best fit for the age variable. Those distributions were the Laplace, normal, and exponential distributions. The normal distribution was the best fit.

In this exercise, you'll see if you can find a distribution that improves upon the fit of the normal distribution! You'll evaluate the fitting of uniform, normal, and exponential distributions. The diabetes dataset has been loaded as a DataFrame, dia. Will the normal distribution still be the best?

The following libraries have been imported for you: pandas as pd, scipy.stats as st, and numpy as np.

Instructions

100 XP
  • Use .fit() to fit a distribution to the age data; then use .nnlf() to obtain the Maximum Likelihood Estimation (MLE) value of the fitting.