Suppose X variable represents daily Temperature. Suppose Y variable represents something depends on daily Temperature. Y may or may not directly relates to temperature of the corresponding day. Temperature today might relates with the Y on today, tomorrow, or the day after. So I want to group the cases where X relates best with Y out of those three cases.
In the given example what i meant by x(3) to y(4) is X(3) which is 10 relates well to Y(4) which is 15.