MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: sorry, but more q's on random numbers

  • To: mathgroup at
  • Subject: [mg50537] Re: sorry, but more q's on random numbers
  • From: "Steve Luttrell" <steve_usenet at>
  • Date: Thu, 9 Sep 2004 05:18:40 -0400 (EDT)
  • References: <chmomi$a2a$>
  • Sender: owner-wri-mathgroup at

The general rule for transforming probability density functions is

Pr(x) = d(y)/d(x) Pr(y)

where x and y are vector-valued, Pr(x) and Pr(y) are the PDFs expressed in 
x-space and y-space, and d(y)/d(x) is the Jacobian of the transformation.

For your 1-dimensional problem this gives (assuming your range is a<=y<=b 
with a>0 to ensure you avoid the logarithmic singularity at y=0)

P(y) = 1/(b-a), a<=y<=b (and Pr(y)=0 otherwise)

x = log10(y) = ln(y)/ln(10) (using log10 to denote log base 10, and ln to 
denote natural log)

y = exp(x log(10)) = 10^x

d(y)/d(x) = 10^x ln(10)

Pr(x) = 10^x ln(10)/(b-a), log10(a)<=x<=log10(b) (and Pr(x)=0 otherwise)

Sanity check the result
Integrate[10^x Log[10]/(b - a), {x, Log[10, a], Log[10, b]}]

which gives 1 as required.

You can plot this using (for example)


or if you want to show the probability surrounding the region where it is 
non-zero you can use (for example)



Steve Luttrell

"sean kim" <sean_incali at> wrote in message 
news:chmomi$a2a$1 at
> Hello Group,
> I hate to keep revisiting this, but if i may...
> What kind of distribution do I get if I take the base
> 10 Log of Random[Real, {range}]?
> is that Log Uniform? or normal?
> Sorry for such newbie question.
> also What's the best way to show what type of
> distribution it is?  I was thinking of listplot.
> thanks in advance for any insights.
> sean
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!

  • Prev by Date: Re: How to solve a simple Trig cofunction?
  • Next by Date: Re: Exact real numbers
  • Previous by thread: Re: Re: sorry, but more q's on random numbers
  • Next by thread: How to solve a simple Trig cofunction?