Jarque-Bera Test: History, Theory, and 5 Key Applications

Imagine you’re conducting research on the financial market and have collected data on daily stock returns. You want to perform statistical analysis, but before applying parametric tests, you need to check if your data is normally distributed. Here comes the Jarque-Bera Test, a powerful tool designed to assess normality based on skewness and kurtosis. In this blog, we will explore the history, theory, real-life applications, hypotheses, alternative tests, and implementation in Python, R, and SPSS.

The Jarque-Bera (JB) test is a statistical tool used to determine whether a given dataset follows a normal distribution. It is particularly useful in fields like finance, economics, and data science, where the assumption of normality is often critical for various analytical models. In this blog, we will explore the history and theory behind the Jarque-Bera test, its real-life applications, and how to perform the test using Python, R, and SPSS. We will also discuss the hypotheses involved, alternative tests, and provide a detailed analysis with a p-value greater than 0.05.

History of the Jarque-Bera Test

The Jarque-Bera test was developed by Carlos Jarque and Anil K. Bera in 1980. It is based on the concept of skewness and kurtosis, which are measures of the asymmetry and peakedness of a distribution, respectively. The test is a goodness-of-fit test, meaning it assesses how well a dataset fits a normal distribution.

The JB test is particularly popular in econometrics and finance, where the normality of residuals is often assumed in regression models. The test is named after its creators, who sought to provide a simple yet powerful tool for testing normality in large datasets.

Theory Behind the Jarque-Bera Test

The Jarque-Bera test is based on the following formula:

\[ JB = \frac{n}{6} \left( S^2 + \frac{1}{4} (K – 3)^2 \right) \]

Where:

– \( n \) is the number of observations in the dataset.

– \( S \) is the skewness of the dataset.

– \( K \) is the kurtosis of the dataset.

Under the null hypothesis, the test statistic follows a chi-square distribution with 2 degrees of freedom. The null hypothesis (\( H_0 \)) is that the data is normally distributed, while the alternative hypothesis (\( H_1 \)) is that the data is not normally distributed.

Hypotheses:

– **Null Hypothesis (\( H_0 \))**: The data is normally distributed.

– **Alternative Hypothesis (\( H_1 \))**: The data is not normally distributed.

 Interpretation:

– If the p-value is greater than 0.05, we fail to reject the null hypothesis, suggesting that the data is normally distributed.

– If the p-value is less than or equal to 0.05, we reject the null hypothesis, indicating that the data is not normally distributed.

Real-Life Example: Financial Portfolio Performance

Let’s consider a real-life example from the field of Financial Portfolio Performance (FPP). Suppose you are analyzing the daily returns of a stock portfolio over the past year. You want to determine whether these returns follow a normal distribution, as this assumption is crucial for various financial models, including the Capital Asset Pricing Model (CAPM) and Value at Risk (VaR) calculations.

Daily Life Example:

Imagine you are an investor tracking the daily returns of your portfolio. You notice that some days the returns are exceptionally high, while on other days, they are unusually low. This variability makes you question whether the returns are normally distributed. By applying the Jarque-Bera test, you can statistically determine whether the returns follow a normal distribution or if there are significant deviations.

Hypothetical Data:

Let’s assume you have the following daily returns (in percentage) for a portfolio over 30 days:

“`

[0.5, 1.2, -0.3, 0.7, -1.1, 0.9, -0.5, 1.5, -0.8, 0.4, 

 1.1, -0.6, 0.8, -1.3, 0.6, -0.9, 1.4, -0.7, 0.3, -1.0, 

 0.5, 1.3, -0.4, 0.9, -1.2, 0.7, -0.5, 1.0, -0.8, 0.6]

 Analysis Code:

 Python:

“`python

import numpy as np

import scipy.stats as stats

Sample data

data = np.array([0.5, 1.2, -0.3, 0.7, -1.1, 0.9, -0.5, 1.5, -0.8, 0.4, 

                 1.1, -0.6, 0.8, -1.3, 0.6, -0.9, 1.4, -0.7, 0.3, -1.0, 

                 0.5, 1.3, -0.4, 0.9, -1.2, 0.7, -0.5, 1.0, -0.8, 0.6])

# Perform Jarque-Bera test

jb_value, p_value = stats.jarque_bera(data)

print(f”Jarque-Bera Test Statistic: {jb_value}”)

print(f”P-value: {p_value}”)

Interpretation

if p_value > 0.05:

    print(“The data is normally distributed (fail to reject H0)”)

else:

    print(“The data is not normally distributed (reject H0)”)

“`

R Code:

“`R

# Sample data

data <- c(0.5, 1.2, -0.3, 0.7, -1.1, 0.9, -0.5, 1.5, -0.8, 0.4, 

          1.1, -0.6, 0.8, -1.3, 0.6, -0.9, 1.4, -0.7, 0.3, -1.0, 

          0.5, 1.3, -0.4, 0.9, -1.2, 0.7, -0.5, 1.0, -0.8, 0.6)

# Perform Jarque-Bera test

library(tseries)

jb_test <- jarque.bera.test(data)

# Print results

print(jb_test)

# Interpretation

if (jb_test$p.value > 0.05) {

  print(“The data is normally distributed (fail to reject H0)”)

} else {

  print(“The data is not normally distributed (reject H0)”)

}

“`

#### SPSS:

  1. Input the data into SPSS.
  2. Go to `Analyze` > `Descriptive Statistics` > `Descriptives`.
  3. Select the variable containing the data.
  4. Click on `Options` and check `Skewness` and `Kurtosis`.
  5. Click `OK` to run the analysis.
  6. Manually calculate the JB statistic using the formula provided earlier.
  7. Compare the JB statistic to the critical value from the chi-square distribution with 2 degrees of freedom.

Results:

Assuming the p-value is greater than 0.05, we would conclude that the daily returns of the portfolio are normally distributed. This means that the variability in returns is consistent with a normal distribution, and the assumptions of many financial models are satisfied.

## Alternative Tests

While the Jarque-Bera test is widely used, there are several alternative tests for normality, including:

  1. **Shapiro-Wilk Test**: This test is more powerful than the JB test for small sample sizes.
  2. **Kolmogorov-Smirnov Test**: This test compares the empirical distribution of the data to a normal distribution.
  3. **Anderson-Darling Test**: This test is a modification of the Kolmogorov-Smirnov test and is more sensitive to deviations in the tails of the distribution.

Each of these tests has its own strengths and weaknesses, and the choice of test may depend on the specific characteristics of the data and the research question at hand.

The Jarque-Bera test is a powerful tool for assessing the normality of a dataset. Its simplicity and ease of interpretation make it a popular choice in various fields, particularly in finance and economics. By understanding the theory behind the test and applying it to real-life examples, we can make more informed decisions based on the distribution of our data.

In this blog, we explored the history and theory of the Jarque-Bera test, applied it to a real-life example in Financial Portfolio Performance, and provided analysis code in Python, R, and SPSS. We also discussed alternative tests and the importance of the normality assumption in statistical modeling.

Q&A

1. What is the Jarque-Bera test used for?

   – The Jarque-Bera test is used to determine whether a dataset follows a normal distribution.

2.Who developed the Jarque-Bera test?

   – The test was developed by Carlos Jarque and Anil K. Bera in 1980.

3. What are the hypotheses of the Jarque-Bera test?

   – The null hypothesis is that the data is normally distributed, and the alternative hypothesis is that the data is not normally distributed.

4. What does a p-value greater than 0.05 indicate in the Jarque-Bera test?

   – A p-value greater than 0.05 suggests that the data is normally distributed (fail to reject the null hypothesis).

5. What are skewness and kurtosis?

   – Skewness measures the asymmetry of the data, while kurtosis measures the peakedness of the data.

6. What are some alternative tests for normality?

   – Alternative tests include the Shapiro-Wilk test, Kolmogorov-Smirnov test, and Anderson-Darling test.

7. Why is the normality assumption important in finance?

   – The normality assumption is important in finance because many financial models, such as CAPM and VaR, rely on the assumption that returns are normally distributed.

8. Can the Jarque-Bera test be used for small sample sizes?

   – The Jarque-Bera test is more suitable for large sample sizes. For small sample sizes, the Shapiro-Wilk test is often preferred.

9. How is the Jarque-Bera test statistic calculated?

   – The test statistic is calculated using the formula: \( JB = \frac{n}{6} \left( S^2 + \frac{1}{4} (K – 3)^2 \right) \).

10. What should you do if the Jarque-Bera test indicates non-normality?

    – If the test indicates non-normality, you may need to consider transforming the data or using non-parametric statistical methods that do not rely on the normality assumption.

By understanding and applying the Jarque-Bera test, you can ensure that your data meets the necessary assumptions for accurate and reliable statistical analysis.

 

Recent Post

Most Read Post

Feature Post

Scroll to Top