Discrete distribution with 2 values.

rbernoulli_custom(n, a = -1, b = 1, p = 0.5)

Arguments

n

number of observations.

a

first value.

b

second value.

p

Let X ~ pbernoulli_custom. Then p = Probability(X=a).