def cooks_distance(standard_residuals, h, p):
    """ compute cook's distance

    Parameters: standard_residuals (array) - studentized residauls
                h (array) - leverage
                p (int) - coefficients dimensions

    Returns: (array) - an array of Cook's distance
    """
    cooks = (h / (1-h)) * (standard_residuals**2 / p)
    return cooks