Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

approximation of Normal to triangular

1 view
Skip to first unread message

Pramod Bansal

unread,
Jun 6, 2001, 5:42:54 PM6/6/01
to
Could someone please tell me how to approximate a normal distribution to a
triangular distribution. It would be great if you could explain with an
example.
Thanks,
Pramod

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pramod Bansal
Graduate Student
Industrial and Systems Engineering
236 NEB
Virginia Tech
Phone: (540)953-2941

--
Posted from lennier.cc.vt.edu [198.82.161.193]
via Mailgate.ORG Server - http://www.Mailgate.ORG

R. Martin

unread,
Jun 6, 2001, 9:34:57 PM6/6/01
to
Pramod Bansal wrote:
>
> Could someone please tell me how to approximate a normal distribution to a
> triangular distribution. It would be great if you could explain with an
> example.
> Thanks,
> Pramod

Hello Pramod,

You might try posting your question at sci.stat.consult and
sci.stat.math, although I'm sure there are readers here who
can help. I'll put in my 2 cents worth here. I imagine how
you'd want to do it depends on your application. As I read it,
you want to find a triangular distribution (symmetric of course)
to use in place of a normal distribution. If so, one way would
be to find the triangular distribution that has the same mean
(trivial) and variance (pretty trivial) as the normal distribution.
Of course, it works going the other way, too. Just find the value
of the mean and variance for the distribution you have and use
those values to calculate the parameters for the formula for the
distribution you want. Since the normal and triangular are both
completely determined by these two parameters (and the normalization
condition, of course), you should have no problem. However, if your
application is such that you need values from the tail of the normal
distribution, then you'll have to figure out how far out on the tail
you need to go in practice, and set the width of your triangular
distribution appropriately and decrease the height of the apex so
that the resulting distribution is normalized, of course. I'd work
it out, but I'm lazy and as a graduate student I'm sure you can work
it out yourself. You can find the formulae you need in _Statistical
Distributions_, by Evens, Hastings and Peacock, 2nd Ed., 1993,
Wiley-Interscience, ISBN: 0-471-55951-2.

Regards,
Russell Martin
--
Today's buggy software is tomorrow's buggy whip.

Lutz Tautenhahn

unread,
Jun 8, 2001, 5:43:45 PM6/8/01
to
Hi Pramod,
it seems to me you have the following problem:
You have a set of data points {x_1, ..., x_n}, which
are normal distributed and want them to be transformed
in a set of data points {y_1, ..., y_n}, which should
be triangular distributed.
You can do this the following way:
If you already know mean and standard deviation of the
normal distributed data points, then skip steps 1 and 2.
1. m=E(x)=sum(x_i)/n
2. s=sqrt(E((x_i-m)^2))=sqrt(sum((x_i-m)^2)/n)
The y_i can be calculeted by solving F_1(x)=F_2(y),
whereby F is the distribution function
F_1(x)=integral(f_1(t)dt) from -oo to x
and
F_2(y)=integral(f_2(t)dt) from -oo to y
and f is the density function
f_1(x)=exp(-(x-m)^2/2*s^2)/(s*sqrt(2*pi))
for the normal distribution and
f_2(y)={0 for y<m-w, 1/w-(m-y)/w^2 for m-w<=y<m,
1/w-(y-m)/w^2 for m<=y<m+w, 0 for m+w<=y}
for the triangular distribution with mean=m and span=2w
Because of the symmetry it is sufficient to find a formula
for the transformation y=T(x) for x>=m; if x<m then
substitute x'=m+(m-x), y'=T(x'), y=m-(y'-m).
By using the fact that F_2(m)=0.5 and F_2(m+w)=1 the integral
can be solved for m<=y<=m+w: F_2(y)=1-(m+w-y)^2/2w^2
By using F_1(x)=F_2(y) you get
y=T(x)=m+w-w*sqrt(2*(1-F_1(x)))
Unfortunately the integral F_1(x) can not be solved analytically,
so you must do this numerically or approximate the integral by a
function which can be integrated analytically.
Eventually you want the normal and the triangular distribution to
have the same standard deviation. For the normal distribution this
was calculated to be s. For the triangular distribution with the
span 2w you get s=sqrt(2*integral(t^2*(1/w-t/w^2) dt) from 0 to w)
s=1/6*sqrt(6)*w, so you must use w=sqrt(6)*s to get the same s.d.
Because it's late and I had a long day and am not verry good in
calculus, I recommend you check the formulas again.
Regards, Lutz Tautenhahn.


0 new messages