Would you tell me the code for Fisher Pearson skewness?
古いコメントを表示
Would you tell me the code for Fisher Pearson skewness?
How can I get the skewness with Fisher Pearson formula..?
採用された回答
その他の回答 (1 件)
Walter Roberson
2022 年 9 月 20 日
FPskewness = sum(x - mean(x)) / numel(x) / std(x).^3
You would need to be more rigourous if you wanted to handle non-vectors.
5 件のコメント
Jeff Miller
2022 年 9 月 21 日
That doesn't look quite right since sum(x-mean(x)) equals 0. Maybe it should be this?
FPskewness = sum( (x - mean(x)).^3 ) / numel(x) / std(x)^3
Walter Roberson
2022 年 9 月 21 日
You could be right; I do find a site that has the ^3 as you indicate. But the initial site I found (which I cannot seem to locate now) and https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/skewness.htm define it as 
Jeff Miller
2022 年 9 月 21 日
OK, but surely that's wrong because the numerator of that g_1 is zero for any vector of x's.
John D'Errico
2022 年 9 月 21 日
Jeff is correct. Skewness would be a scaled (normalized) 3rd central moment, so there MUST be a cube in there.
Hi, what should be changed, in the @Walter Roberson formula, to make it correct? I do not understand...
y = rand(1,100); % some data
m = mean(y);
n = numel(y);
s = skewness(y) % matlab embedded function
scalc = (sum((y - m).^3) / numel(y)) / var(y,1)^(3/2) % David Goodmanson solution
FPskewness = sum(y - mean(y)) / numel(y) / std(y).^3 % Walter Roberson solution
カテゴリ
ヘルプ センター および File Exchange で Waveform Generation についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!