Added functions to calculate variance.