using least Square method find the trend values