Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!d5g2000hsc.googlegroups.com!not-for-mail
From: NZTideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Calculating cumulative probability
Date: Thu, 14 Feb 2008 19:18:25 -0800 (PST)
Organization: http://groups.google.com
Lines: 53
Message-ID: <52be7c6b-fd15-4936-9384-59515d409df4@d5g2000hsc.googlegroups.com>
References: <fp1qjo$ka8$1@fred.mathworks.com> <fp24vh$49a$1@fred.mathworks.com> 
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1203045505 5313 127.0.0.1 (15 Feb 2008 03:18:25 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 15 Feb 2008 03:18:25 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: d5g2000hsc.googlegroups.com; posting-host=202.78.152.105; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon; 
Xref: news.mathworks.com comp.soft-sys.matlab:451552


On Feb 15, 1:49=A0pm, "Roger Stafford"
<ellieandrogerxy...@mindspring.com.invalid> wrote:
> NZTideMan <mul...@gmail.com> wrote in message
>
> <53ab9842-75a9-4c46-82f2-
> f752beba4...@c4g2000hsg.googlegroups.com>...> Another way is to hit it wit=
h the sledge hammer: Monte Carlo
> > simulation.
> > Sample, say, a million from each distribution, then do a 2-D histogram
> > on the results.
> > Repeat this many times and use allstats (from the File Exchange) to
> > calculate the statistics for each bin in the histogram.
> > When the standard errors for each bin in the histogram reduce to an
> > acceptable level, you're done.
>
> ------------
> =A0 Why on earth should Omkar go to all the trouble of generating pseudo-
> random variables with the given distributions when their densities are alr=
eady
> known and moreover known to be continuous, as has been stated? =A0The idea=

> of using a Monte Carlo method here sounds completely defeatist to me,
> NZTideMan, and I regard it as poor advice!
>
> =A0 Given the stated continuity of the densities, even if an analytic meth=
od of
> integration is not available, the number of samples of these densities whi=
ch is
> necessary to arrive at some given degree of accuracy with numerical
> integration is bound to be far, far smaller than the number of Monte Carlo=

> trials that would achieve that same accuracy.
>
> =A0 Ask how many times one has to flip a coin to determine empirically the=

> probability of heads (assuming we don't already know it) to an accuracy of=

> one part in a million, and you will find that it is of the order of a tril=
lion
> tosses! =A0Monte Carlo methods are only to be used when a statical situati=
on is
> not sufficient well understood for probabilities to be calculated directly=
.
>
> Roger Stafford

Well, for engineering purposes, one part in a thousand is probably
more than enough, but in any case I have this wonderful machine called
a computer, with wonderful software called Matlab that simply LOVES
Monte Carlo simulations.  And for an engineer like me, it's so
intuitive.  But I concede that for known continuous PDFs, it's
overkill.  That's why I called it a sledge-hammer approach.
Nevertheless, it is an alternative.