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
Reply
 
LinkBack Thread Tools Display Modes
December 6th, 2016, 07:36 AM   #1
Senior Member
 
Joined: Feb 2014

Posts: 112
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?
life24 is offline  
 
December 6th, 2016, 03:42 PM   #2
Global Moderator
 
Joined: May 2007

Posts: 6,205
Thanks: 487

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: 2,279
Thanks: 570

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: CA

Posts: 936
Thanks: 506

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

Posts: 112
Thanks: 1

Excellent and very helpful.
life24 is offline  
Reply

  My Math Forum > College Math Forum > Advanced Statistics

Tags
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 04: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 05:06 AM





Copyright © 2017 My Math Forum. All rights reserved.