# commons-issues mailing list archives

##### Site index · List index
Message view
Top
From "Andrew Waterman (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (MATH-460) Levy Distribution
Date Fri, 27 Apr 2012 21:32:51 GMT
```
[ https://issues.apache.org/jira/browse/MATH-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263984#comment-13263984
]

Andrew Waterman edited comment on MATH-460 at 4/27/12 9:31 PM:
---------------------------------------------------------------

Hi Sebastian,

I've been working with a local mathematician, and we've been able to resolve a few of the
tests. It looks like the mean and standard deviation for Levy should return +∞.  From my
friend (in response to a few questions):

(1) According to the summary of properties of the Lévy distrib given in the right-hand margin
of the Wikipedia article (https://en.wikipedia.org/wiki/L%C3%A9vy_distribution), the mean
for the Lévy distrib is indeed +∞.

(2) If you search the article https://en.wikipedia.org/wiki/Standard_deviation for the word
"variance", you'll find several places that say that the standard deviation is the square
root of the variance. Since the summary mentioned in (1) says that the variance of the Lévy
distrib is +∞, its standard deviation should be +∞ as well. (just as Mathematica says).
From what I recall of statistics and probability, that conclusion is consistent with the statement
in the article mentioned in (1), that the formula for the moments of a Levy distrib "diverges
for all n > 0 so that the moments of the Lévy distribution do not exist." (The variance
is the second moment [n=2].)

The GNU Scientific Library has an implementation of Levy for "alpha-stable distributions"
and for "skew alpha-stable Distribution" which might provide some insight  and provides something
to test against and compare to: [http://bzr.savannah.gnu.org/lh/gsl/trunk/annotate/head:/randist/levy.c]

I'll continue to discuss with my friend, but I'm still not quite sure how to implement the
failed tests for:

testQuantiles
testCumulativeProbabilities
testInverseCumulativeProbabilities
testConsistency
testSampling

Any feedback and insight/suggestions you might want to pass on would be very helpful.

Of course, if Pavel wanted to take this up again, that would work as well.

was (Author: awaterma):
Hi Sebastian,

I've been working with a local mathematician, and we've been able to resolve a few of the
tests. It looks like the mean and standard deviation for Levy should return +∞.  From my
friend (in response to a few questions):

(1) According to the summary of properties of the Lévy distrib given in the right-hand margin
of the Wikipedia article (https://en.wikipedia.org/wiki/L%C3%A9vy_distribution), the mean
for the Lévy distrib is indeed +∞.

(2) If you search the article https://en.wikipedia.org/wiki/Standard_deviation for the word
"variance", you'll find several places that say that the standard deviation is the square
root of the variance. Since the summary mentioned in (1) says that the variance of the Lévy
distrib is +∞, its standard deviation should be +∞ as well. (just as Mathematica says).
From what I recall of statistics and probability, that conclusion is consistent with the statement
in the article mentioned in (1), that the formula for the moments of a Levy distrib "diverges
for all n > 0 so that the moments of the Lévy distribution do not exist." (The variance
is the second moment [n=2].)

The GNU Scientific Library has an implementation of Levy for "alpha-stable distributions"
and for "skew alpha-stable Distribution" which might provide some insight  and provides something
to test against and compare to: [http://bzr.savannah.gnu.org/lh/gsl/trunk/annotate/head:/randist/levy.c]

I'll continue to discuss with my friend, but I'm still not quite sure how to implement the
failed tests for:

testQuantiles
testCumulativeProbabilities
testInverseCumulativeProbabilities
testConsistency
testSampling

Any feedback and insight/suggestions you might want to pass on would be very helpful.

> 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.1
>
>         Attachments: levy_math_460.patch
>
>
> Pretty straightforward implementation of Levy Distribution (not Levy alpha-stable) according
to http://en.wikipedia.org/wiki/Lévy_distribution.

--
This message is automatically generated by JIRA.