December 6th, 2016, 07:36 AM #1 Senior Member   Joined: Feb 2014 Posts: 114 Thanks: 1 Uniform distribution random numbers hello, For generate Uniform distribution random number we have the below formula. a + (b-a) * r and 0<=r<=1 How can proof the above formula? December 6th, 2016, 03:42 PM #2 Global Moderator   Joined: May 2007 Posts: 6,852 Thanks: 743 You need to give more detail. a,b? Is this to get one number? December 14th, 2016, 06:24 AM #3 Math Team   Joined: Jan 2015 From: Alabama Posts: 3,264 Thanks: 902 You say "prove the above formula" (not "proof"). One "proves" a statement, not a formula. What do you want to prove about it? It is clear that, for any r between 0 and 1, b> a, this produces a number between a and b: 0<= r<= 1 so, multiplying by the positive number, b- a, 0<= r(b- a)<= b- a Then adding a to each part, a<= a+ r(b- a)<= b. Now, what more do you want to do? Do you want to prove that "if r is a random number distributed uniformly between 0 and 1 then a+ r(b- a) is a random number uniformly distributed between a and b? Obviously that will depend on exactly what "uniformly distributed" means! What definition of "uniformly distributed" are you using? December 14th, 2016, 08:30 AM #4 Senior Member   Joined: Sep 2015 From: USA Posts: 2,638 Thanks: 1475 I would guess that this question is given $r$ is a uniform random variate on $[0,1]$ show that $Y=a + (b-a)r$ is a uniform random variate on $[a,b]$ this is pretty simple assume $b > a$ $F_Y(y) = P[Y < y] = P[a + (b-a)r < y] = P[r < \dfrac{y-a}{b-a}]$ $F_Y(y) = \begin{cases} 0 &\dfrac{y-a}{b-a}<0 \\ \dfrac{y-a}{b-a} &0 \leq \dfrac{y-a}{b-a} \leq 1 \\ 1 &\dfrac{y-a}{b-a}>1 \end{cases}$ let's rewrite this a bit to make it clearer $F_Y(y) = \begin{cases} 0 &y < a \\ \dfrac{y-a}{b-a} &a \leq y \leq b \\ 1 &b < y \end{cases}$ to find the PDF of $Y$ we differentiate w/respect to $y$ $f_Y(y) = \begin{cases} 0 &y < a \\ \dfrac{1}{b-a} &a \leq y \leq b \\ 0 &b < y \end{cases}$ This is exactly the PDF of a uniform random variate on $[a,b]$ and thus $Y = a + (b-a)r \sim U[a,b]$ if $b < a$ then just flip $a$ and $b$ and you end up with $a + (b-a)r \sim U[b,a]$ Thanks from life24 Last edited by romsek; December 14th, 2016 at 08:32 AM. December 14th, 2016, 08:34 AM #5 Senior Member   Joined: Feb 2014 Posts: 114 Thanks: 1 Excellent and very helpful. Tags distribution, numbers, random, uniform Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post mia6 Advanced Statistics 1 February 23rd, 2011 02:11 PM Advanced Statistics 0 February 3rd, 2011 07:24 PM begyu85 Algebra 1 March 28th, 2008 05:31 PM JesusGumbau Algebra 9 December 21st, 2007 05:01 AM Mathematics19 Advanced Statistics 1 April 30th, 2007 06:06 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      