Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: convolve 2 probability distributions
Date: Tue, 24 Jun 2008 19:59:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <g3rjm6$79h$1@fred.mathworks.com>
References: <g3ra0s$g8k$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1214337542 7473 172.30.248.37 (24 Jun 2008 19:59:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 24 Jun 2008 19:59:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 939004
Xref: news.mathworks.com comp.soft-sys.matlab:475713



"Patrice Tscherrig" <patrice.tscherrig@gmx.ch> wrote in
message <g3ra0s$g8k$1@fred.mathworks.com>...
> Hi  - probably an easy one: 
> 
> How do I nummerically convolve 2 probability distributions
> and see the resulting distribution? 
> 
> i.e.
> P = [(0+eps):0.01:(1-eps)];
> normint = norminv(P,0.05,0.005)
> lognint = logninv(P,log(0.05),3);
> X = lognpdf(lognint,log(0.05),3);
> Y = normpdf(normint,0.05,0.005);
> total = conv(X,Y);
> figure,hist(total)
> 
> Leads not really to the result... Any help?
> 
> Patric


Wouldn't it be easier to just sample from X and Y and do
hist(x+y)?