Unif.Rd
Uniform distribution with min \(a\) and max \(b\).
expValUnif(min = 0, max = 1) varUnif(min = 0, max = 1) kthMomentUnif(k, min = 0, max = 1) expValLimUnif(d, min = 0, max = 1) expValTruncUnif(d, min = 0, max = 1, less.than.d = TRUE) stopLossUnif(d, min = 0, max = 1) meanExcessUnif(d, min = 0, max = 1) VatRUnif(kap, min = 0, max = 1) TVatRUnif(kap, min = 0, max = 1) mgfUnif(t, min = 0, max = 1)
min | lower and upper limits of the distribution. Must be finite. |
---|---|
max | lower and upper limits of the distribution. Must be finite. |
k | kth-moment. |
d | cut-off value. |
less.than.d | logical; if |
kap | probability. |
t | t. |
Function :
expValUnif
gives the expected value.
varUnif
gives the variance.
kthMomentUnif
gives the kth moment.
expValLimUnif
gives the limited mean.
expValTruncUnif
gives the truncated mean.
stopLossUnif
gives the stop-loss.
meanExcessUnif
gives the mean excess loss.
VatRUnif
gives the Value-at-Risk.
TVatRUnif
gives the Tail Value-at-Risk.
Invalid parameter values will return an error detailing which parameter is problematic.
The (continuous) uniform distribution with min and max parameters \(a\) and \(b\) respectively has density: $$f(x) = \frac{1}{b - a} \times \bm{1}_{\{x \in [a, b] \}}$$ for \(x \in [a, b]\).
expValUnif(min = 3, max = 4)#> [1] 3.5varUnif(min = 3, max = 4)#> [1] 0.08333333kthMomentUnif(k = 2, min = 3, max = 4)#> [1] 12.33333expValLimUnif(d = 3, min = 2, max = 4)#> [1] 2.75expValTruncUnif(d = 3, min = 2, max = 4)#> [1] 1.25# Values greather than d expValTruncUnif(d = 3, min = 2, max = 4, less.than.d = FALSE)#> [1] 1.75stopLossUnif(d = 3, min = 2, max = 4)#> [1] 0.25meanExcessUnif(d = 2, min = 2, max = 4)#> [1] 1VatRUnif(kap = .99, min = 3, max = 4)#> [1] 3.99TVatRUnif(kap = .99, min = 3, max = 4)#> [1] 3.995mgfUnif(t = 2, min = 0, max = 1)#> [1] 3.194528