# Is this the Cumulative Distribution Function for a Split Normal Distribution?

The split normal distribution is a probability density function consisting of two halves of normal distributions, one below the mode $\mu$ and one above it, with different standard deviations, scaled to be continuous. It is defined as follows:

$$s(t) = \begin{cases}t\lt\mu & A\exp\left(-\frac{\left(t-\mu\right)^2}{2\sigma^2_1}\right) \\ t\ge\mu & A\exp\left(-\frac{\left(t-\mu\right)^2}{2\sigma^2_2}\right)\end{cases}$$

where $\sigma_1$ and $\sigma_2$ are the standard deviations for the left and right sides, respectively, and $A$ (a constant used to make sure the halves meet) is as follows: $$A = \frac{\sqrt{\frac{2}{\pi}}}{\sigma_1+\sigma_2}$$

I am trying to find such a distribution's cumulative distribution function, as follows: $$S(x) = \int_{-\infty}^{x} s(t)dt$$

Unfortunately, I don't know enough calculus to actually integrate this myself, so I tried to use Wolfram|Alpha. However, I could find no way to input a piecewise function, so I tried my best to rely on integration rules instead. My first thought was to convert $S(x)$ into the following form:

$$S(x) = \begin{cases}t\lt\mu & \int_{-\infty}^t{s(t)dt} \\ t\ge\mu & \int_{-\infty}^\mu{s(t)dt} + \int_\mu^t{s(t)dt} \end{cases}$$

However, Wolfram was unable to evaluate the former integral (in the allotted time), so I had to rephrase it into ones that it could, like this:

$$S(x) = \begin{cases}t\lt\mu & \int_{-\infty}^\mu{s(t)dt} - \int_t^\mu{s(t)dt} \\ t\ge\mu & \int_{-\infty}^\mu{s(t)dt} + \int_\mu^t{s(t)dt}\end{cases}$$

I believe these become this when evaluated (the only difference between the two is the right-side sigmas):

$$S(x) = \begin{cases}t\lt\mu & 2\sigma_1 - 2\sigma_1 \mathrm{erf}\left(\frac{\sqrt{2}\left(u-t\right)}{2\sigma_1}\right) \\ t\ge\mu & 2\sigma_1 - 2\sigma_2 \mathrm{erf}\left(\frac{\sqrt{2}\left(u-t\right)}{2\sigma_2}\right)\end{cases}$$

Are there any mistakes in this process, or is this the correct cumulative density function? I'm not that practiced with manipulating integrals, so I feel like I may be missing some subtle error.

Your cdf solution appears to be wrong because your first part does not depend on $\sigma_2$, whereas both components depend on $\sigma_2$ (via the weighting factor). It is easy to check using a computer algebra system ...

Given $X$ has pdf $f(x)$:

Then, the cdf $P(X<x)$ is:

where I am using the Prob function from the mathStatica package for Mathematica to do the nitty gritties. As disclosure, I should add that I am one of the authors.

I like your Split Normal structure. Here is a plot of the pdf $f(x)$, when the mode $\mu = 0$, $\sigma_1 = 1$ and at 3 different values of $\sigma_2$:

...

and the corresponding cdf plots: