def _mean_var(vals, pmf):
mean = np.sum(vals * pmf)<EOL>var = np.sum(vals ** <NUM_LIT:2> * pmf) - mean ** <NUM_LIT:2><EOL>return mean, var<EOL>
Calculates the mean and variance from vals and pmf

Parameters
----------
vals : ndarray
    Value range for a distribution
pmf : ndarray
    pmf values corresponding with vals

Returns
-------
: tuple
    (mean, variance)