input: Write a python function to perform linear regression using given X and Y values.
  assert linear_regression([1, 2, 3, 4], [2, 4, 6, 8]) == (2.0, 0.0)
  assert linear_regression([1, 2, 3], [1, 2, 3]) == (1.0, 0.0)
  assert linear_regression([2, 3, 5], [3, 5, 7]) == (1.2, 0.6)
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_xx = sum(x*x for x in X)
      
      # Calculating slope (m) and intercept (b)
      m = (n * sum_xy - sum_x * sum_y) / (n * sum_xx - sum_x * sum_x)
      b = (sum_y - m * sum_x) / n
      
      return m, b