# Way of determining that a slope is zero

I am performing measurements on a system for different values of the independent variable $X$.

For the sake of simplicity, let's say that:

• I have 5 values of $X_i$ I am interested in: $\{X_0, X_1, X_2, X_3, X_4\}$.
• I repeat each measurements 32 times per $X_i$.

What I want to know is what test I can do to figure out whether or not $X_i$ affects my measurement. Said otherwise, I want to know whether the slope of my measurements vs $X_i$ is zero.

NB: I know about t-tests (my measurements are normally distributed). However it seems to me that using t-tests between pairs $\{X_i, X_j;~ i\neq j\}$ is far less powerful than leveraging the fact that I have 5 cases which I know to grow linearly with $X$ iff $X$ actually has an effect.

• Unless I'm completely misinterpreting, you want a t-test for the slope -- wikiwand.com/en/Student%27s_t-test#/Slope_of_a_regression_line
– Will
Commented Jun 13, 2017 at 13:38
• Note that tests of these types test whether the slope is not equal to zero rather than testing whether the slope is equal to zero. This is a substantial difference with respect to your hypothesis and assumptions regarding the analysis. Explicitly testing whether a slope is equal to zero requires a different framework, such as a two one-sided test (TOST) framework.
– Ashe
Commented Jun 13, 2017 at 14:15
• @Ashe even then, TOST can't actually tell you it is zero either, only that it's "close" in some predetermined sense. Commented Jun 14, 2017 at 1:00
• @Glen_b Most certainly, and good to point out. At least though it puts it on the alternative hypothesis side of testing instead of the null side.
– Ashe
Commented Jun 14, 2017 at 13:11

As mentioned in the first comment, what you probably want is a test for the slope coefficient in the regression of the dependent on the independent variable: this, of course, if you can assume that the relationship of $X$ to $Y$, should there be one, is approximately linear (it it were U-sahped, for instance, you could fail to reject the null hypothesis while still having an influence of $X$ over $Y$).
Since $X$ takes only five values, you might as well look at this as a one-way analysis of variance (single factor with five levels). I would think that your design is particularly suited for this type of analysis, which no longer requires a particular shape of the $X$ to $Y$ relationship. should there be one, in order to reject the no-influence hypothesis.