


brede_cdf_r - Correlation coefficient for distribution function
P = brede_cdf_r(r, n)
Input: r Correlation coefficient
n Number of samples
Output: P Lower tail area
Computes the lower tail area of the correlation coefficient
with the null hypothesis r=0 and with Gaussian random
variables.
Note that the corrcoef Matlab function also returns a
distribution value: The two-tailed p-value.
Example
N = 2000;
x = randn(7,N);
y = randn(7,N);
for n=1:N, R=corrcoef(x(:,n),y(:,n)); r(n)=R(1,2);end
p = brede_cdf_r(r, 7);
figure, plot(2*cumsum(p)/N), line([0 N], [0 1], 'color',[1 0 0])
% Make a table for N=7
for r=-1:0.05:1,
disp(sprintf('%6.2f %f', r, 1-abs(1-2*brede_cdf_r(r,7)))),
end
See also BREDE, BREDE_CDF_BIN, BREDE_CDF_CHI2, BREDE_CDF_F,
BREDE_CDF_GAUSS, BREDE_CDF_HYPERGEO, BREDE_CDF_T
$Id: brede_cdf_r.m,v 1.1 2004/08/31 14:31:11 fnielsen Exp $