def linear_regression_model(x_points: list[float], y_points: list[float]) -> \
        tuple[float, float]:
    """Returns a tuple of two integers containing the formula for the linear regression line for
    the given points using the least squares regression line formula. The first point is
    m, the slope of the line. The second point is b, the intercept of the line.

    This helps us form an equation using the formula y = mx + b

    The Least Squares Linear Regression Line formula is as follows:
        - slope m = (N Σ(xy) − Σx Σy) / (N Σ(x**2) − (Σx)**2), where N is the number of points

    Preconditions:
        - len(x_points) == len(y_points)

    >>> x_points = [2,3,5,7,9]
    >>> y_points = [4,5,7,10,15]
    >>> m, b = linear_regression_model(x_points, y_points)
    >>> assert round(m, 3) == 1.518
    >>> assert round(b, 3) == 0.305
    """
    n = len(x_points)

    sum_x = 0
    sum_x_squared = 0
    # Calculate the sum for x points and x squared points
    for val in x_points:
        sum_x += val
        sum_x_squared += val ** 2
    # Calculate the sum for y points
    sum_y = 0
    for val in y_points:
        sum_y += val
    # Calculate the sum for x points times y points
    sum_xy = 0
    for i in range(n):
        sum_xy += x_points[i] * y_points[i]

    # print(sum_x, sum_y, sum_x_squared, sum_xy)

    m = (n * sum_xy - sum_x * sum_y) / (n * sum_x_squared - sum_x ** 2)
    b = (sum_y - m * sum_x) / n

    return m, b