Get startedGet started for free

Compare Weibull model parameters

Some convicts in the study were released on parole. Because parolees experience stricter restrictions, you suspect that their initial arrest rate is high but decreases as time goes on, while other convicts' arrest rate increases as time goes on.

You will fit a Weibull estimator to parolees and non-parolees separately. You will then compare their model parameters to verify your hypothesis. The DataFrame you will use is called prison.

The matplotlib.pyplot library is imported as plt, the pandas and numpy libraries are imported as pd and np, respectively. The WeibullFitter class has been imported for you and a new instance called wb has been created. Use the console to explore the DataFrame as needed.

This exercise is part of the course

Survival Analysis in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Mask for parole
parole = (____ == ____)
Edit and Run Code