Uniformity test on the Sphere

Uniformity test on the Sphere

We generated \(n=200\) observations from the uniform distribution on \(S^{d-1}\), with \(d=3\), and \(\rho = 0.7\).

library(QuadratiK)
n <- 200
d <- 3
set.seed(2468)
z <- matrix(rnorm(n * d), n, d)
dat_sphere <- z/sqrt(rowSums(z^2))

The pk.test is used for testing uniformity of the generated sample.

rho <- 0.7
set.seed(2468)
res_unif <- pk.test(x=dat_sphere, rho=rho)

res_unif
## 
##  Poisson Kernel-based quadratic distance test of 
##                         Uniformity on the Sphere 
## Selected consentration parameter rho:  0.7 
## 
## U-statistic:
## 
## H0 is rejected:  FALSE 
## Statistic Un:  -0.9756673 
## Critical value:  1.725683 
## 
## V-statistic:
## 
## H0 is rejected:  FALSE 
## Statistic Vn:  14.89598 
## Critical value:  23.22949

The summary method for the pk.test output object provides the results of the performed test, and generates a figure showing the qq-plots against the uniform distribution of each variable with a table of standard descriptive statistics.

summary_unif <- summary(res_unif)
## 
##  Poisson Kernel-based quadratic distance test of 
##                         Uniformity on the Sphere 
##   Test_Statistics Critical_Value Reject_H0
## 1      -0.9756673       1.725683     FALSE
## 2      14.8959834      23.229487     FALSE

The figure automatically generated by the summary function on the result of the test for uniformity displays the qq-plots between the given samples and the uniform distribution with a table of the standard descriptive statistics for each variable.