Skip to contents

Create a ddf object for the Rademacher distribution with the given parameters.

Usage

rademacher()

Value

A ddf distribution as described above.

Details

The Rademacher distribution has support \(\{-1,1\}\) with both elements having probability \(\frac{1}{2}\) (that is, it is the discrete uniform distribution on \(\{-1,1\}\)).

It can be used to model simple symmetric random walks with step size 1, especially when being convolved with itself (compare the ‘Examples’).

See also

Examples

rademacher()
#> Rademacher distribution 
#> 
#> Support:
#> [1] -1  1
#> 
#> Probabilities:
#> [1] 0.5 0.5

# Model a symmetric random walk starting at 0
# with step size 1 of length 4
conv_n(rademacher(), 4)
#> 4-fold convolution of Rademacher distribution 
#> 
#> Support:
#> [1] -4 -2  0  2  4
#> 
#> Probabilities:
#> [1] 0.0625 0.2500 0.3750 0.2500 0.0625