# Function characteristic [on hold]

I'm using the function $$\frac{xe^{-x^2}}{\int_0^1 te^{-t^2} \, dt}$$ as a probability density function for generating numbers between 0 and 1. If I want to increase the probability to the zero (crush it to the zero), I have to increase the exponent using something like $xe^{-8x^2}$, but how can I do this if I want to increase the probability value of the function to zero (to crush it to zero in a way to have a pick to the zero)?

-

## put on hold as unclear what you're asking by Jonas Meyer, Rolf Hoyer, pjs36, Chappers, Joe Johnson 12614 hours ago

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

I edited this for readability and grammar, but I have no idea what is being asked. –  Matthew Conroy May 22 '11 at 20:59
If pick to the zero means peak at zero, simply get rid of the factor $x$ and keep the exponential. –  Did May 31 '11 at 22:56

Well, one thing you could do is generate you variable, $X$, from a mixture density
$$p(x) = \lambda p_{1}(x) + (1-\lambda) p_{2}(x)$$
which is a density as long as $\lambda \in (0,1)$ and $p_{1},p_{2}$ are densities. You could choose $p_{1}$ to be the density you specified above and $p_{2}$ to be, for example, a point mass at 0 (e.g. $p_{2}(0) = 1$ and $p_{2}(x) = 0$ for $x \neq 0$). Specifically, the algorithm to sample from $p$ would be:
1. Generate a bernoulli trial, $Z$, with success probability $\lambda$
2. If $Z=1$ then generate from $X$ from $p_{1}(x)$. If $Z=0$, then $X=0$.
Of course, a better approach would probably be to use the Beta distribution which is a broad distribution supported on $(0,1)$. Parameter values can be chosen to achieve an arbitrary amount of mass near 0.