From issues-return-23166-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Mon Nov 28 12:53:01 2011 Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 92EC29C0F for ; Mon, 28 Nov 2011 12:53:01 +0000 (UTC) Received: (qmail 47951 invoked by uid 500); 28 Nov 2011 12:53:01 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 47746 invoked by uid 500); 28 Nov 2011 12:53:01 -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 47738 invoked by uid 99); 28 Nov 2011 12:53:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 12:53:01 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 12:53:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E71D6A4E1D for ; Mon, 28 Nov 2011 12:52:39 +0000 (UTC) Date: Mon, 28 Nov 2011 12:52:39 +0000 (UTC) From: "Thomas Neidhart (Updated) (JIRA)" To: issues@commons.apache.org Message-ID: <227052856.17520.1322484759948.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1873130719.12392.1320793791902.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (MATH-704) One of Variance.evaluate() methods does not work correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Neidhart updated MATH-704: --------------------------------- Attachment: MATH-704.patch I have found a small bug wrt this bug report. The sum of the weights is calculated on the whole weight array rather than the specified sub-array [begin, begin + length) > One of Variance.evaluate() methods does not work correctly > ---------------------------------------------------------- > > Key: MATH-704 > URL: https://issues.apache.org/jira/browse/MATH-704 > Project: Commons Math > Issue Type: Bug > Affects Versions: 2.2 > Environment: Java 1.6 > Reporter: Leonid Ilyevsky > Assignee: Phil Steitz > Fix For: 3.0 > > Attachments: MATH-704.patch > > > The method org.apache.commons.math.stat.descriptive.moment.Variance.evaluate(double[] values, double[] weights, double mean, int begin, int length) does not work properly. Looks loke it ignores the length parameter and grabs the whole dataset. > Similar method in Mean class seems to work. > I did not check other methods taking the part of the array; they may have the same problem. > Workaround: I had to shrink my arrays and use the method without the length. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira