# jarquebera: The Jarque-Bera Test for Normality In rpgm: Fast Simulation of Normal/Exponential Random Variables and Stochastic Differential Equations / Poisson Processes

## Description

This test, based on the `skewness` and the `kurtosis` of the vector, computes the p-value associated to the normality of the distribution.

## Usage

 `1` ```jarquebera(x) ```

## Arguments

 `x` numeric, vector of independent and identical random variables

## Details

The Jarque-Bera test is based of the convergence, if the vector is i.i.d. normal random variables, of

skewness(x) -> N(0, 6) ; kurtosis(x) -> N(3, 24)

and moreover, both are asymptotically independent. Then, we have the statistic

J = (n/6)(S^2 + (K-3)^2/4) -> chi^2

## Value

The p-value associated to the test : `1-pchisq(J, 2)`.

## Note

If you choose a test of level alpha, then you reject the null hypothesis of a normal distribution if the p-value returned by the function is lower than alpha.

## Author(s)

Nicolas Baradel - PGM Solutions

## References

https://en.wikipedia.org/wiki/Jarque

 `1` ```jarquebera(rpgm.rnorm(10^5)) ```