Skewness and kurtosis of given array
I have given array: [1, 3, 5, 6]. How to calculate skewness and kurtosis of it? There is lots of formulas and I don't know which of them to apply? Also there is different calculators which calculate it differently
example 1: 1.180049,
example 2: 1.57339844872
Please explain how to calculate it properly.
probability statistics
add a comment |
I have given array: [1, 3, 5, 6]. How to calculate skewness and kurtosis of it? There is lots of formulas and I don't know which of them to apply? Also there is different calculators which calculate it differently
example 1: 1.180049,
example 2: 1.57339844872
Please explain how to calculate it properly.
probability statistics
add a comment |
I have given array: [1, 3, 5, 6]. How to calculate skewness and kurtosis of it? There is lots of formulas and I don't know which of them to apply? Also there is different calculators which calculate it differently
example 1: 1.180049,
example 2: 1.57339844872
Please explain how to calculate it properly.
probability statistics
I have given array: [1, 3, 5, 6]. How to calculate skewness and kurtosis of it? There is lots of formulas and I don't know which of them to apply? Also there is different calculators which calculate it differently
example 1: 1.180049,
example 2: 1.57339844872
Please explain how to calculate it properly.
probability statistics
probability statistics
asked Dec 3 '18 at 20:20
TeodorKolev
207212
207212
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
These two values are the respective third and fourth central statistical moments.
AFAIK they're commonly defined to be
$$
begin{equation*}
begin{split}
skewness &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^3 \
kurtosis &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^4 \
end{split}
end{equation*}
$$
for data $x = {x_1,ldots,x_N}$.
Also cf the definitions for skewness and kurtosis.
So for the calculation of the values, you start by calculating the mean value over the array $a$ of length $N$:
$$ mu = N^{-1} sum_{k=1}^N a_k $$
After that, one needs to compute the standard deviation $sigma$:
$$ sigma^2 = N^{-1} sum_{k=1}^N left(a_k - muright)^2 $$
Note that some definitions require $sigma$ to be divided by $N-1$ instead of $N$.
Having both $mu$ and $sigma$, you can compute the skewness and kurtosis of the array.
Now we apply this to the array $a = [1,3,5,6]$:
$$
begin{equation*}
begin{split}
mu &= frac{1}{4} left(1+3+5+6right) = 3.75 \
sigma &= sqrt{frac{1}{4} left((1-3.75)^2+(3-3.75)^2+(5-3.75)^2+(6-3.75)^2right)} = 1.92 \
skewness &= frac{1}{4}left((frac{1-3.75}{1.92})^3+(frac{3-3.75}{1.92})^3+(frac{5-3.75}{1.92})^3+(frac{6-3.75}{1.92})^3right) = -0.278 \
kurtosis &= frac{1}{4}left((frac{1-3.75}{1.92})^4+(frac{3-3.75}{1.92})^4+(frac{5-3.75}{1.92})^4+(frac{6-3.75}{1.92})^4right) = 1.574 \
end{split}
end{equation*}
$$
Simple verification using Python's numpy
:
>>> np.mean([1,3,5,6])
3.75
>>> np.std([1,3,5,6])
1.920286436967152
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**3, [1,3,5,6]))
-0.278155008951823
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**4, [1,3,5,6]))
1.5743375744348693
This answer gives no explanation. I do not understand that formulas. Can you please show how to calculate with numbers of given array?
– TeodorKolev
Dec 3 '18 at 20:25
Why online calculators calculate it differently?
– TeodorKolev
Dec 3 '18 at 20:41
@TeodorKolev Sorry, forgot the square root. Check again. The differnce might arise from different scaling in the standard deviation.
– Thomas Lang
Dec 3 '18 at 20:44
Yet again, numbers are different than calculators
– TeodorKolev
Dec 3 '18 at 20:46
Why? The second calculate says 1.573... and my result is 1.574, but notice for simplicity I rounded to two digits, as the Python version shows. Thus with the usual definitions, the second calculator is right.
– Thomas Lang
Dec 3 '18 at 20:47
|
show 4 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3024607%2fskewness-and-kurtosis-of-given-array%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
These two values are the respective third and fourth central statistical moments.
AFAIK they're commonly defined to be
$$
begin{equation*}
begin{split}
skewness &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^3 \
kurtosis &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^4 \
end{split}
end{equation*}
$$
for data $x = {x_1,ldots,x_N}$.
Also cf the definitions for skewness and kurtosis.
So for the calculation of the values, you start by calculating the mean value over the array $a$ of length $N$:
$$ mu = N^{-1} sum_{k=1}^N a_k $$
After that, one needs to compute the standard deviation $sigma$:
$$ sigma^2 = N^{-1} sum_{k=1}^N left(a_k - muright)^2 $$
Note that some definitions require $sigma$ to be divided by $N-1$ instead of $N$.
Having both $mu$ and $sigma$, you can compute the skewness and kurtosis of the array.
Now we apply this to the array $a = [1,3,5,6]$:
$$
begin{equation*}
begin{split}
mu &= frac{1}{4} left(1+3+5+6right) = 3.75 \
sigma &= sqrt{frac{1}{4} left((1-3.75)^2+(3-3.75)^2+(5-3.75)^2+(6-3.75)^2right)} = 1.92 \
skewness &= frac{1}{4}left((frac{1-3.75}{1.92})^3+(frac{3-3.75}{1.92})^3+(frac{5-3.75}{1.92})^3+(frac{6-3.75}{1.92})^3right) = -0.278 \
kurtosis &= frac{1}{4}left((frac{1-3.75}{1.92})^4+(frac{3-3.75}{1.92})^4+(frac{5-3.75}{1.92})^4+(frac{6-3.75}{1.92})^4right) = 1.574 \
end{split}
end{equation*}
$$
Simple verification using Python's numpy
:
>>> np.mean([1,3,5,6])
3.75
>>> np.std([1,3,5,6])
1.920286436967152
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**3, [1,3,5,6]))
-0.278155008951823
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**4, [1,3,5,6]))
1.5743375744348693
This answer gives no explanation. I do not understand that formulas. Can you please show how to calculate with numbers of given array?
– TeodorKolev
Dec 3 '18 at 20:25
Why online calculators calculate it differently?
– TeodorKolev
Dec 3 '18 at 20:41
@TeodorKolev Sorry, forgot the square root. Check again. The differnce might arise from different scaling in the standard deviation.
– Thomas Lang
Dec 3 '18 at 20:44
Yet again, numbers are different than calculators
– TeodorKolev
Dec 3 '18 at 20:46
Why? The second calculate says 1.573... and my result is 1.574, but notice for simplicity I rounded to two digits, as the Python version shows. Thus with the usual definitions, the second calculator is right.
– Thomas Lang
Dec 3 '18 at 20:47
|
show 4 more comments
These two values are the respective third and fourth central statistical moments.
AFAIK they're commonly defined to be
$$
begin{equation*}
begin{split}
skewness &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^3 \
kurtosis &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^4 \
end{split}
end{equation*}
$$
for data $x = {x_1,ldots,x_N}$.
Also cf the definitions for skewness and kurtosis.
So for the calculation of the values, you start by calculating the mean value over the array $a$ of length $N$:
$$ mu = N^{-1} sum_{k=1}^N a_k $$
After that, one needs to compute the standard deviation $sigma$:
$$ sigma^2 = N^{-1} sum_{k=1}^N left(a_k - muright)^2 $$
Note that some definitions require $sigma$ to be divided by $N-1$ instead of $N$.
Having both $mu$ and $sigma$, you can compute the skewness and kurtosis of the array.
Now we apply this to the array $a = [1,3,5,6]$:
$$
begin{equation*}
begin{split}
mu &= frac{1}{4} left(1+3+5+6right) = 3.75 \
sigma &= sqrt{frac{1}{4} left((1-3.75)^2+(3-3.75)^2+(5-3.75)^2+(6-3.75)^2right)} = 1.92 \
skewness &= frac{1}{4}left((frac{1-3.75}{1.92})^3+(frac{3-3.75}{1.92})^3+(frac{5-3.75}{1.92})^3+(frac{6-3.75}{1.92})^3right) = -0.278 \
kurtosis &= frac{1}{4}left((frac{1-3.75}{1.92})^4+(frac{3-3.75}{1.92})^4+(frac{5-3.75}{1.92})^4+(frac{6-3.75}{1.92})^4right) = 1.574 \
end{split}
end{equation*}
$$
Simple verification using Python's numpy
:
>>> np.mean([1,3,5,6])
3.75
>>> np.std([1,3,5,6])
1.920286436967152
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**3, [1,3,5,6]))
-0.278155008951823
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**4, [1,3,5,6]))
1.5743375744348693
This answer gives no explanation. I do not understand that formulas. Can you please show how to calculate with numbers of given array?
– TeodorKolev
Dec 3 '18 at 20:25
Why online calculators calculate it differently?
– TeodorKolev
Dec 3 '18 at 20:41
@TeodorKolev Sorry, forgot the square root. Check again. The differnce might arise from different scaling in the standard deviation.
– Thomas Lang
Dec 3 '18 at 20:44
Yet again, numbers are different than calculators
– TeodorKolev
Dec 3 '18 at 20:46
Why? The second calculate says 1.573... and my result is 1.574, but notice for simplicity I rounded to two digits, as the Python version shows. Thus with the usual definitions, the second calculator is right.
– Thomas Lang
Dec 3 '18 at 20:47
|
show 4 more comments
These two values are the respective third and fourth central statistical moments.
AFAIK they're commonly defined to be
$$
begin{equation*}
begin{split}
skewness &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^3 \
kurtosis &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^4 \
end{split}
end{equation*}
$$
for data $x = {x_1,ldots,x_N}$.
Also cf the definitions for skewness and kurtosis.
So for the calculation of the values, you start by calculating the mean value over the array $a$ of length $N$:
$$ mu = N^{-1} sum_{k=1}^N a_k $$
After that, one needs to compute the standard deviation $sigma$:
$$ sigma^2 = N^{-1} sum_{k=1}^N left(a_k - muright)^2 $$
Note that some definitions require $sigma$ to be divided by $N-1$ instead of $N$.
Having both $mu$ and $sigma$, you can compute the skewness and kurtosis of the array.
Now we apply this to the array $a = [1,3,5,6]$:
$$
begin{equation*}
begin{split}
mu &= frac{1}{4} left(1+3+5+6right) = 3.75 \
sigma &= sqrt{frac{1}{4} left((1-3.75)^2+(3-3.75)^2+(5-3.75)^2+(6-3.75)^2right)} = 1.92 \
skewness &= frac{1}{4}left((frac{1-3.75}{1.92})^3+(frac{3-3.75}{1.92})^3+(frac{5-3.75}{1.92})^3+(frac{6-3.75}{1.92})^3right) = -0.278 \
kurtosis &= frac{1}{4}left((frac{1-3.75}{1.92})^4+(frac{3-3.75}{1.92})^4+(frac{5-3.75}{1.92})^4+(frac{6-3.75}{1.92})^4right) = 1.574 \
end{split}
end{equation*}
$$
Simple verification using Python's numpy
:
>>> np.mean([1,3,5,6])
3.75
>>> np.std([1,3,5,6])
1.920286436967152
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**3, [1,3,5,6]))
-0.278155008951823
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**4, [1,3,5,6]))
1.5743375744348693
These two values are the respective third and fourth central statistical moments.
AFAIK they're commonly defined to be
$$
begin{equation*}
begin{split}
skewness &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^3 \
kurtosis &= N^{-1} sum_{k=1}^N left(frac{x_k - mu}{sigma}right)^4 \
end{split}
end{equation*}
$$
for data $x = {x_1,ldots,x_N}$.
Also cf the definitions for skewness and kurtosis.
So for the calculation of the values, you start by calculating the mean value over the array $a$ of length $N$:
$$ mu = N^{-1} sum_{k=1}^N a_k $$
After that, one needs to compute the standard deviation $sigma$:
$$ sigma^2 = N^{-1} sum_{k=1}^N left(a_k - muright)^2 $$
Note that some definitions require $sigma$ to be divided by $N-1$ instead of $N$.
Having both $mu$ and $sigma$, you can compute the skewness and kurtosis of the array.
Now we apply this to the array $a = [1,3,5,6]$:
$$
begin{equation*}
begin{split}
mu &= frac{1}{4} left(1+3+5+6right) = 3.75 \
sigma &= sqrt{frac{1}{4} left((1-3.75)^2+(3-3.75)^2+(5-3.75)^2+(6-3.75)^2right)} = 1.92 \
skewness &= frac{1}{4}left((frac{1-3.75}{1.92})^3+(frac{3-3.75}{1.92})^3+(frac{5-3.75}{1.92})^3+(frac{6-3.75}{1.92})^3right) = -0.278 \
kurtosis &= frac{1}{4}left((frac{1-3.75}{1.92})^4+(frac{3-3.75}{1.92})^4+(frac{5-3.75}{1.92})^4+(frac{6-3.75}{1.92})^4right) = 1.574 \
end{split}
end{equation*}
$$
Simple verification using Python's numpy
:
>>> np.mean([1,3,5,6])
3.75
>>> np.std([1,3,5,6])
1.920286436967152
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**3, [1,3,5,6]))
-0.278155008951823
>>> 0.25 * sum(map(lambda x: ((float(x)-3.75)/1.92)**4, [1,3,5,6]))
1.5743375744348693
edited Dec 3 '18 at 20:46
answered Dec 3 '18 at 20:23
Thomas Lang
1624
1624
This answer gives no explanation. I do not understand that formulas. Can you please show how to calculate with numbers of given array?
– TeodorKolev
Dec 3 '18 at 20:25
Why online calculators calculate it differently?
– TeodorKolev
Dec 3 '18 at 20:41
@TeodorKolev Sorry, forgot the square root. Check again. The differnce might arise from different scaling in the standard deviation.
– Thomas Lang
Dec 3 '18 at 20:44
Yet again, numbers are different than calculators
– TeodorKolev
Dec 3 '18 at 20:46
Why? The second calculate says 1.573... and my result is 1.574, but notice for simplicity I rounded to two digits, as the Python version shows. Thus with the usual definitions, the second calculator is right.
– Thomas Lang
Dec 3 '18 at 20:47
|
show 4 more comments
This answer gives no explanation. I do not understand that formulas. Can you please show how to calculate with numbers of given array?
– TeodorKolev
Dec 3 '18 at 20:25
Why online calculators calculate it differently?
– TeodorKolev
Dec 3 '18 at 20:41
@TeodorKolev Sorry, forgot the square root. Check again. The differnce might arise from different scaling in the standard deviation.
– Thomas Lang
Dec 3 '18 at 20:44
Yet again, numbers are different than calculators
– TeodorKolev
Dec 3 '18 at 20:46
Why? The second calculate says 1.573... and my result is 1.574, but notice for simplicity I rounded to two digits, as the Python version shows. Thus with the usual definitions, the second calculator is right.
– Thomas Lang
Dec 3 '18 at 20:47
This answer gives no explanation. I do not understand that formulas. Can you please show how to calculate with numbers of given array?
– TeodorKolev
Dec 3 '18 at 20:25
This answer gives no explanation. I do not understand that formulas. Can you please show how to calculate with numbers of given array?
– TeodorKolev
Dec 3 '18 at 20:25
Why online calculators calculate it differently?
– TeodorKolev
Dec 3 '18 at 20:41
Why online calculators calculate it differently?
– TeodorKolev
Dec 3 '18 at 20:41
@TeodorKolev Sorry, forgot the square root. Check again. The differnce might arise from different scaling in the standard deviation.
– Thomas Lang
Dec 3 '18 at 20:44
@TeodorKolev Sorry, forgot the square root. Check again. The differnce might arise from different scaling in the standard deviation.
– Thomas Lang
Dec 3 '18 at 20:44
Yet again, numbers are different than calculators
– TeodorKolev
Dec 3 '18 at 20:46
Yet again, numbers are different than calculators
– TeodorKolev
Dec 3 '18 at 20:46
Why? The second calculate says 1.573... and my result is 1.574, but notice for simplicity I rounded to two digits, as the Python version shows. Thus with the usual definitions, the second calculator is right.
– Thomas Lang
Dec 3 '18 at 20:47
Why? The second calculate says 1.573... and my result is 1.574, but notice for simplicity I rounded to two digits, as the Python version shows. Thus with the usual definitions, the second calculator is right.
– Thomas Lang
Dec 3 '18 at 20:47
|
show 4 more comments
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3024607%2fskewness-and-kurtosis-of-given-array%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown