def expected_jk_variance(K):
    """Compute the expected value of the jackknife variance estimate
    over K windows below. This expected value formula is based on the
    asymptotic expansion of the trigamma function derived in
    [Thompson_1994]

    Parameters
    ---------

    K : int
      Number of tapers used in the multitaper method

    Returns
    -------

    evar : float
      Expected value of the jackknife variance estimator

    """
    kf = float(K)
    return 1 / kf * (kf - 1) / (kf - 0.5) * ((kf - 1) / (kf - 2)) ** 2 * (kf -
        3) / (kf - 2)
