Chapter 10 Permutation Test for Slope
10.1 Usage
The permutation test for the slope helps to determine if there is a significant linear relationship between \(X\) and \(Y\), when we can’t assume normally distributed error terms.
10.1.1 Assumptions
- We have a random sample of paired measurements \((X_i,Y_i)\). 2.The relationship between \(X_i\) and \(Y_i\) is linear.
- The error terms \(\varepsilon_i\) are independent and identically distributed (iid) about zero. However, we no longer assume a Normal distribution.
10.2 How it Works
Like many of the previous permutatation tests, we create a p-value that reflects the probability
Under \(H_0\), there is no relation b/w \(X\) and \(Y\), so any of the observed \(Y_i\)’s could have come from any of the \(X_i\)’s.
Given \(n\) observations, there are \(n!\) ways to reorder \(Y_i\)’s, because we fix \(X_i\)’s and shuffle the \(Y_i\)’s
10.2.1 p-value
- Reshuffle the \(Y_i\)’s to get new pairs \((X_i, Y_i*)\)
- Calculate \(\hat{\beta}_1^*\) for the permuted sample
- Repeat steps 1 and 2 each of \(n!\) times to generate all possible permutations
- p-value is the fraction of \(\hat{\beta}_1^*\) as or more extreme than observed:
\[ \begin{array}{l} p_{\text {lower tail}}=\frac{\# \hat{\beta}_{1}^{*} \leq \hat{\beta}_{1, o b s}}{n !} \\ p_{\text {upper tail}}=\frac{\# \hat{\beta}_{1}^{*} \geq \hat{\beta}_{1, o b s}}{n !} \\ p_{\text {two sided}}=\frac{\# |\hat{\beta}_{1}^{*}| \geq |\hat{\beta}_{1, o b s}|}{n !} \end{array} \]