X-Received: by 10.42.188.83 with SMTP id cz19mr38945916icb.10.1435060297184; Tue, 23 Jun 2015 04:51:37 -0700 (PDT) X-Received: by 10.140.23.50 with SMTP id 47mr517737qgo.24.1435060297016; Tue, 23 Jun 2015 04:51:37 -0700 (PDT) Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h15no7382098igd.0!news-out.google.com!4ni2535qgh.1!nntp.google.com!q107no2834718qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Tue, 23 Jun 2015 04:51:36 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.78.95.177; posting-account=2czF5goAAAD4GBMPIGV4KcD2K4PhoB_H NNTP-Posting-Host: 50.78.95.177 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <33ea3cd3-bcc0-4e4e-8dbd-c352c91191e9@googlegroups.com> Subject: Re: random generation from discrete probability distribution function From: e.d.programmer@gmail.com Injection-Date: Tue, 23 Jun 2015 11:51:37 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:31847 On Tuesday, June 23, 2015 at 4:46:56 AM UTC-4, Saha wrote: > Hi all, > > I need to code a probability matrix and then choose a random number for each row according to the their probability. > I know I have to use Random(),but I do not know how can I use this one according to the probability. > Also, I need to know how I can code the probability matrix. > > Thanks This sounds like asking someone to do your homework for you.