Path: news.mathworks.com!not-for-mail
From: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Calculating cumulative probability
Date: Fri, 15 Feb 2008 00:49:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 32
Message-ID: <fp2nht$g4m$1@fred.mathworks.com>
References: <fp1qjo$ka8$1@fred.mathworks.com> <fp24vh$49a$1@fred.mathworks.com>  <53ab9842-75a9-4c46-82f2-f752beba4735@c4g2000hsg.googlegroups.com>
Reply-To: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1203036541 16534 172.30.248.38 (15 Feb 2008 00:49:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 15 Feb 2008 00:49:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:451534


NZTideMan <mulgor@gmail.com> wrote in message 
<53ab9842-75a9-4c46-82f2-
f752beba4735@c4g2000hsg.googlegroups.com>...
> Another way is to hit it with 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.
------------
  Why on earth should Omkar go to all the trouble of generating pseudo-
random variables with the given distributions when their densities are already 
known and moreover known to be continuous, as has been stated?  The idea 
of using a Monte Carlo method here sounds completely defeatist to me, 
NZTideMan, and I regard it as poor advice!

  Given the stated continuity of the densities, even if an analytic method of 
integration is not available, the number of samples of these densities which 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.

  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 trillion 
tosses!  Monte Carlo methods are only to be used when a statical situation is 
not sufficient well understood for probabilities to be calculated directly.

Roger Stafford