## hyp -
set.seed(1953)
r = rhyp(5000, alpha = 1, beta = 0.3, delta = 1)
plot(r, type = "l", col = "steelblue",
main = "hyp: alpha=1 beta=0.3 delta=1")
## hyp -
# Plot empirical density and compare with true density:
hist(r, n = 25, probability = TRUE, border = "white", col = "steelblue")
x = seq(-5, 5, 0.25)
lines(x, dhyp(x, alpha = 1, beta = 0.3, delta = 1))
## hyp -
# Plot df and compare with true df:
plot(sort(r), (1:5000/5000), main = "Probability", col = "steelblue")
lines(x, phyp(x, alpha = 1, beta = 0.3, delta = 1))
## hyp -
# Compute Quantiles:
qhyp(phyp(seq(-5, 5, 1), alpha = 1, beta = 0.3, delta = 1),
alpha = 1, beta = 0.3, delta = 1)
Run the code above in your browser using DataLab