Haar | R Documentation |
Density, distribution function and random generation for the uniform distribution.
dhaar(r) phaar(q, lower.tail = TRUE) rhaar(n)
r, q |
vector of quantiles. |
lower.tail |
logical; if TRUE (default), probabilities are P(X ≤ x) otherwise, P(X > x). |
n |
number of observations. If |
The uniform distribution has density
C(r)=[1-cos(r)]/2π
with respect to the Lebesgue
measure. The Haar measure is the volume invariant measure for SO(3) that plays the role
of the uniform measure on SO(3) and C(r) is the angular distribution that corresponds
to the uniform distribution on SO(3), see UARS
. The uniform distribution with respect to the Haar measure is given
by
C(r)=1/(2π).
Because the uniform distribution with respect to the Haar measure gives a horizontal line at 1 with respect to the Lebesgue measure, we called this distribution 'Haar.'
dhaar |
gives the density |
phaar |
gives the distribution function |
rhaar |
generates random deviates |
Angular-distributions for other distributions in the rotations package.
r <- seq(-pi, pi, length = 1000) #Visualize the uniform distribution with respect to Lebesgue measure plot(r, dhaar(r), type = "l", ylab = "f(r)") #Visualize the uniform distribution with respect to Haar measure, which is #a horizontal line at 1 plot(r, 2*pi*dhaar(r)/(1-cos(r)), type = "l", ylab = "f(r)") #Plot the uniform CDF plot(r,phaar(r), type = "l", ylab = "F(r)") #Generate random observations from uniform distribution rs <- rhaar(50) #Visualize on the real line hist(rs, breaks = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.