0
$\begingroup$

In a software I am using, I can use a random generator to estimate the mean value and standard error of the variable; I know the variable has more likely a triangular distribution but only I can specify uniform and normal distribution for random number generator. To estimate a truncated triangular distribution at zero for my variable (regarding it can't get negative sign), would it be correct if I use uniform draw as follows?

TRIANGULAR = (RND1_Uniform[0,1],RND2_Uniform[0,1])/2

  • 0
    what do you mean by (truncated) *triangular* distribution ? there are many *triangles* that can be hypothesized, and truncated where ? can you draw a sketch of the distribution ?2017-02-16

1 Answers 1

0

Imagine a unit square with area = 1. Draw a diagonal line from upper left corner (0,1) to lower-right corner (1,0) of the square. This gives you two triangles. Now (in your mind) take the upper-right triangle and fold it over the diagonal line so that it overlays the lower-left triangle. This gives you a half-triangular distribution.

Now, select a random x from 0 to 1 and a random y from 0 to 1. If x+y < 1 then the point can be plotted on the lower-left triangle. Your function returns x. But if x+y > 1, then the point would fall on the folded-over upper-right triangle. You need to transform the values as follows:

new x = (1-y) new y = (1-x)

and your function returns your new x.