Random variable x
has the probability distribution function (PDF):
f(x) = 1/2 for x ~ [-1, 1]
.f(x) = 0 for x ~ (-inf, 0) (1, inf)
.
Random variable y
is defined as y = x2
.
What is the PDF of y
in that case? How can I generate (pseudo) random numbers that follow the distribution of x
, using the equation given for y
, plotting the histogram of y
?
Aucun commentaire:
Enregistrer un commentaire