Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 10372 invoked from network); 13 May 2010 19:51:04 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 May 2010 19:51:04 -0000 Received: (qmail 28342 invoked by uid 500); 13 May 2010 19:51:04 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 28171 invoked by uid 500); 13 May 2010 19:51:04 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 28163 invoked by uid 99); 13 May 2010 19:51:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 May 2010 19:51:04 +0000 X-ASF-Spam-Status: No, hits=-1423.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 May 2010 19:51:03 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4DJog2A014000 for ; Thu, 13 May 2010 19:50:42 GMT Message-ID: <9963568.24691273780242633.JavaMail.jira@thor> Date: Thu, 13 May 2010 15:50:42 -0400 (EDT) From: "Kevin Childs (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (MATH-371) PearsonsCorrelation.getCorrelationPValues() precision limited by machine epsilon MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 PearsonsCorrelation.getCorrelationPValues() precision limited by machine epsilon -------------------------------------------------------------------------------- Key: MATH-371 URL: https://issues.apache.org/jira/browse/MATH-371 Project: Commons Math Issue Type: Bug Affects Versions: 2.0 Reporter: Kevin Childs Similar to the issue described in MATH-201, using PearsonsCorrelation.getCorrelationPValues() with many treatments results in p-values that are continuous down to 2.2e-16 but that drop to 0 after that. In MATH-201, the problem was described as such: > So in essence, the p-value returned by TTestImpl.tTest() is: > > 1.0 - (cumulativeProbability(t) - cumulativeProbabily(-t)) > > For large-ish t-statistics, cumulativeProbabilty(-t) can get quite small, and cumulativeProbabilty(t) can get very close to 1.0. When > cumulativeProbability(-t) is less than the machine epsilon, we get p-values equal to zero because: > > 1.0 - 1.0 + 0.0 = 0.0 The solution in MATH-201 was to modify the p-value calculation to this: > p = 2.0 * cumulativeProbability(-t) Here, the problem is similar. From PearsonsCorrelation.getCorrelationPValues(): p = 2 * (1 - tDistribution.cumulativeProbability(t)); Directly calculating the p-value using identical code as PearsonsCorrelation.getCorrelationPValues(), but with the following change seems to solve the problem: p = 2 * (tDistribution.cumulativeProbability(-t)); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.