3

I would like to know if it is possible to convert a normal distribution into a triangular distribution. If it is, how it can be done?

I know the mean and the coefficient of variation of the normal distribution.

Glen_b
  • 257,508
  • 32
  • 553
  • 939
blitzstat
  • 47
  • 6
  • It might help if you add some context to this question. Why do you want to do this anyway? – Steve S Jul 31 '14 at 20:44
  • I'm doing some statistics for my thesis and my Professor suggested that i should do it. – blitzstat Jul 31 '14 at 20:53
  • So did your Prof. mean that you should "replace" the normal distribution with the triangular distribution? – Steve S Jul 31 '14 at 20:54
  • Yes, I only have the mean and the CoV of the normal distribution and I should transform it into a triangular distribution. – blitzstat Jul 31 '14 at 20:55
  • It would help if you edit your question to include a little bit of background as to what it is you're doing--I think a little context could be helpful. – Steve S Jul 31 '14 at 20:59
  • 1
    Note: As an aside, I think you have the mean and *variance*... – Steve S Jul 31 '14 at 21:00
  • I got this distribution law from a book and it was written that for geometric purposes (my case), it should be a normal distribution with a CoV=10%. It is all i know. – blitzstat Jul 31 '14 at 21:02
  • First, you only need two things (*parameters*) to define a **Normal Distribution**--the **mean** and the **variance**. In contrast, you say you have the "mean" and "*covariance*", which is something different. – Steve S Jul 31 '14 at 21:08
  • 1
    I don't know if this is going to help in this particular situation here, but if $X\sim \mathrm{N}(\mu, \sigma^{2})$ then $\Phi\left(\frac{X-\mu}{\sigma}\right)\sim U(0,1)$, where $\Phi$ denotes the [CDF of the normal distribution](http://en.wikipedia.org/wiki/Normal_distribution#Cumulative_distribution_function). Once you have a $U(0,1)$ distributed rv, you can easily generate a triangular distribution as described on the [Wikipedia page](http://goo.gl/XMNS3w). But if you have only the coefficient of variation, I don't know how to do it. – COOLSerdash Jul 31 '14 at 21:12
  • @COOLSerdash: **+1** -- It didn't occur to me that it was the *Coefficient of Variation*. – Steve S Jul 31 '14 at 21:15
  • How old is the book you're using? – Steve S Jul 31 '14 at 21:18
  • 1
    Since you have the **CV** it's really easy to calculate the variance from that. – Steve S Jul 31 '14 at 21:19
  • @SteveS's point is spot on: If you know the mean $\mu$ and the [coefficient of variation](http://en.wikipedia.org/wiki/Coefficient_of_variation) $\mathrm{CV}$ of the distribution, then its standard deviation is simply: $\sigma = \mu\cdot \mathrm{CV}$. – COOLSerdash Jul 31 '14 at 21:34
  • 1
    @Cool If you just want to match moments, use $(v+\sqrt{6})\mu/v$ for the upper limit and $\mu-\mu\sqrt{6}/v$ for the lower limit of the triangular distribution where $\mu$ is the Normal mean and $v$ is its CV. (Whether this makes any sense or not in the OP's application is entirely another matter.) – whuber Jul 31 '14 at 21:53
  • @whuber Thanks for the hint. Could you expand how this comes about? I don't understand how $\sqrt{6}$ ends up in there. – COOLSerdash Jul 31 '14 at 22:01
  • What exactly are you after when you say 'convert'? Are you asking for a transformation that takes a normally distributed random variable to a triangular one? Or are you asking for something else? – Glen_b Jul 31 '14 at 22:43
  • 2
    @COOLSerdash The var of a symmetric triangular distribution with mean 0 and upper limit 1 is 1/6. So to get variance matching, you'll have a factor involving $\sqrt{6}$ coming in. – Glen_b Jul 31 '14 at 22:57

1 Answers1

4

Yes, it is possible. Basically, what you need is a function $T:{\mathbb R}\rightarrow[a,b]$ such that $F_{a,b}(x)=\Phi_{\mu,\sigma}\left[T\left(x\right)\right]$, where $F_{a,b}$ is the triangular distribution on $[a,b]$, $\Phi_{\mu,\sigma}$ is the normal distribution with mean $\mu$ and variance $\sigma^2$, and $x\in[a,b]$. Then,

$$T\left(x\right)=\Phi^{-1}_{\mu,\sigma}[F_{a,b}(x)].$$

For $\mu=0,\sigma=1,a=-1,b=-1$, $T$ looks as follows

enter image description here

Also, note that the argument used by @COOLSerdash is valid, but the uniform is on the closed interval $[0,1]$, otherwise you cannot transform it into a closed interval $[a,b]$.

Wipe
  • 56
  • 2
  • 1
    I do not understand that last comment about closed intervals. Since the uniform distribution assigns no probability to the endpoints $\{0,1\}$ it would seem to make no difference whether the interval is open or closed. – whuber Aug 01 '14 at 00:57
  • @whuber I was just recalling the [Inverse transform sampling](http://en.wikipedia.org/wiki/Inverse_transform_sampling#Definition). I think it is impossible to transform (0,1) into [a,b] with an affine (necessarily in this specific case) function. Please, correct me if I am wrong. – Wipe Aug 01 '14 at 01:19
  • 2
    The affine transformation $x\to (b-a)x + a$ maps the interval $(0,1)$ into $(a,b)$ in a one-to-one fashion (provided $a\ne b$). We don't have to worry about the endpoints. – whuber Aug 01 '14 at 02:33
  • @whuber Not in practice, in theory the intervals $(a,b)$ and $[a,b]$ are different objects. – Wipe Aug 01 '14 at 07:19
  • 1
    That's not the issue: of course they are different objects. But the distinction makes absolutely no difference in the definition of continuous distributions. – whuber Aug 01 '14 at 13:12