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 5FF09D687 for ; Wed, 26 Sep 2012 02:20:08 +0000 (UTC) Received: (qmail 35571 invoked by uid 500); 26 Sep 2012 02:20:07 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 35499 invoked by uid 500); 26 Sep 2012 02:20:07 -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 35489 invoked by uid 99); 26 Sep 2012 02:20:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 02:20:07 +0000 Date: Wed, 26 Sep 2012 13:20:07 +1100 (NCT) From: "Andrew Waterman (JIRA)" To: issues@commons.apache.org Message-ID: <1235813271.126571.1348626007901.JavaMail.jiratomcat@arcas> In-Reply-To: <32754227.277621293053340969.JavaMail.jira@thor> Subject: [jira] [Comment Edited] (MATH-460) Levy Distribution MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-460?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D134634= 70#comment-13463470 ]=20 Andrew Waterman edited comment on MATH-460 at 9/26/12 1:18 PM: --------------------------------------------------------------- Thanks for the help Phil! Do you think you could explain the following test= ? It seems like it should be overridden in my own test case, as I'm a bit c= onfused about the set [250,250,250,250] for the variable "expected" below:= =20 Link: https://github.com/apache/commons-math/blob/trunk/src/test/java/org/a= pache/commons/math3/distribution/RealDistributionAbstractTest.java#L290 public abstract class RealDistributionAbstractTest { .... /** * Test sampling */ @Test public void testSampling() { final int sampleSize =3D 1000; distribution.reseedRandomGenerator(1000); // Use fixed seed double[] sample =3D distribution.sample(sampleSize); double[] quartiles =3D TestUtils.getDistributionQuartiles(distribut= ion); double[] expected =3D {250, 250, 250, 250}; long[] counts =3D new long[4]; for (int i =3D 0; i < sampleSize; i++) { TestUtils.updateCounts(sample[i], counts, quartiles); } TestUtils.assertChiSquareAccept(expected, counts, 0.001); } =20 was (Author: awaterma): Thanks for the help Phil! Do you think you could explain the following = test? It seems like it should be overridden in my own test case, as I'm a b= it confused about the set [250,250,250,250] for the variable "expected" bel= ow:=20 public abstract class RealDistributionAbstractTest { .... /** * Test sampling */ @Test public void testSampling() { final int sampleSize =3D 1000; distribution.reseedRandomGenerator(1000); // Use fixed seed double[] sample =3D distribution.sample(sampleSize); double[] quartiles =3D TestUtils.getDistributionQuartiles(distribut= ion); double[] expected =3D {250, 250, 250, 250}; long[] counts =3D new long[4]; for (int i =3D 0; i < sampleSize; i++) { TestUtils.updateCounts(sample[i], counts, quartiles); } TestUtils.assertChiSquareAccept(expected, counts, 0.001); } =20 > Levy Distribution > ----------------- > > Key: MATH-460 > URL: https://issues.apache.org/jira/browse/MATH-460 > Project: Commons Math > Issue Type: New Feature > Reporter: Pavel Ryzhov > Priority: Minor > Fix For: 3.2 > > Attachments: levy_math_460.patch > > > Pretty straightforward implementation of Levy Distribution (not Levy alph= a-stable) according to http://en.wikipedia.org/wiki/L=C3=A9vy_distribution. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira