At equal spacing , the adjacent increments of an affine mean profile are all . Their differences are therefore zero. Define the matrix whose row associated with the interior time has coefficients in columns . Then
Conversely these equations make all adjacent first differences equal, so is affine in , equivalently affine in the equally spaced times. Thus the restriction is exactly , not just a necessary condition. Its null space has basis and , so has rank .
For and , the second-difference test of a linear mean profile is the Hotelling test of linear hypotheses with
Reject the affine-profile hypothesis when the scaled statistic exceeds its level- upper F-distribution critical value. This removes the nuisance intercept and slope without estimating them separately.
For unequal ordered distinct times, put and replace each second-difference row by the adjacent-slope contrast
Its three coefficients are , and . Vanishing means all adjacent slopes agree, again giving null space and rank . Use this new in the same statistic and null distribution. For , every mean profile at distinct times is affine, so there is no lack-of-linearity restriction to test.