Update:
@J.M.'stechnicaldifficulties noted in a comment that the distribution could be written as follows:
BETDistribution[x_, c_] := TransformedDistribution[r1 (1 + r2),
{r1 \[Distributed] BernoulliDistribution[1 - (1 - x)/(1 + (c - 1) x)],
r2 \[Distributed] GeometricDistribution[1 - x]},
Assumptions -> c >= 1 && 0 < x < 1]
Then this allows RandomVariate
to work properly:
SeedRandom[12345];
data = RandomVariate[BETDistribution[1/2, 5], 1000];
So no need for writing one's own functions to obtain random samples.
But there is one unforeseen downside: FindDistributionParameters
is much, much slower with this definition of BETDistribution
. With the above data and the newer definition of BETDistribution
we have the following:
AbsoluteTiming[FindDistributionParameters[data, BETDistribution[x, c]]]
(* {22.7427, {x -> 0.505552, c -> 5.37284}} *)
With the other definition we have
BETDistribution[x_, c_] := ProbabilityDistribution[Piecewise[{{(1 - x)/(1 + (c - 1) x),
k == 0}}, c (1 - x) (x^k)/(1 + (c - 1) x)], {k, 0, ∞, 1},
Assumptions -> c >= 1 && 0 < x < 1]
AbsoluteTiming[FindDistributionParameters[data, BETDistribution[x, c]]]
(* {0.0748486, {c -> 5.37284, x -> 0.505552}} *)
That's 300 times longer with the TransformedDistribution
. (The Rolling Stones said it long ago: "You can't always get what you want.")