x = a + ∑fidi/∑fi