[Date Index]
[Thread Index]
[Author Index]
Re: sorry, but more q's on random numbers
*To*: mathgroup at smc.vnet.net
*Subject*: [mg50544] Re: sorry, but more q's on random numbers
*From*: Bill Rowe <readnewsciv at earthlink.net>
*Date*: Thu, 9 Sep 2004 05:19:13 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
On 9/8/04 at 5:15 AM, sean_incali at yahoo.com (sean kim) wrote:
>What kind of distribution do I get if I take the base 10 Log of
>Random[Real, {range}]?
A truncated reflected exponential distribution. For any distribution, the cumulative distribution function, cdf, maps the domain of the distribution to 0,1. In particular, the cdf for the exponential distribution is:
<< "Statistics`"
CDF[ExponentialDistribution[a], x]
1 - E^((-a)*x)
Recognizing this must range from 0 to 1 and 1-Random[] is a uniform random deviate then
Log[10, 1 - %] // PowerExpand
-((a*x)/Log[10])
shows -Log[10,Random[]] to be a exponential distribution. Omitting the minus sign reflects the distribution about the origin. Adding a range restriction truncates the distribution.
>is that Log Uniform? or normal?
No, see above.
>also What's the best way to show what type of distribution it is?
>I was thinking of listplot.
There are a number of ways to show characteristics of the distribution. Which is best depends on what you are trying to show. Most of the time, I would plot some version of the empirical distribution function. For example,
data = Sort@Table[Random[], {25}];
ListPlot[Transpose@
{data,
Rest@FoldList[Plus, 0, data]/Total@data}];
However, often people perfer to see the density function which is approximated by plotting a histogram. The difficulty with plotting histograms is appropriately choosing the bin width.
--
To reply via email subtract one hundred and four
Prev by Date:
**Re: Smallest enclosing circle**
Next by Date:
**Re: Exact real numbers**
Previous by thread:
**Re: sorry, but more q's on random numbers**
Next by thread:
**Re: Re: sorry, but more q's on random numbers**
| |