mean_var script