Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!x69g2000hsx.googlegroups.com!not-for-mail
From: tenida@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: compute (multimonial type) expression
Date: Wed, 23 Jan 2008 17:10:41 -0800 (PST)
Organization: http://groups.google.com
Lines: 11
Message-ID: <22123f1d-a0b3-42f4-b685-cb52d0793a5b@x69g2000hsx.googlegroups.com>
NNTP-Posting-Host: 12.155.161.182
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1201137042 26613 127.0.0.1 (24 Jan 2008 01:10:42 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 24 Jan 2008 01:10:42 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x69g2000hsx.googlegroups.com; posting-host=12.155.161.182; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
Xref: news.mathworks.com comp.soft-sys.matlab:447330


I need to compute what is the probability of selecting k balls from N
balls where ball j can be picked with prob p_j.

Prob (k balls are picked) = \sum_{i_1}^N \sum_{i_2, i_2 not equal to
i_1}^N......\sum_{i_k=1, i_k not equal to any of i_1,i_2,..,i_{k-1}}^N
p_{i_1} p_{i_2}...p_{i_k} \Prod_{j not equal to i_1, i_2, ..,i_k} (1-
p_j)


how can I compute Prob (k) efficiently, it seems there are N choose K
terms inside and for me N = 350 and K=10 ?