Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function generates uniformly random variable on the Cantor set. The distribution provided is singular (neither dsicrite nor absolutely continuous nor a mixture).
1 | rcantor(n)
|
n |
integer, number of simulations. |
The Cantor set is uncountable with Lebesgue's measure 0 which leads to a singular probability distribution. The corresponding cumulative probability distribution is the Devil's staircase. The cantor set can be viewed as the number of the form sum(j=1, +Inf) c_j / 3^j with c_j in {0, 2} and the corresping probability distribution simulates uniformely the c_j (here, to j=32).
A vector of i.i.d. Cantor random variables.
This distribution is provided only for theorical use, not practical.
Nicolas Baradel - PGM Solutions
https://en.wikipedia.org/wiki/Cantor_distribution
http://pgm-solutions.com/packages
1 | rcantor(5)
|
[1] 0.003691901 0.971204712 0.999860616 0.988911421 0.299969752
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.