def mc_estimates(run_sum, run_sum_squares, n):
    """Returns sample mean and variance from sum and sum of squares

    :param run_sum: float
        The sum of the samples

    :param run_sum_squares: float
        The sum of the squares of the samples

    :param n: int
        The number of samples

    :return: 2-tuple of floats
         The sample mean and the sample variance
    """
    sample_mean = run_sum / n
    sample_var = ((run_sum_squares - (run_sum * run_sum) / n) / (n - 1))
    return sample_mean, sample_var