# Mean and variance of a non-standard pdf

I have tried to compute the variance and the mean for $$\mu=0.5$$ of the following PDF using Wolfram cloud but I failed $$F(z,\mu,\sigma)=\frac{2 (z-\sigma )^2 \exp \left(-\frac{(z-\sigma )^2 \sqrt{\left(1+0.25 \mu ^2\right) 2 \pi } \text{erf}\left(\frac{(z-\sigma )^2 \sqrt{\left(1+0.25 \mu ^2\right) 2 \pi }}{1+0.25 \mu ^2}\right)}{1+0.25 \mu ^2}\right)}{\pi ^2 \sqrt{\left(1+0.25 \mu ^2\right) 2 \pi }}$$

Note: $$\mu \in (0,1)$$, $$z , \sigma$$ are reals and the integrand of that PDF is over $$\sigma$$

I have doubts this is a valid PDF formulation, However I have confirmed many times that is correct , the message I have got from Mathematica is " The integrand has evaluated to non numerical value for a sampling points in the region of boundaries region $$(-\infty,0)$$. Maybe the integrand does not converge under the conditions which I have assumed.

• 1) Kindly add the self-study tag. 2) You appear to have posted a CDF instead of a PDF. Consider the behavior of a CDF towards $+\infty$ and if such a function could have a finite integral on $\mathbb{R}$. – Dave Dec 31 '19 at 0:24
• yes , The integration of that Function over R is a CDF , The limit is finit and lie between 0.96 and 1.04 if am true – zeraoulia rafik Dec 31 '19 at 0:31

Simplifications:

1. replace $$\frac{(z-\sigma )^2 \sqrt{\left(1+0.25 \mu ^2\right) 2 \pi }}{1+0.25 \mu ^2}$$ by $$\frac{(z-\sigma )^2 \sqrt{2 \pi }}{\sqrt{1+0.25 \mu ^2}}$$
2. replace$$z-\sigma$$by $$y$$
3. replace $$\text{Erf}(x)$$ with $$\text{Erf}(x) = 2\Phi(x\sqrt{2}) - 1$$

This leads to consider instead $$\frac{2 y^2}{\pi^2\sqrt{2\pi}} \exp\left\{-\sqrt{2\pi}y^2 \text{erf}\left(y^2 \sqrt{2 \pi }\right)\right\}=\frac{2 y^2}{\pi^2\sqrt{2\pi}} \exp\left\{-\sqrt{2\pi}y^2 \left[2\Phi(2y^2\sqrt{\pi}) - 1\right]\right\}$$ Operate the change of variable $$w=y^2\in(0,\infty)$$, leading to $$\frac{w^{1/2}}{\pi^2\sqrt{2\pi}} \exp\left\{-\sqrt{2\pi}w \left[2\Phi(2w\sqrt{\pi}) - 1\right]\right\}$$ which integrates to something of the order $$10^{-2}$$ over $$(0,\infty)$$ and is thus improperly normalised.

• Is there any possibility to Normalise it ? just to tell me , if no let me know and i do not want wasting my time if it is not possible – zeraoulia rafik Dec 31 '19 at 9:21
• If you divide this function by its integral, which is finite, then it gets normalised. – Xi'an Dec 31 '19 at 10:13

Not sure if this should be a comment or an answer but because this question was simultaneously posted on multiple forums, I placed an answer at Mathematica StackExchange.

In short the pdf is approximately

$$1.0105750026505362 \times \frac{\sqrt[4]{2 \pi }}{\sqrt[4]{1+ \mu^2/4}} \frac{(z-\sigma )^2 \sqrt{2 \pi }}{\sqrt{1+ \mu^2/4}} \exp\left(-\frac{(z-\sigma )^2 \sqrt{2 \pi }}{\sqrt{1+ \mu^2/4}} \text{erf}\left(\frac{(z-\sigma )^2 \sqrt{2 \pi }}{\sqrt{1+ \mu^2/4}}\right) \right)$$

The mean is $$\sigma$$ and because of the symmetry of the pdf all odd central moments are zero. The variance only depends on $$\mu$$:

$$0.282617 \sqrt{\mu ^2+4}$$

(Not that it's wrong but I have no idea why the parameters are labeled $$\sigma$$ and $$\mu$$, respectively, rather than the other way around.)