input: Write a function to perform linear regression for predicting the numbers in a given dataset. The function should take two lists X and Y (representing the input features and target variable respectively) and return the predicted value of y for a new input feature.
  assert linear_regression([1,2,3,4,5], [3,5,7,9,13])==[7.0]
output: def linear_regression(X, Y):
      n = len(X)
      sum_x = sum(X)
      sum_y = sum(Y)
      sum_xy = sum(x * y for x, y in zip(X, Y))
      sum_x_squared = sum(x ** 2 for x in X)
      
      m = (n * sum_xy - sum_x * sum_y) / (n * sum_x_squared - sum_x ** 2)
      b = (sum_y - m * sum_x) / n
      
      return [m * x + b for x in X]