I want to generate a random real number between 0 and 1 but not distributed uniformly but with a probability distribution say,
2 Sin[ pi x ]^2 which integrates to 1 and peaks at $x = 1/2$.
I tried looking for Biased random variables in the HELP tab, but it did not show any hits.
This is my PDF:
pdf = 2 Sin[Pi x]^2