def determination(points, y_mean, b0, b1):
    """Returns the coefficient of determination (R**2) for linear equation and list of complex points"""
    sse = []
    sst = []
    for point in points:
        y_hat = b0 + (b1 * point.real)
        diff = point.imag - y_hat
        sse.append(diff ** 2)
        diff = point.imag - y_mean
        sst.append(diff ** 2)
    if sum(sst) == 0:
        return 1  # Horizontal line
    else:
        return 1 - (sum(sse) / sum(sst))