Calculates variances
Calculates weights and prints solution. Currently solution is wrong. TODO step through all time steps and generate variances per time step.