How to find which percentile is a value in a skewed normal distribution












0












$begingroup$


I have a skewed normal distribution for which I know the average, standard deviation, skewness & kurtosis (which is different from zero).



Given a number $X,$ how can estimate which percentile corresponds to that value? (I'm ok with getting an approximate value of this percentile.)



I used z-score tables in the past (before having skewed distributions), but they seem to apply only to non-skewed distributions.



Thanks for your help.










share|cite|improve this question











$endgroup$












  • $begingroup$
    Assuming you mean a skewed normal distribution (as defined at en.wikipedia.org/wiki/Skew_normal_distribution) you could use the method of moments to estimate the parameters of the skewed normal distribution and then estimate any desired function of that distribution. The problem is that you won't know how good your estimate of any percentile will be unless maybe you also have the sample size.
    $endgroup$
    – JimB
    Jan 7 at 15:03












  • $begingroup$
    I have the sample size
    $endgroup$
    – Nisalon
    Jan 7 at 16:16










  • $begingroup$
    If you have the sample size, you could sample from the estimated distribution to get some idea as to how good the parameter estimates might be.
    $endgroup$
    – JimB
    Jan 7 at 16:59
















0












$begingroup$


I have a skewed normal distribution for which I know the average, standard deviation, skewness & kurtosis (which is different from zero).



Given a number $X,$ how can estimate which percentile corresponds to that value? (I'm ok with getting an approximate value of this percentile.)



I used z-score tables in the past (before having skewed distributions), but they seem to apply only to non-skewed distributions.



Thanks for your help.










share|cite|improve this question











$endgroup$












  • $begingroup$
    Assuming you mean a skewed normal distribution (as defined at en.wikipedia.org/wiki/Skew_normal_distribution) you could use the method of moments to estimate the parameters of the skewed normal distribution and then estimate any desired function of that distribution. The problem is that you won't know how good your estimate of any percentile will be unless maybe you also have the sample size.
    $endgroup$
    – JimB
    Jan 7 at 15:03












  • $begingroup$
    I have the sample size
    $endgroup$
    – Nisalon
    Jan 7 at 16:16










  • $begingroup$
    If you have the sample size, you could sample from the estimated distribution to get some idea as to how good the parameter estimates might be.
    $endgroup$
    – JimB
    Jan 7 at 16:59














0












0








0





$begingroup$


I have a skewed normal distribution for which I know the average, standard deviation, skewness & kurtosis (which is different from zero).



Given a number $X,$ how can estimate which percentile corresponds to that value? (I'm ok with getting an approximate value of this percentile.)



I used z-score tables in the past (before having skewed distributions), but they seem to apply only to non-skewed distributions.



Thanks for your help.










share|cite|improve this question











$endgroup$




I have a skewed normal distribution for which I know the average, standard deviation, skewness & kurtosis (which is different from zero).



Given a number $X,$ how can estimate which percentile corresponds to that value? (I'm ok with getting an approximate value of this percentile.)



I used z-score tables in the past (before having skewed distributions), but they seem to apply only to non-skewed distributions.



Thanks for your help.







statistics






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 7 at 14:57









Namaste

1




1










asked Jan 7 at 13:37









NisalonNisalon

162




162












  • $begingroup$
    Assuming you mean a skewed normal distribution (as defined at en.wikipedia.org/wiki/Skew_normal_distribution) you could use the method of moments to estimate the parameters of the skewed normal distribution and then estimate any desired function of that distribution. The problem is that you won't know how good your estimate of any percentile will be unless maybe you also have the sample size.
    $endgroup$
    – JimB
    Jan 7 at 15:03












  • $begingroup$
    I have the sample size
    $endgroup$
    – Nisalon
    Jan 7 at 16:16










  • $begingroup$
    If you have the sample size, you could sample from the estimated distribution to get some idea as to how good the parameter estimates might be.
    $endgroup$
    – JimB
    Jan 7 at 16:59


















  • $begingroup$
    Assuming you mean a skewed normal distribution (as defined at en.wikipedia.org/wiki/Skew_normal_distribution) you could use the method of moments to estimate the parameters of the skewed normal distribution and then estimate any desired function of that distribution. The problem is that you won't know how good your estimate of any percentile will be unless maybe you also have the sample size.
    $endgroup$
    – JimB
    Jan 7 at 15:03












  • $begingroup$
    I have the sample size
    $endgroup$
    – Nisalon
    Jan 7 at 16:16










  • $begingroup$
    If you have the sample size, you could sample from the estimated distribution to get some idea as to how good the parameter estimates might be.
    $endgroup$
    – JimB
    Jan 7 at 16:59
















$begingroup$
Assuming you mean a skewed normal distribution (as defined at en.wikipedia.org/wiki/Skew_normal_distribution) you could use the method of moments to estimate the parameters of the skewed normal distribution and then estimate any desired function of that distribution. The problem is that you won't know how good your estimate of any percentile will be unless maybe you also have the sample size.
$endgroup$
– JimB
Jan 7 at 15:03






$begingroup$
Assuming you mean a skewed normal distribution (as defined at en.wikipedia.org/wiki/Skew_normal_distribution) you could use the method of moments to estimate the parameters of the skewed normal distribution and then estimate any desired function of that distribution. The problem is that you won't know how good your estimate of any percentile will be unless maybe you also have the sample size.
$endgroup$
– JimB
Jan 7 at 15:03














$begingroup$
I have the sample size
$endgroup$
– Nisalon
Jan 7 at 16:16




$begingroup$
I have the sample size
$endgroup$
– Nisalon
Jan 7 at 16:16












$begingroup$
If you have the sample size, you could sample from the estimated distribution to get some idea as to how good the parameter estimates might be.
$endgroup$
– JimB
Jan 7 at 16:59




$begingroup$
If you have the sample size, you could sample from the estimated distribution to get some idea as to how good the parameter estimates might be.
$endgroup$
– JimB
Jan 7 at 16:59










1 Answer
1






active

oldest

votes


















0












$begingroup$

The Wiki page Skew normal distribution provides the information to estimate the parameters using the sample mean ($bar{x}$), standard deviation ($s$), and skewness ($hat{gamma}$). The 3 parameters to be estimated are $mu$, $sigma$, and $alpha$.



If $|hat{gamma}|<1$, then $hat{alpha}$ is found in two steps:



$$delta =sqrt{frac{pi left| hat{gamma} right| ^{2/3}}{2 left(left| hat{gamma} right| ^{2/3}+left(frac{4-pi }{2}right)^{2/3}right)}}$$



$$hat{alpha} = text{sgn}(hat{gamma})sqrt{frac{delta }{1-delta ^2}}$$



Otherwise $hat{alpha}$ is the solution to



$$hat{gamma} =frac{sqrt{2} (4-pi ) hat{alpha} ^3}{left((pi -2) hat{alpha} ^2+pi right)^{3/2}}$$



which needs to be performed numerically. Then $hat{mu}$ and $hat{sigma}$ are



$$hat{sigma} =frac{s}{sqrt{1-frac{2 hat{alpha} ^2}{pi left(hat{alpha} ^2+1right)}}}$$



$$hat{mu} =bar{x}-frac{sqrt{frac{2}{pi }} hat{alpha} hat{sigma} }{sqrt{hat{alpha} ^2+1}}$$



Now armed with the parameter estimates, then one can estimate the cumulative distribution function:



$$Pr(X le x)=Phileft(frac{x, -hat{mu} }{hat{sigma} }right)-2 Tleft(frac{x, -hat{mu} }{hat{sigma} },hat{alpha} right)$$



where $T$ is the Owen's T function: $T(x,a)=frac{int_0^a frac{exp left(-left(left(t^2+1right) x^2right)right)}{2 left(t^2+1right)} , dt}{2 pi }$ .



Here is an implementation using Mathematica:



Mathematica code



I know code should be given as text but in this case because it is unlikely that you have Mathematica (and it would look much messier as text), it should be instructive as to the process.



To estimate the percentage of the distribution no larger than a specified value you'll need to use the cumulative distribution function (CDF) described on the Wiki page. Using Mathematica for values of $X$ being 7.5 and 5.2:



Example of percentiles



If you have access to the statistical package R, then the sn package will perform these calculations.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Sorry, I'm not sure you actually answer my question : how can I get the percentile corresponding to one given number ?
    $endgroup$
    – Nisalon
    Jan 7 at 17:15










  • $begingroup$
    I've added the Mathematica code for that and mentioned the sn package in R.
    $endgroup$
    – JimB
    Jan 7 at 17:57










  • $begingroup$
    I don't want code (as this code will be integrated in PHP), I want to understand the process to be able to implement it
    $endgroup$
    – Nisalon
    Jan 7 at 20:40










  • $begingroup$
    Added a description of the process.
    $endgroup$
    – JimB
    Jan 7 at 21:39











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3065015%2fhow-to-find-which-percentile-is-a-value-in-a-skewed-normal-distribution%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









0












$begingroup$

The Wiki page Skew normal distribution provides the information to estimate the parameters using the sample mean ($bar{x}$), standard deviation ($s$), and skewness ($hat{gamma}$). The 3 parameters to be estimated are $mu$, $sigma$, and $alpha$.



If $|hat{gamma}|<1$, then $hat{alpha}$ is found in two steps:



$$delta =sqrt{frac{pi left| hat{gamma} right| ^{2/3}}{2 left(left| hat{gamma} right| ^{2/3}+left(frac{4-pi }{2}right)^{2/3}right)}}$$



$$hat{alpha} = text{sgn}(hat{gamma})sqrt{frac{delta }{1-delta ^2}}$$



Otherwise $hat{alpha}$ is the solution to



$$hat{gamma} =frac{sqrt{2} (4-pi ) hat{alpha} ^3}{left((pi -2) hat{alpha} ^2+pi right)^{3/2}}$$



which needs to be performed numerically. Then $hat{mu}$ and $hat{sigma}$ are



$$hat{sigma} =frac{s}{sqrt{1-frac{2 hat{alpha} ^2}{pi left(hat{alpha} ^2+1right)}}}$$



$$hat{mu} =bar{x}-frac{sqrt{frac{2}{pi }} hat{alpha} hat{sigma} }{sqrt{hat{alpha} ^2+1}}$$



Now armed with the parameter estimates, then one can estimate the cumulative distribution function:



$$Pr(X le x)=Phileft(frac{x, -hat{mu} }{hat{sigma} }right)-2 Tleft(frac{x, -hat{mu} }{hat{sigma} },hat{alpha} right)$$



where $T$ is the Owen's T function: $T(x,a)=frac{int_0^a frac{exp left(-left(left(t^2+1right) x^2right)right)}{2 left(t^2+1right)} , dt}{2 pi }$ .



Here is an implementation using Mathematica:



Mathematica code



I know code should be given as text but in this case because it is unlikely that you have Mathematica (and it would look much messier as text), it should be instructive as to the process.



To estimate the percentage of the distribution no larger than a specified value you'll need to use the cumulative distribution function (CDF) described on the Wiki page. Using Mathematica for values of $X$ being 7.5 and 5.2:



Example of percentiles



If you have access to the statistical package R, then the sn package will perform these calculations.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Sorry, I'm not sure you actually answer my question : how can I get the percentile corresponding to one given number ?
    $endgroup$
    – Nisalon
    Jan 7 at 17:15










  • $begingroup$
    I've added the Mathematica code for that and mentioned the sn package in R.
    $endgroup$
    – JimB
    Jan 7 at 17:57










  • $begingroup$
    I don't want code (as this code will be integrated in PHP), I want to understand the process to be able to implement it
    $endgroup$
    – Nisalon
    Jan 7 at 20:40










  • $begingroup$
    Added a description of the process.
    $endgroup$
    – JimB
    Jan 7 at 21:39
















0












$begingroup$

The Wiki page Skew normal distribution provides the information to estimate the parameters using the sample mean ($bar{x}$), standard deviation ($s$), and skewness ($hat{gamma}$). The 3 parameters to be estimated are $mu$, $sigma$, and $alpha$.



If $|hat{gamma}|<1$, then $hat{alpha}$ is found in two steps:



$$delta =sqrt{frac{pi left| hat{gamma} right| ^{2/3}}{2 left(left| hat{gamma} right| ^{2/3}+left(frac{4-pi }{2}right)^{2/3}right)}}$$



$$hat{alpha} = text{sgn}(hat{gamma})sqrt{frac{delta }{1-delta ^2}}$$



Otherwise $hat{alpha}$ is the solution to



$$hat{gamma} =frac{sqrt{2} (4-pi ) hat{alpha} ^3}{left((pi -2) hat{alpha} ^2+pi right)^{3/2}}$$



which needs to be performed numerically. Then $hat{mu}$ and $hat{sigma}$ are



$$hat{sigma} =frac{s}{sqrt{1-frac{2 hat{alpha} ^2}{pi left(hat{alpha} ^2+1right)}}}$$



$$hat{mu} =bar{x}-frac{sqrt{frac{2}{pi }} hat{alpha} hat{sigma} }{sqrt{hat{alpha} ^2+1}}$$



Now armed with the parameter estimates, then one can estimate the cumulative distribution function:



$$Pr(X le x)=Phileft(frac{x, -hat{mu} }{hat{sigma} }right)-2 Tleft(frac{x, -hat{mu} }{hat{sigma} },hat{alpha} right)$$



where $T$ is the Owen's T function: $T(x,a)=frac{int_0^a frac{exp left(-left(left(t^2+1right) x^2right)right)}{2 left(t^2+1right)} , dt}{2 pi }$ .



Here is an implementation using Mathematica:



Mathematica code



I know code should be given as text but in this case because it is unlikely that you have Mathematica (and it would look much messier as text), it should be instructive as to the process.



To estimate the percentage of the distribution no larger than a specified value you'll need to use the cumulative distribution function (CDF) described on the Wiki page. Using Mathematica for values of $X$ being 7.5 and 5.2:



Example of percentiles



If you have access to the statistical package R, then the sn package will perform these calculations.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Sorry, I'm not sure you actually answer my question : how can I get the percentile corresponding to one given number ?
    $endgroup$
    – Nisalon
    Jan 7 at 17:15










  • $begingroup$
    I've added the Mathematica code for that and mentioned the sn package in R.
    $endgroup$
    – JimB
    Jan 7 at 17:57










  • $begingroup$
    I don't want code (as this code will be integrated in PHP), I want to understand the process to be able to implement it
    $endgroup$
    – Nisalon
    Jan 7 at 20:40










  • $begingroup$
    Added a description of the process.
    $endgroup$
    – JimB
    Jan 7 at 21:39














0












0








0





$begingroup$

The Wiki page Skew normal distribution provides the information to estimate the parameters using the sample mean ($bar{x}$), standard deviation ($s$), and skewness ($hat{gamma}$). The 3 parameters to be estimated are $mu$, $sigma$, and $alpha$.



If $|hat{gamma}|<1$, then $hat{alpha}$ is found in two steps:



$$delta =sqrt{frac{pi left| hat{gamma} right| ^{2/3}}{2 left(left| hat{gamma} right| ^{2/3}+left(frac{4-pi }{2}right)^{2/3}right)}}$$



$$hat{alpha} = text{sgn}(hat{gamma})sqrt{frac{delta }{1-delta ^2}}$$



Otherwise $hat{alpha}$ is the solution to



$$hat{gamma} =frac{sqrt{2} (4-pi ) hat{alpha} ^3}{left((pi -2) hat{alpha} ^2+pi right)^{3/2}}$$



which needs to be performed numerically. Then $hat{mu}$ and $hat{sigma}$ are



$$hat{sigma} =frac{s}{sqrt{1-frac{2 hat{alpha} ^2}{pi left(hat{alpha} ^2+1right)}}}$$



$$hat{mu} =bar{x}-frac{sqrt{frac{2}{pi }} hat{alpha} hat{sigma} }{sqrt{hat{alpha} ^2+1}}$$



Now armed with the parameter estimates, then one can estimate the cumulative distribution function:



$$Pr(X le x)=Phileft(frac{x, -hat{mu} }{hat{sigma} }right)-2 Tleft(frac{x, -hat{mu} }{hat{sigma} },hat{alpha} right)$$



where $T$ is the Owen's T function: $T(x,a)=frac{int_0^a frac{exp left(-left(left(t^2+1right) x^2right)right)}{2 left(t^2+1right)} , dt}{2 pi }$ .



Here is an implementation using Mathematica:



Mathematica code



I know code should be given as text but in this case because it is unlikely that you have Mathematica (and it would look much messier as text), it should be instructive as to the process.



To estimate the percentage of the distribution no larger than a specified value you'll need to use the cumulative distribution function (CDF) described on the Wiki page. Using Mathematica for values of $X$ being 7.5 and 5.2:



Example of percentiles



If you have access to the statistical package R, then the sn package will perform these calculations.






share|cite|improve this answer











$endgroup$



The Wiki page Skew normal distribution provides the information to estimate the parameters using the sample mean ($bar{x}$), standard deviation ($s$), and skewness ($hat{gamma}$). The 3 parameters to be estimated are $mu$, $sigma$, and $alpha$.



If $|hat{gamma}|<1$, then $hat{alpha}$ is found in two steps:



$$delta =sqrt{frac{pi left| hat{gamma} right| ^{2/3}}{2 left(left| hat{gamma} right| ^{2/3}+left(frac{4-pi }{2}right)^{2/3}right)}}$$



$$hat{alpha} = text{sgn}(hat{gamma})sqrt{frac{delta }{1-delta ^2}}$$



Otherwise $hat{alpha}$ is the solution to



$$hat{gamma} =frac{sqrt{2} (4-pi ) hat{alpha} ^3}{left((pi -2) hat{alpha} ^2+pi right)^{3/2}}$$



which needs to be performed numerically. Then $hat{mu}$ and $hat{sigma}$ are



$$hat{sigma} =frac{s}{sqrt{1-frac{2 hat{alpha} ^2}{pi left(hat{alpha} ^2+1right)}}}$$



$$hat{mu} =bar{x}-frac{sqrt{frac{2}{pi }} hat{alpha} hat{sigma} }{sqrt{hat{alpha} ^2+1}}$$



Now armed with the parameter estimates, then one can estimate the cumulative distribution function:



$$Pr(X le x)=Phileft(frac{x, -hat{mu} }{hat{sigma} }right)-2 Tleft(frac{x, -hat{mu} }{hat{sigma} },hat{alpha} right)$$



where $T$ is the Owen's T function: $T(x,a)=frac{int_0^a frac{exp left(-left(left(t^2+1right) x^2right)right)}{2 left(t^2+1right)} , dt}{2 pi }$ .



Here is an implementation using Mathematica:



Mathematica code



I know code should be given as text but in this case because it is unlikely that you have Mathematica (and it would look much messier as text), it should be instructive as to the process.



To estimate the percentage of the distribution no larger than a specified value you'll need to use the cumulative distribution function (CDF) described on the Wiki page. Using Mathematica for values of $X$ being 7.5 and 5.2:



Example of percentiles



If you have access to the statistical package R, then the sn package will perform these calculations.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 7 at 21:39

























answered Jan 7 at 16:57









JimBJimB

61547




61547












  • $begingroup$
    Sorry, I'm not sure you actually answer my question : how can I get the percentile corresponding to one given number ?
    $endgroup$
    – Nisalon
    Jan 7 at 17:15










  • $begingroup$
    I've added the Mathematica code for that and mentioned the sn package in R.
    $endgroup$
    – JimB
    Jan 7 at 17:57










  • $begingroup$
    I don't want code (as this code will be integrated in PHP), I want to understand the process to be able to implement it
    $endgroup$
    – Nisalon
    Jan 7 at 20:40










  • $begingroup$
    Added a description of the process.
    $endgroup$
    – JimB
    Jan 7 at 21:39


















  • $begingroup$
    Sorry, I'm not sure you actually answer my question : how can I get the percentile corresponding to one given number ?
    $endgroup$
    – Nisalon
    Jan 7 at 17:15










  • $begingroup$
    I've added the Mathematica code for that and mentioned the sn package in R.
    $endgroup$
    – JimB
    Jan 7 at 17:57










  • $begingroup$
    I don't want code (as this code will be integrated in PHP), I want to understand the process to be able to implement it
    $endgroup$
    – Nisalon
    Jan 7 at 20:40










  • $begingroup$
    Added a description of the process.
    $endgroup$
    – JimB
    Jan 7 at 21:39
















$begingroup$
Sorry, I'm not sure you actually answer my question : how can I get the percentile corresponding to one given number ?
$endgroup$
– Nisalon
Jan 7 at 17:15




$begingroup$
Sorry, I'm not sure you actually answer my question : how can I get the percentile corresponding to one given number ?
$endgroup$
– Nisalon
Jan 7 at 17:15












$begingroup$
I've added the Mathematica code for that and mentioned the sn package in R.
$endgroup$
– JimB
Jan 7 at 17:57




$begingroup$
I've added the Mathematica code for that and mentioned the sn package in R.
$endgroup$
– JimB
Jan 7 at 17:57












$begingroup$
I don't want code (as this code will be integrated in PHP), I want to understand the process to be able to implement it
$endgroup$
– Nisalon
Jan 7 at 20:40




$begingroup$
I don't want code (as this code will be integrated in PHP), I want to understand the process to be able to implement it
$endgroup$
– Nisalon
Jan 7 at 20:40












$begingroup$
Added a description of the process.
$endgroup$
– JimB
Jan 7 at 21:39




$begingroup$
Added a description of the process.
$endgroup$
– JimB
Jan 7 at 21:39


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3065015%2fhow-to-find-which-percentile-is-a-value-in-a-skewed-normal-distribution%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Bressuire

Cabo Verde

Gyllenstierna