Question: New Bernoulli Distribution

Hello,

I need to create a new bernoulli distribution such that P(I=1) = q = 1-P(I=-1).

I did U:=Distribution(PDF=(t->piecewise(t=-1,1-q,t=1,q,0))); but Maple gives me back:

module() option Distribution, Continuous; export...   instead of:

module() option Distribution, Discrete; export...  since the distribution is discrete!!

Do you know a way to force U to be a discrete distribution, cause otherwise I get all moments=0.

Thank you very much,

Bruno.

Please Wait...