Mantis - ALGLIB
Viewing Issue Advanced Details
493 Statistics minor always 2012-11-07 17:14 2012-11-21 16:38
karuzo  
SergeyB  
normal  
resolved 3.6.0  
fixed  
none    
none 3.7.0  
Unspecified
0000493: FIXED: bug in Student t-tests
Issue fixed. studenttest1/studenttest2 now return correct values, depending on sign of difference between means of X and Y.

ORIGINAL MESSAGE:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
studenttest1 returns all p-value=1 when all values of sample X are equal and different from assumed Mean.

Similarly studenttest2 returns all p-value=1 when all values of sample X are equal and different from equal values of sample Y.

I suppose this is wrong, as rather all p-values should be zero.
Dim bt As Double, rt As Double, lt As Double
Call alglib.studentttest1({1, 1, 1, 1, 1}, 5, 0, bt, rt, lt)
Console.WriteLine("bothTails={0}, rightTail={1}, leftTail={2}", bt, rt, lt)
Call alglib.studentttest2({1, 1, 1, 1, 1}, 5, {2, 2, 2, 2, 2}, 5, bt, rt, lt)
Console.WriteLine("bothTails={0}, rightTail={1}, leftTail={2}", bt, rt, lt)


Output:
bothTails=1, rightTail=1, leftTail=1
bothTails=1, rightTail=1, leftTail=1
Issue History
2012-11-07 17:14 karuzo New Issue
2012-11-07 17:14 karuzo Programming language => Unspecified
2012-11-09 16:55 SergeyB Status new => assigned
2012-11-09 16:55 SergeyB Assigned To => SergeyB
2012-11-09 16:56 SergeyB Target Version => 3.7.0
2012-11-21 16:38 SergeyB Description Updated
2012-11-21 16:38 SergeyB Status assigned => resolved
2012-11-21 16:38 SergeyB Fixed in Version => 3.7.0
2012-11-21 16:38 SergeyB Resolution open => fixed
2012-11-21 16:38 SergeyB Summary Student tests returns all p-value=1 for equal-valued samples => FIXED: bug in Student t-tests

There are no notes attached to this issue.