This function computes the differences among values of a table, used in probability calculations.
Arguments
- P
A numeric vector or matrix representing probabilities.
- first
The starting value for difference calculation.
Examples
P <- c(0.2, 0.3, 0.5)
.Deltas(P)
#> [1] 1