[R] Generate random Bernoulli draws

Bert Gunter bgunter@4567 @end|ng |rom gm@||@com
Fri Jul 6 07:32:09 CEST 2018


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 <davidmarino838 using gmail.com>
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]]
>
> ______________________________________________
> R-help using r-project.org 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.
>

	[[alternative HTML version deleted]]




More information about the R-help mailing list