Discussion of article "Statistical Distributions in MQL5 - taking the best of R" - page 18

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
encountered a problem when calculating the quantile of gamma distribution
in R:
> qgamma(0.05,2,scale=1)
[1] 0.3553615
> qgamma(0.05,10,scale=1)
[1] 5.425406
in mql5:
Results:
0.3553615106986621
Error 4
build 1596
Changed calculation of quantiles of gamma distribution. Fixed version of Gamma.mqh in the appendix (replace in MQL5\Include\Math\Stat\).
Calculation result:
The help page says MathProbabilityDensityGamma() instead of MathProbabilityDensityNoncentralBeta()
Thanks, corrected
CDF of hypergeometric distribution is incorrectly calculated by MathCumulativeDistributionHypergeometric() function. By definition, the probability distribution function must be defined for any real number. Below is a script on mql5 with its results and, for comparison, the same on R.
result:
-1.0 nan 2
0.0 0.0 0
0.5 nan 2
zero divide in 'Hypergeometric.mqh' (241,35)
result:
[1] 0.0000000 0.0000000 0.0000000 0.2222222
The CDF of hypergeometric distribution is incorrectly calculated by MathCumulativeDistributionHypergeometric().
Thanks for the message, we will look into it.
If I haven't messed anything up, the MathQuickSort*() quick sort functions don't populate the index array of the original array:
result:
0 1.5
0 -1.0
0 2.0
0 0.0
Unless I'm confused, the MathQuickSort*() quick sort functions don't populate the index array of the original array:
In our implementation, the index array itself is not filled, the index values have to be prepared by yourself before calling the sort:
or
if natural order is required.Setslav
>>>The productwas hidden to draw your attention to it.
Plus, I can't find a button to publish a new product in the Market. Is it like this for everyone, or is it just me? How can I publish the MT5 version?
If a product is hidden by a moderator, the author cannot return it. This is logical
Some (not all) binomial coefficients are negative, for example:
result: -309196571788882235
should be: 349615716557887488