def mean_estimator(data_variance, n, ddof=1):
    """
    Get the variance of the mean from a data variance term (e.g. an eigenvalue)
    and return an estimator of the precision of the mean (e.g. the variance of
    the mean itself.)

    Note: this is not used in the actual calculation of PCA planar
    fitting errors; it is present for testing purposes.
    """
    return data_variance/(n-ddof)