Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to generate an element from laplace distribution

Hi, I am wondering how to generate an random element according to laplace distribution. I tried the method RealDistribution(). But it failed.

According to the reference manual, laplace distribution is not supported. http://www.sagemath.org/doc/reference/probability/sage/gsl/probability_distribution.html

In the manual, there are some examples showing how to deal with uniform distribution, Gaussian distribution, etc.

My questions are:

(1) How do I know exactly which distributions are supported by the RealDistribution() method?

(2) Is there anyway I can simply generate an element according to laplace distribution in sage?

Thank you in advance.

How to generate an element from laplace distribution

Hi, I am wondering how to generate an a random element according to laplace distribution. I tried the method RealDistribution(). But it failed.

According to the reference manual, laplace distribution is not supported. http://www.sagemath.org/doc/reference/probability/sage/gsl/probability_distribution.html

In the manual, there are some examples showing how to deal with uniform distribution, Gaussian distribution, etc.

My questions are:

(1) How do I know exactly which distributions are supported by the RealDistribution() method?

(2) Is there anyway I can simply generate an element according to laplace distribution in sage?

Thank you in advance.

click to hide/show revision 3
retagged

How to generate an element from laplace distribution

Hi, I am wondering how to generate a random element according to laplace distribution. I tried the method RealDistribution(). But it failed.

According to the reference manual, laplace distribution is not supported. http://www.sagemath.org/doc/reference/probability/sage/gsl/probability_distribution.html

In the manual, there are some examples showing how to deal with uniform distribution, Gaussian distribution, etc.

My questions are:

(1) How do I know exactly which distributions are supported by the RealDistribution() method?

(2) Is there anyway I can simply generate an element according to laplace distribution in sage?

Thank you in advance.