Re: Statistics : T-test, P-value [message #58025] |
Mon, 14 January 2008 06:25  |
Mike[2]
Messages: 99 Registered: December 2005
|
Member |
|
|
>>>> On Jan 14, 7:18 am, Spon <christoph.b...@gmail.com> wrote:
>> On Jan 14, 7:20 am, Nick <jungbin...@hotmail.com> wrote:
>> There are two kinds of data - A group and B group which I
>> have to analyze.
>> I came to know these correlation by using 'CORRELATE'
>> function. However, I want to know whether these
>> correlation is reasonable or not. So I want to calculate
>> p-value by T-test. Is there any idea calculate p-value
>> through t-test through IDL?
> Try the TM_TEST function. The second value it returns
> should be your p value. You'll have to figure out which
> keyword (if any) you need for your particular dataset.
There are many test statistics that are distributed according to
the t-distribution, but you must be careful in how you calculate
them.
IDL's TM_TEST calculates t and the p-value for the Student's
t-test, which is useful for testing the hypothesis that two data
sets have the same mean.
CORRELATE calculates Pearson's correlation coefficient, which
follows the t-distribution, but the test statistic is not the
same as Student's t.
My stats book says that, for Pearson's correlation coefficient,
r, the test statistic is r if the number of data points, N, small
(N<=150). If N>150, use t = r sqrt((N-2)/(1-r**2)). This
follows the t-distribution with N-2 degrees of freedom. You
could use IDL's T_PDF function to calculate p-values for that.
Nick - Would you post some sample data?
Mike
|
|
|