Convert normal to binomial
Arguments
- x
the normally distributed vector
- size
number of trials (0 or more)
- prob
the probability of success on each trial (0 to 1)
- mu
the mean of x (calculated from x if not given)
- sd
the SD of x (calculated from x if not given)
Examples
x <- rnorm(10000)
y <- norm2binom(x)
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")