Description Usage Arguments Details Examples
Irwin-Hall density
1 | dirwin.hall(x, n, log = FALSE)
|
x |
A number between 0 and |
n |
Number of uniform distributions in the unit interval to sum. |
log |
If it evaluates to |
Gives the density of the Irwin-Hall distribution. It is
the density of the sum of n
uniform distributions on the
interval (0,1).
1 __ |_y_| k / n \ n - 1 h(y;n) = --------- \ ( - 1) | | (y - k) (n - 1)! /__ k = 0 \ k /
where x \in [0,1] and n is a positive integer.
This function is not numerically stable. The examples have some cases of this.
1 2 3 4 5 6 7 8 9 | dirwin.hall(2,5)
# Numerically unstable example
# Run the following one after the other
# See how it goes from positive to negative (which means overflowing )
dirwin.hall(35,50)
dirwin.hall(36,50)
dirwin.hall(37,50)
dirwin.hall(38,50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.