def calibration_curve(df):
    """Compute probability of recidivism by decile score.

    df: DataFrame

    returns: Series
    """
    grouped = df.groupby('decile_score')
    return grouped['two_year_recid'].mean()