comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Can IDL calculate the confidence level about correlation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Can IDL calculate the confidence level about correlation [message #56882] Fri, 23 November 2007 17:30 Go to previous message
wanglin1981 is currently offline  wanglin1981
Messages: 10
Registered: August 2007
Junior Member
On 11月24日, 上午5时02分, Vince Hradil <hrad...@yahoo.com> wrote:
> On Nov 22, 7:51 pm, Lin Wang <wanglin1...@gmail.com> wrote:
>
>> I found a code which can calculate the confidence level using pvalue
>> method (see below). It works well, but usually I use the Student's t-
>> test method. So can anyone help?
>
>> Thanks!
>
>> r=correlate(x,y)
>> var=1/(n-3.0)
>> zvalue = 0.5*alog((1+r)/(1-r))/sqrt(var)
>> if (zvalue lt 0) then pvalue = 2*(gauss_pdf(zvalue)) $
>> else pvalue = 2*(1-gauss_pdf(zvalue))
>
> I think THIS is the way to do it. The t-test is irrelevant.

Vince,

Yes, p-value test can test the significance of correlatioins, but t-
test is also widely used in meteorological studies, even more popular
than p-value test I think.


The probability density fuction for correlation coefficient r is:
f(r)=gama((n-1)/2)*(1-r*r)**(n/2-2)/sqrt(pi)/gama((n-2)/2)


Set r=t/sqrt(n-2)/sqrt(1+t*t/(n-2)), and v=n-2, then


f(r)dr=(after some transformation)=[1/sqrt(v*pi)]*[gama((v+1)/2)/
gama(v/2)]*[(1+t*t/2)**(-(v+1)/2)]*dt
this is the probability density function for t distribution, so the
significance of r can be evaluated by the t-test.

Lin
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using IDL shell in crontab
Next Topic: HISTOPLOT Updated

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 22:27:00 PDT 2025

Total time taken to generate the page: 1.68061 seconds