1
$\begingroup$

I am looking for functions that, when plugged into a graphing calculator, draw the line of a normal distribution curve that is skewed to the right. I already have a function for a standard normal distribution curve, and I think what I need is either a new function and/or one or more functions manipulating variables within the main graph function in order to graph a skewed normal distribution curve.

Here is a function that draws a standard normal distribution curve: $$f\left(x\right)=\frac{e^{\left(-\frac{1}{2}\cdot\left(\frac{\left(x-μ\right)}{σ}\right)^{2}\right)}}{σ\cdot\sqrt{2\pi}}$$

Where

  • "σ" is the standard deviation of your data
  • "μ" is the average of your data
  • "e" is Eulers' constant

I use this function to draw the normal distribution curve in this Desmos graph.

I need a function like this (and/or functions manipulating variables within the main function) that can graph a skewed normal distribution curve.

UPDATE: Thanks to Gerry Mason, I was able to get a working skewed normal distribution formula! The FULL formula for a skewed normal distribution curve is this massive equation:(you may need to zoom-in to see some of the variables!):

$$f\left(x\right)=\frac{2e^{\left(\frac{-\left(\left(\frac{x-ξ}{\omega}\right)-μ\right)^{2}}{2σ^{2}}\right)}\cdot\left(1+\frac{2}{\sqrt{\pi}}\int_{0}^{\left(\frac{α\left(x-ξ\right)}{\omega\sqrt{2}}\right)}e^{-t^{2}}dt\right)}{2\omegaσ\sqrt{2\pi}}$$

Where

  • "σ" is the standard deviation of your data
  • "μ" is the average of your data
  • "e" is Eulers' constant
  • "ξ" is the "location parameter (real)
  • "ω" is the "scale" parameter (positive, real)
  • "α" is the "shape" parameter

See the Wikipedia page on Skew Normal Distribution for more information

Here is a link to the updated Desmos graph with all the necessary functions: https://www.desmos.com/calculator/k5y9glwjee

$\endgroup$
4
  • $\begingroup$ Replace $x$ by $\log x$? $\endgroup$ Apr 2, 2020 at 3:06
  • $\begingroup$ Any thoughts on the answer I posted, Maxwell? $\endgroup$ Apr 3, 2020 at 11:42
  • $\begingroup$ Are you still here, Maxwell? $\endgroup$ Apr 4, 2020 at 12:22
  • $\begingroup$ I replied to your answer, @GerryMyerson $\endgroup$ Apr 4, 2020 at 22:51

1 Answer 1

1
$\begingroup$

Wikipedia sez,

Let $\phi(x)$ denote the standard normal probability density function $$\phi(x)={1\over\sqrt{2\pi}}e^{-x^2/2}$$ with cumulative distribution function $$\Phi(x)={1\over2}\left[1+{\rm erf}\left({x\over\sqrt2}\right)\right],$$ where "erf" is the error function. Then the probability density function of the skew-normal distribution with parameter $\alpha$ is given by $$f(x)=2\phi(x)\Phi(\alpha x).$$

$\endgroup$
7
  • $\begingroup$ Hey Gerry, sorry for the late reply. These aren't working for me. The skew of the resulting graph doesn't change when I alter the parameter α. I might be doing something wrong here. In the Cumulative Distribution function, are you multiplying 1/2 by 1+erf(x/sqrt(2)), or do the square brackets mean something else here? $\endgroup$ Apr 4, 2020 at 22:47
  • $\begingroup$ BTW, the formula I'm using for the standard normal probability density function is pretty much the same as the one I provided in the description; I just combined the numerator and denominator and added a few statistical variables (such as "u" for average and "s" for standard deviation) that change the shape of the resulting normal distribution graph depending on the assigned variables. $\endgroup$ Apr 4, 2020 at 22:51
  • $\begingroup$ Yes, it's just multiplying by $1/2$. The graph at en.wikipedia.org/wiki/Skew_normal_distribution#/media/… seems to show the skew changing with $\alpha$. $\endgroup$ Apr 4, 2020 at 22:54
  • $\begingroup$ Here is a link to my graph right now (I am using "f(x)" for your "ϕ(x)", "P(x)" for your "Φ(x)" and "y" for your "f(x)" because Desmos doesn't support "ϕ" or "Φ" for function letters): desmos.com/calculator/osbnm6dq0b $\endgroup$ Apr 4, 2020 at 23:02
  • 1
    $\begingroup$ It's working now! I added the formulas for the "location and scale parameters" discussed further down in that Skew Normal Distribution Wikipedia page you shared, and now I can make a skewed normal distribution graph. Thanks for the help. $\endgroup$ Apr 4, 2020 at 23:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .