Wrote Variance Method

Again, used code that I wrote in the discussion section.