Path: news.mathworks.com!not-for-mail
From: "Joni Wahyudi" <joni_hikaru@live.com>
Newsgroups: comp.soft-sys.matlab
Subject: Urgent!! Need Help with Union in probability
Date: Thu, 12 Feb 2009 05:19:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <gn0bg5$8tb$1@fred.mathworks.com>
Reply-To: "Joni Wahyudi" <joni_hikaru@live.com>
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 1234415941 9131 172.30.248.37 (12 Feb 2009 05:19:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 12 Feb 2009 05:19:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1701222
Xref: news.mathworks.com comp.soft-sys.matlab:517784

I have problem about how to make union probability in MATLAB,
P(y1 U y2 U y3 U y4) = ??
I have calculated it, but I thought the result is still wrong. Please help me..
=================================================
K=normrnd(0.3,0.1,200,1);            
M1=normrnd(300,45,200,1);            
uM2=450+0.8*(45/45).*(M1-300);       
sM2=45*sqrt(1-(0.8)^2);              
M2=normrnd(uM2,sM2);                 

g1=4.*M1-1500.*K;                   
g2=4.*M1+2.*M2-1500.*K-1000;        
g3=2.*M1+2.*M2-1000;                
g4=2.*M1+4.*M2-1500.*K-1000;        
y1=(g1<0);
y2=(g2<0);
y3=(g3<0);
y4=(g4<0);
nf=y1+y2+y3+y4;
nF=sum(nf);
pF=nF/200
======================================
At nf=y1+y2+y3+y4 is P(y1 U y2 U y3 U y4) for 1 sample size.
Please recheck it again..