Hi, I haven't any idea about what you ask, but I do know that Rseek.org <http://rseek.org/> is a gold mine! Check out...
https://rseek.org/?q=Bernoulli+random+variable <https://rseek.org/?q=Bernoulli+random+variable> Cheers, Ben > On Jul 6, 2018, at 1:35 AM, Marino David <[email protected]> wrote: > > Dear Bert, > > I know it is a simple question. But for me, at current, I fail to implement > it. So, I ask for help here. > > It is not homework. > > Best, > > David > > 2018-07-06 13:32 GMT+08:00 Bert Gunter <[email protected]>: > >> Is this homework? >> >> (There is an informal no-homework policy on this list). >> >> Cheers, >> Bert >> >> >> >> Bert Gunter >> >> "The trouble with having an open mind is that people keep coming along and >> sticking things into it." >> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) >> >> On Thu, Jul 5, 2018 at 10:23 PM, Marino David <[email protected]> >> wrote: >> >>> Dear All, >>> >>> I would like to generate N random Bernoulli draws given a probability >>> function F(x)=1-exp(-2.5*x) in which x follows uniform distribution, say >>> x~U(0,2). >>> >>> Can some one leave me some code lines for implementing this? >>> >>> Thanks in advance. >>> >>> David >>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________________________ >>> [email protected] mailing list -- To UNSUBSCRIBE and more, see >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide http://www.R-project.org/posti >>> ng-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > Ben Tupper Bigelow Laboratory for Ocean Sciences 60 Bigelow Drive, P.O. Box 380 East Boothbay, Maine 04544 http://www.bigelow.org Ecological Forecasting: https://eco.bigelow.org/ [[alternative HTML version deleted]] ______________________________________________ [email protected] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

