Under the assumption that the noise is uncorrelated and normally distributed, and under the null hypothesis (true correlation=zero), the sample correlation coefficient squared is distributed like a Beta random variable. (Equivalently, R/sqrt(1-R*R) is distributed like a t-variable.) The functions used in AFNI (and cdf, etc.) use this factoid to compute the
p-value for a given correlation coefficient. The methods described in the original posting are only approximations to this relationship; these (different) methods are based on using a normal approximation to the distribution function of the correlation coefficient. Since they are only approximations, they will not agree exactly with the AFNI method.
The C functions used to compute
p-values (etc.) are in the AFNI source code files thd_statpval.c and mri_stats.c, and also in the files in the directory cdflib/ (these latter functions are from U Texas originally, as detailed in the AFNI license).
One doesn't need a PhD in statistics to do FMRI. However, one does need a basic understanding of probability and statistical inference that a year-long undergrad course should give. The field of neuroscience is becoming more quantitative. In the long run, people who don't think "that way" will not make it in neuroimaging, just as they can no longer make it in economics. This is my opinion, at any rate, which comes from observing FMRI students and scientists for 9-1/2 years.
bob cox
Reference
NL Johnson, S Kotz, N Balakrashnan
Continuous Univariate Distributions, Vol. 2 [chapter 32]
John Wiley & Sons