# Comparing the slopes of two regression lines where the two slopes are NOT independent (breakpoint)

so I am trying to see whether there is a breakpoint in my data set at a certain time. Basically I have 200 data points and am wondering if there is a breakpoint at t=100, ie whether the slopes of the two regression lines change significantly. Le the slope of line 1= b1 and the slope of line 2= b2.

I want to see whether $b1-b2=0$ using a t test, and so I think that would reduce to evaluating the statistic $t= (b1-b2)/($std error$(b1-b2))$ The problem I have is that I don't know how to compute that standard error since b1 and b2 might be correlated. Furthermore I am not sure what degrees of freedom the corresponding t distribution would have? Finally, how do I even see that the statistic I have written down does follow a t distribution in the first place?

Thanks in advance for anyone who can help me with any of these questions!

We assume we know the breakpoint $c$. We define two basis functions. $$B_l(x) = \begin{cases} c - x & \text{if } x < c \\ 0 & \text{otherwise} \end{cases}$$ and $$B_r(x) = \begin{cases} x - c& \text{if } x > c \\ 0 & \text{otherwise} \end{cases}$$
We now fit $$y = \beta_0 + \beta_1B_l(x) + \beta_2 B_r(x) + \epsilon$$ using standard methods.
Note that the coefficients are for the new variables here and the way they are coded means that a negative value shown for $B_l(x)$ corresponds to a positive slope.