1 Pages (14 items)
[Statistical Tools] Skewness, Kurtosis bug - Messages
#1 Posted: 5/28/2018 1:32:09 AM
Stat Skewness(Y).sm (10 KiB) downloaded 47 time(s).
#3 Posted: 5/29/2018 12:22:15 PM
I have the same problem with latest SS appVersion(4)="0.99.6671.38791".
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#4 Posted: 5/29/2018 2:52:33 PM
I don't know anything about Skewness/Kurtosis, but I did look up the Matlab algorithms for each. Jean, I don't know where your algorithms comes from, but it appears SMath uses same/similar algorithms as Matlab.
Stat Skewness(Y)_Lyles.sm (19 KiB) downloaded 49 time(s).
Stat Skewness(Y)_Lyles.sm (19 KiB) downloaded 49 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#5 Posted: 5/29/2018 11:34:12 PM
WroteJean, I don't know where your algorithms come from, but it appears SMath uses same/similar algorithms as Matlab.
Source code: Mathcad/Mathsoft "Statistical Electronic Book"
As you know, there are three kinds of lies:
1 white lie... 2. convenient lie ... 3. Statistics
Thanks for checking, thanks Collab NDTMA for checking too.
#6 Posted: 5/30/2018 6:14:36 AM
#7 Posted: 5/30/2018 7:03:22 AM
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#8 Posted: 5/30/2018 7:50:49 AM
Wrote
Source code: Mathcad/Mathsoft "Statistical Electronic Book"
I may have found the issue. Not sure if there is a typo or not in your book, but if you look at the Mathcad Website here: https://help.ptc.com/mathcad/en/index.html#page/PTC_Mathcad_Help/example_kurt_and_skew.html
You will see a formula similar to yours. However, you need to move the StdDev(Y) function outside of the left most expression in each function. I'm not at a computer with Smath right now so I can't verify if it produces the same results. Will check back later.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#9 Posted: 5/30/2018 2:14:55 PM
WroteHowever, you need to move the StdDev(Y) function outside of the left most expression in each function
That is immaterial, the suite of multiplications is commutative.
Smath/Matlab use the same Kurtosis algorithm ... different than Mathcad.
OriginLab 7.5 [formerly Microcal] gives 19 stat parameters wrt to 'Y'
OriginLab 7.5 kurtosis = same as Mathcad [-0.618]
Note that OriginLab is the Bible CAS in Pharmacokinetics.
Smath KurtosisExcess(Y)=-0.775 is much closer ... still troubling.
Cheers ... Jean
Stat Skewness_Kurtosis(Y).sm (32 KiB) downloaded 38 time(s).
#10 Posted: 5/30/2018 2:45:37 PM
Wrote
That is immaterial, the suite of multiplications is commutative.
Yes. but (a*b*c)^4 is much different than (a*b )*C^4 Edit: Whoops I see that it looks right in original file. I miscounted parentheses.

I've done quite a bit of research into this because I've been curious. There are two differences between the Matlab/Smath and Mathcad Functions.
1.) The Matlab kurtosis link mentions this, but the Wolfram link explains it very well. Kurtosis has been historically defined such that a normal distribution has kurtosis of 3. However, Kurtosis Excess is defined with a -3 offset such that a Normal distribution has a Kurtosis Excess of 0. The Mathcad Kurtosis function is really a Kurtosis Excess function such that a normal distribution has a kurtosis of 0.
2.) The second difference is that the Mathcad algorithm accounts for sample size whereas the Matlab/SMath algorithm does not. I found a website here that explains the difference.
Lastly, I performed a small experiment by creating a Matlab based skewness and kurtosis function as well as a mathcad based skewness and kurtosis function. I then created random vectors with increasing sample sizes (from 10 to 1000) and compared the % error from the built in Smath Skewness and Kurtosis functions. As you can see the as the sample size increases the difference between the Matlab and Mathcad algorithms decreases (at least for Skewness). It may take a minute or two to run.
Stat Skewness(Y)_Lyles.sm (31 KiB) downloaded 36 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#11 Posted: 5/30/2018 6:18:16 PM
#12 Posted: 5/30/2018 10:44:21 PM
Thank you both: Alyles, Carlos.
I reconciliated myself with these two descriptive statistic parameters.
In short: as useful as knowing the night of next blue moon, as they refer
strictly to Normal Distribution ... Oh ! there are surely very many in fact.
In real data collection, you are just interested to fit an histogram to some
kind of PDF from known or less common.
Like Mathcad says: value of kurtosis is immaterial, only ±
Stat Skewness_Kurtosis(Y).sm (43 KiB) downloaded 36 time(s).
I reconciliated myself with these two descriptive statistic parameters.
In short: as useful as knowing the night of next blue moon, as they refer
strictly to Normal Distribution ... Oh ! there are surely very many in fact.
In real data collection, you are just interested to fit an histogram to some
kind of PDF from known or less common.
Like Mathcad says: value of kurtosis is immaterial, only ±
Stat Skewness_Kurtosis(Y).sm (43 KiB) downloaded 36 time(s).
#13 Posted: 5/31/2018 12:38:51 AM
#14 Posted: 5/31/2018 11:05:56 AM
Thanks Carlos for your reconciliation ... no more bug !
Stat Skewness_Kurtosis(Y).sm (60 KiB) downloaded 44 time(s).
Stat Skewness_Kurtosis(Y).sm (60 KiB) downloaded 44 time(s).
1 Pages (14 items)
-
New Posts
-
No New Posts