Root Finding

Case study: Quantile function Hoyt distribution

The cumulative distribution function \(F(x)\) of the Hoyt distribution is given in closed form, but the quantile function \(Q(p)\) is not. \(Q(p)\) = \(F^{-1}(p)\) -> given probability \(p\), find \(x\) such that \(F(x) = p\).

Strictly monotonous function \(f: F() - p\) where the root \(x\) needs to be found such that \(F(x) - p = 0\).

Implement the quantile function of the Hoyt distribution by doing root finding of \(f\).

[1] 3.351123

Simulate random deviates from the Hoyt distribution using inverse transform sampling = draw \(p\) from uniform distribution over \([0,1]\) and return \(Q(p)\).

Check that empirical cumulative distribution of random deviates actually follows theoretical cumulative distribution function.

plot of chunk numRoot1
plot of chunk numRoot1

Further resources

Useful packages

Get the article source from GitHub

R markdown - markdown - R code - all posts