Re: How to generate random X given only min, max, mean?




"David Winsemius" <dwin$emiu$@comcast.net> wrote in message
news:0-idnV-146rrayzeRVn-qQ@xxxxxxxxxxxxxx
> ----- Original Message -----
> From: <nomail1983@xxxxxxxxxxx>
>
>> Suppose I know only -5 <= X <= 95 with Xmean = 75.
>> I believe that means that P(-5 <= X <= 75) = 20% and
>> P(75 <= X <= 95) = 80%, roughly. Right?
>
> Certainly not in general. A uniform distribution from 74 to 76 would meet
> the requirements specified. Even if you need a non-zero density over the
> entire range, there are still an infinite number of distribution that
> could satisfy those requirements.
>
>> 1. Suppose that I believe X is uniformly distributed in
>> each subrange. Then I could generate random X by:
>>
>> X = if RAND() <= .20 then -5 + 80*RAND() else 75 + 20*RAND()
>>
> That would work if you are forced to use 2 adjacent uniform distributions.
> Which is not a circumstance to which very many physical or economic
> processes would conform.
>
> snip---
>>
>> 2. Suppose that I believe X is "nearly normally" distributed
>> across the range [-5,95], but with a left skew that pulls
>> the mean to the right.
>
> Those appear to be contradictory specifications. A normal distribution is
> most definitely symmetric. No skew, nada, zippo. If you want a
> distribution that is bounded at -5 and 95 AND is unimodal AND is smooth,
> AND skewed, you might look at the beta distribution. You seem to be using
> Excel or something like it, and you can get the cumulative Betadist() from
> the canned functions. If you want the density, you can just calculate the
> differences over a small interval divided by the interval width. Try it
> with parameters A=10; B=2.5. Another option, albeit not a smooth one, but
> somewhat "like" a Gaussian (normal) distribution, would be a triangular
> distribution.
> http://en.wikipedia.org/wiki/Triangular_distribution
>>
>> How would I generate random X? Perhaps
>> something of the form (which is obviously wrong):
>>
>> X = NORMINV(RAND(), 75, 12.5)
>
> Yes. Something of that form. The inverse function of the cdf with an
> argument from the uniform distribution is a typical way to generate random
> numbers from that cdf. Not that any of the Excel random number generators
> necessarily do what Microsoft says they do. A Beta inverse is also offered
> in Excel, perhaps that is what your prof is hinting you could use.
> You might want to look at:
> http://mathworld.wolfram.com/BetaDistribution.html
> http://en.wikipedia.org/wiki/Beta_distribution
>
> Errors or limitations in Excel:
> http://www.stat.uni-muenchen.de/~knuesel/elv/excelxp.pdf
> http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wsc01rng.pdf
> http://www.math.ucalgary.ca/~ware/amat483/papers/random_number_generators.pdf
>
>
> And you might want to apply the hotfix for a bug in the RAND() function
> that was introduced in Excel 2003:
> http://support.microsoft.com/kb/834520/
>
> For years statisticians have been pointing out the limitations and
> outright errors in Excel. Microsoft has consistently closed its ears. I
> was just watching the TV series Rome. Gates == Caesar? The fact that the
> business community does not seem to mind the mistakes in Excel is just
> boggling.
>
> --
> David Winsemius
>
+++++++++++++++++++++++++++++++++++++++++++++++++++++
You didn't search very hard. I put it up back in July.

My URL gives all the errors and faults in the statistical function routines
in Excel 2000 and 2003. It is the most comprehensive of any testing done on
Excel. It is to be cited in CSDA.

The early 2005 Excel 2003 service releases fixed the 2003 fault. Tests on
both the 2000 and 2003 RAND are included in my URL. If you use the Excel
VBA, the =RAND() line returns the Excel 2000 RN. For a cell in Excel 2003,
the =RAND() returns the new RN function. I also report the results of
McCullough's tests on the RN generators, including L'Ecuyer's tests. There
is no agreement among the experts on which test series provides a
good-enough test for use in Excel.

The inverse Beta for 2003 has poor accuracy.

David Heiser


.



Relevant Pages

  • Re: Find a distribution!
    ... >> I am working on a project at a company in Sweden where the amount of ... >> bacterias in food are simulated in Excel. ... > The exponential and the gamma distribution I think can give you quit ... If you're looking at pathogens in food it may be that you ...
    (sci.stat.math)
  • Re: Autocreating probability distribution
    ... this functionality is not built into Excel. ... In the case of the Normal distribution, the NORMDIST function takes its mean ... and standard deviation as arguments. ... Excel probability functions are not consistent as to whether they calculate ...
    (microsoft.public.excel)
  • Re: Continuity correction.
    ... Actually for Excel 2003 and 2007, NORMSDIST is accurate from z values ... MIcrosoft viewed Excel as a business tool. ... marketing advantage to add to Excel's stat capabilities. ... The t distribution only as a test, not a visual concept of the ...
    (sci.stat.math)
  • Re: How to generate random X given only min, max, mean?
    ... A uniform distribution from 74 to 76 would meet ... Even if you need a non-zero density over the ... Not that any of the Excel random number generators ...
    (sci.stat.edu)
  • Re: Random Number Generation Dialog Box
    ... >> Am using Excel 2001 and want to generate some random numbers from a normal ... >> distribution. ... A help search tells me about what looks like a wonder dialog ... > Be aware, however, that the ATP's pseudorandom number generator is not ...
    (microsoft.public.mac.office.excel)