Generating a Random Variable with a Specific Distribution Function

twoski
Messages
177
Reaction score
2

Homework Statement



Give a method for generating a random variable with distribution function

F(x) = 1/2(x+x^{2})

0<x<1

The Attempt at a Solution



From what i can tell i am supposed to do something like:

Let U be a uniformly distributed random variable over (0,1).

U = 1/2(x+x^{2})

2U = x+x^{2}

Am i on the right track?
 
Physics news on Phys.org
twoski said:

Homework Statement



Give a method for generating a random variable with distribution function

F(x) = 1/2(x+x^{2})

0<x<1

The Attempt at a Solution



From what i can tell i am supposed to do something like:

Let U be a uniformly distributed random variable over (0,1).

U = 1/2(x+x^{2})

2U = x+x^{2}

Am i on the right track?

You can answer that for yourself. Does your method match something in your course notes or textbook or in a web page?
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top