Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Any Idea why I can't get a result from this expression:

In[170]:= RandomVariate[HyperbolicDistribution[59.428`, 18.441`, 3.428`*^-9, -0.00065`]]

Out[170]= RandomVariate[HyperbolicDistribution[59.428, 18.441, 3.428*10^-9, -0.00065]]

I have found this distribution in modelling the daily balance of a bank in order to calculate liquidity risk.

share|improve this question
Apparently 3.428 10^-9 is too small. 3.428 10^-7 works OK, though – Dr. belisarius Apr 21 '14 at 17:27
It doesn't look like the impact of the third parameter is really large at the given value. The plot of the PDF remains visually unchanged if you increase it by a factor of 1000. – Sjoerd C. de Vries Apr 21 '14 at 21:25
Sjoerd raised a good point: Increasing delta by a factor of 100 still gives results that match to 7+ decimal places. Doing so allows use of RandomVariate. – ciao Apr 21 '14 at 21:41
up vote 4 down vote accepted

Looks like a glitch, however you can invert the CDF to get the desired result (not as fast, of course):

InverseCDF[HyperbolicDistribution[1, 59.428`, 18.441`, 3.428`*^-9, -0.00065`], 
            RandomReal[1, 10]]

(* {0.000448962, 0.0144836, 0.0481936, -0.0169342, 0.0445246, -0.0151702, 0.00316436, 0.00877931, 0.085059, 0.00880039} *)
share|improve this answer
Many thanks mate! – user13852 Apr 22 '14 at 16:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.