Is there an easy algorithm for generating a random distribution within a range but skewed toward the ends?
I guess I am looking for some random distribution $x$ that is parameterized with some parameter $p \in [0,1]$ that might have the following properties, or at least something close to it:
- $-1 \leq x \leq 1$ (I can always transform to some other range)
- $E(x) = 0$
- $E(x^2) = \frac{3-2p}{3}$
so that $p=0$ corresponds to a point distribution at the ends and $p=1$ corresponds to a uniform distribution.