Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 modelling 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 –  belisarius Apr 21 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 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. –  rasher Apr 21 at 21:41

1 Answer 1

up vote 3 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 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.