Libraries: Statistical Functions - page 2

 

Well, I must admit that I'm not sure why it's different, but as I can obtain similar result in excel,
presented article cannon be wrong. It's rather some difference in calculating t value and in the set of those critical valuse.
If you would use t value from matlab or mathematica and compare it to critical values presented in the article,
the test result would be the same as for t value calculated with the method presented in the article.
However, considering that all those critical values are negative I would rather believe that implemented method is more suitable for them
(result obtained in mathematica is too big in comparison).

Of course I will try to look up for another methods of calculating t value to find out why those results are so different.

Regards,
Herajika 

 
Haruna Nakamura:

Well, I must admit that I'm not sure why it's different, but as I can obtain similar result in excel,
presented article cannon be wrong. It's rather some difference in calculating t value and in the set of those critical valuse.
If you would use t value from matlab or mathematica and compare it to critical values presented in the article,
the test result would be the same as for t value calculated with the method presented in the article.
However, considering that all those critical values are negative I would rather believe that implemented method is more suitable for them
(result obtained in mathematica is too big in comparison).

Of course I will try to look up for another methods of calculating t value to find out why those results are so different.

Regards,
Herajika 

Hello Haruna Nakamura,

I'm wondering if there is a small error at this line of code, used for calculating the t-value:

tValue=corrCoeff*MathSqrt((n-2)/1-MathPow(corrCoeff,2));

instead of

tValue=corrCoeff*MathSqrt((n-2)/(1-MathPow(corrCoeff,2)));

Regards,
Malacarne

 
Yes, you're rigth. Thank you for noticing it!
I uploaded edited version and it should appear when accepted by moderator.
Thank you once again!
 

Hello Guys,

 

Am new to all of this! Can you someone advise how can I implement into MT5 and use this script? Thanks 

 

First of all it's a  head file. You cannot #import template. So It's include-file.

Then function "T mean(T &arr[])" must return double in any case of T-templates. Mean of 1 and 2 is 1.5 but not 1.

 
Firstly, this is an include file, secondly, the first function T mean(T &arr[]) is not correct, because it should return double, not T. The average of an array of integer doubles.
 
Orangetree:
Firstly, this is an include file, and secondly, the first function T mean(T &arr[]) is incorrect because it should return double, not T. The average of an array of integer doubles.
Do you think Haruna Nakamura knows Russian?
 
Evgeny Belyaev:
Do you think Haruna Nakamura knows Russian?
I wrote to him in English
 

Could someone please make an example with engleGrangerTest?

I tried without results.

 

Hello @Haruna Nakamura,

It seems that the STD function is for population and not for sample. Using this function inadvertently may lead to erroneous conclusions. I would suggest changing the function name and / or adding the function to the sample standard deviation.
By the way,  the MQL5 already have in it's Math library, the function MathStandardDeviation().

This website uses cookies. Learn more about our Cookies Policy.