# p-value calculation

Discussion in 'Perl Misc' started by rahulthathoo, Nov 18, 2006.

1. ### rahulthathooGuest

Hi.

I was wondering if anyone here would know how to go about calculating
the p-value in perl. The
thing is that I have 2 sets A and B. There are lets say 200 entries in
each set, each entry between 0 and 1 and I need to find the Pearson
Correlation Coefficient r. I did this in perl. I had r for 200 points.
Now I want to be able to calculate the p-value for this experiment. How
do i do that in PERL. I can do that easily in Excel using the TDist
function. So for a given r, I can calculate the t-value (called the
statistic) as t=r/sqrt[(1-r²)/(N-2)] where r is the pearson and N =
200 and from here I can get the TDist in Excel which is the p-value.
But I cant seem to do this in PERL? Any clues?

Rahul

rahulthathoo, Nov 18, 2006

rahulthathoo <> wrote:

> I did this in perl.

You did that in Perl.

> How
> do i do that in PERL.

How do you do that in Perl.

Case matters.

--
Perl programming
Fort Worth, Texas

3. ### Guest

"rahulthathoo" <> wrote:

> I can do that easily in Excel using the TDist function.

Statistics:istributions::tprob

Xho

--