Probability density use for biased outcome

50 Views Asked by At

I am not a mathematics pro so do not mind if this is dumb

let us suppose I have a method for generating random real values between 0 and 1 . All the values between 0 and 1 are equally likely to be generated . What I want is that based on a variable x which can have value between 0 and 1 , the outcome of my probability generation function become weighted at x.

Something like the Gaussian curve . Please Explain the mathematics of it.

Thanks You .

1

There are 1 best solutions below

0
On

Given a weight function $w:[0,1]\to [0,\infty)$ you can obtain a distribution on $[0,1]$ such that likelihood of getting $x$ is proportional to $w(x)$. For example, if you draw two times for the distribution your random number generated (equally likelihood on $[0,1]$), and divide the result by two, then the weighting function will be $w(x) = x(1-x)$ that is the closer you are to $\frac12$ the bigger is the weight.