Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Jean Giraud  
#1 Posted : 28 May 2018 07:32:09(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Stat Skewness(Y).sm (11kb) downloaded 27 time(s).

Edited by moderator 28 May 2018 11:59:36(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 28 May 2018 07:46:01(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... kurtosis does not cut the mustard either.

Stat Skewness(Y).sm (13kb) downloaded 28 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 29/05/2018(UTC)
Offline ndtma  
#3 Posted : 29 May 2018 18:22:15(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 348
Man
Sri Lanka
Location: Colombo

Was thanked: 125 time(s) in 82 post(s)
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
Offline alyles  
#4 Posted : 29 May 2018 20:52:33(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 276
United States

Was thanked: 91 time(s) in 57 post(s)
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 (20kb) downloaded 26 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Jean Giraud  
#5 Posted : 30 May 2018 05:34:12(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: alyles Go to Quoted Post
Jean, 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.

Offline ndtma  
#6 Posted : 30 May 2018 12:14:36(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 348
Man
Sri Lanka
Location: Colombo

Was thanked: 125 time(s) in 82 post(s)
Thank you Jean for highlighting this issue.

Sta bug.jpg
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
Offline ndtma  
#7 Posted : 30 May 2018 13:03:22(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 348
Man
Sri Lanka
Location: Colombo

Was thanked: 125 time(s) in 82 post(s)
Forgot to attach the Excel worksheet. Sorry!

Skew & Kurtosis.xlsx (24kb) downloaded 18 time(s).
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
Offline alyles  
#8 Posted : 30 May 2018 13:50:49(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 276
United States

Was thanked: 91 time(s) in 57 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post

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/mat...ample_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.

Untitled drawing.png
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Jean Giraud  
#9 Posted : 30 May 2018 20:14:55(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: alyles Go to Quoted Post
However, 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 (33kb) downloaded 16 time(s).
Offline alyles  
#10 Posted : 30 May 2018 20:45:37(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 276
United States

Was thanked: 91 time(s) in 57 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post

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. Crazy

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.

Untitled.png

Stat Skewness(Y)_Lyles.sm (32kb) downloaded 16 time(s).

Edited by user 30 May 2018 21:20:01(UTC)  | Reason: Not specified

Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline CBG  
#11 Posted : 31 May 2018 00:18:16(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Skewness.png

Skewnesss_and_Kurtosis_Jean_CBG.sm (12kb) downloaded 16 time(s).


Best Regards

Carlos
Offline Jean Giraud  
#12 Posted : 31 May 2018 04:44:21(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
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 (44kb) downloaded 14 time(s).
Offline CBG  
#13 Posted : 31 May 2018 06:38:51(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Skewnesss_and_Kurtosis_Jean_CBG_R1.sm (47kb) downloaded 15 time(s).

Skewness_R1.png

Best Regards

Carlos

Edited by user 31 May 2018 06:49:45(UTC)  | Reason: No part of the Skewness formula was copied

Offline Jean Giraud  
#14 Posted : 31 May 2018 17:05:56(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Thanks Carlos for your reconciliation ... no more bug !

Stat Skewness_Kurtosis(Y).sm (61kb) downloaded 23 time(s).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.