My Math Forum  

Go Back   My Math Forum > College Math Forum > Advanced Statistics

Advanced Statistics Advanced Probability and Statistics Math Forum

Thanks Tree1Thanks
  • 1 Post By romsek
LinkBack Thread Tools Display Modes
December 6th, 2016, 07:36 AM   #1
Senior Member
Joined: Feb 2014

Posts: 114
Thanks: 1

Uniform distribution random numbers

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?
life24 is offline  
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?
mathman is offline  
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?
Country Boy is offline  
December 14th, 2016, 08:30 AM   #4
Senior Member
romsek's Avatar
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

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

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

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.
romsek is offline  
December 14th, 2016, 08:34 AM   #5
Senior Member
Joined: Feb 2014

Posts: 114
Thanks: 1

Excellent and very helpful.
life24 is offline  

  My Math Forum > College Math Forum > Advanced Statistics

distribution, numbers, random, uniform

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Uniform distribution of Random variables mia6 Advanced Statistics 1 February 23rd, 2011 02:11 PM
Sum of Two Uniform Random Variables Advanced Statistics 0 February 3rd, 2011 07:24 PM
random vectors - uniform distribution begyu85 Algebra 1 March 28th, 2008 05:31 PM
Finding a distribution function given some random numbers JesusGumbau Algebra 9 December 21st, 2007 05:01 AM
Uniform random variable Mathematics19 Advanced Statistics 1 April 30th, 2007 06:06 AM

Copyright © 2019 My Math Forum. All rights reserved.