def user_bias(df, user_id):
    """Calculate user bias: average rating for all users minus the users average rating"""
    return  df.loc[df['user_id'] == user_id, 'rating'].mean() - df['rating'].mean()