Working on weighted averages in rebinned x points