The plot reveals, in dramatic fashion, just how much the data clusters around

the mean, which as you recall from above is nearly 0. It also dramatizes the out-

lier status of the actual value (-0.2411) that was observed. In 10,000 random

iterations, only 10 correlation coefﬁcients were calculated to be less than the ac-

tual observed value and the actual observed value was nearly 3 (2.8) standard

deviations away from the mean. In short, the probability of observing a random

value as extreme as the actual value observed (-0.2411) is just 0.4%.

the mean, which as you recall from above is nearly 0. It also dramatizes the out-

lier status of the actual value (-0.2411) that was observed. In 10,000 random

iterations, only 10 correlation coefﬁcients were calculated to be less than the ac-

tual observed value and the actual observed value was nearly 3 (2.8) standard

deviations away from the mean. In short, the probability of observing a random

value as extreme as the actual value observed (-0.2411) is just 0.4%.

Code:

```
min(mycors.v)
## [1] -0.2772
max(mycors.v)
## [1] 0.3129
range(mycors.v)
## [1] -0.2772 0.3129
mean(mycors.v)
## [1] -0.0001494
sd(mycors.v)
## [1] 0.08685
```

Using R (please mix theory in if you think I need it), how can I jump to this 4%?

I assume

**pnorm**or

**pt**will be of use here maybe. I know I could use

**corr.test**:

Code:

```
> cor.test(cor.data.df[, 1], cor.data.df[, 2])
Pearson's product-moment correlation
data: cor.data.df[, 1] and cor.data.df[, 2]
t = -2.8651, df = 133, p-value = 0.004848
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.39400960 -0.07520945
sample estimates:
cor
-0.2411029
```

http://www.matthewjockers.net/wp-content/uploads/2013/09/TAWR.pdf (p. 54-57)

Maybe the simulation was just for demo purposes and wasn't used to calculate the pvalue. In retrospect this seems the most logical.