implemented w_n and v_n functions, plotting for mean squared model error