Main Page: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(217 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
In [[statistics]], the '''Jarque–Bera test''' is a [[goodness-of-fit]] test of whether sample data have the [[skewness]] and [[kurtosis]] matching a [[normal distribution]]. The test is named after [[Carlos Jarque]] and [[Anil K. Bera]]. The [[test statistic]] ''JB'' is defined as
This is a preview for the new '''MathML rendering mode''' (with SVG fallback), which is availble in production for registered users.


: <math>
If you would like use the '''MathML''' rendering mode, you need a wikipedia user account that can be registered here [[https://en.wikipedia.org/wiki/Special:UserLogin/signup]]
    \mathit{JB} = \frac{n}{6} \left( S^2 + \frac14 (K-3)^2 \right)
* Only registered users will be able to execute this rendering mode.
  </math>
* Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.


where ''n'' is the number of observations (or degrees of freedom in general); ''S'' is the sample [[skewness]], and ''K'' is the sample [[kurtosis]]:
Registered users will be able to choose between the following three rendering modes:  


: <math>
'''MathML'''
    S = \frac{ \hat{\mu}_3 }{ \hat{\sigma}^3 }
:<math forcemathmode="mathml">E=mc^2</math>
        = \frac{\frac1n \sum_{i=1}^n (x_i-\bar{x})^3} {\left(\frac1n \sum_{i=1}^n (x_i-\bar{x})^2 \right)^{3/2}} ,
</math>
: <math>
K = \frac{ \hat{\mu}_4 }{ \hat{\sigma}^4 } 
        = \frac{\frac1n \sum_{i=1}^n (x_i-\bar{x})^4} {\left(\frac1n \sum_{i=1}^n (x_i-\bar{x})^2 \right)^2} ,
</math>


where <math>\hat{\mu}_3</math> and <math>\hat{\mu}_4</math> are the estimates of third and fourth [[central moment]]s, respectively, <math>\bar{x}</math> is the sample [[mean]], and
<!--'''PNG'''  (currently default in production)
<math>\hat{\sigma}^2</math> is the estimate of the second central moment, the [[variance]].
:<math forcemathmode="png">E=mc^2</math>


If the data comes from a normal distribution, the ''JB'' statistic [[asymptotic analysis|asymptotically]] has a [[chi-squared distribution]] with two [[degrees of freedom (statistics)|degrees of freedom]], so the statistic can be used to [[statistical hypothesis testing|test]] the hypothesis that the data are from a [[normal distribution]]. The [[null hypothesis]] is a joint hypothesis of the skewness being zero and the [[excess kurtosis]] being zero. Samples from a normal distribution have an expected skewness of 0 and an expected excess kurtosis of 0 (which is the same as a kurtosis of 3). As the definition of ''JB'' shows, any deviation from this increases the JB statistic.
'''source'''
:<math forcemathmode="source">E=mc^2</math> -->


For small samples the chi-squared approximation is overly sensitive, often rejecting the null hypothesis when it is in fact true. Furthermore, the distribution of p-values departs from a uniform distribution and becomes a right-skewed uni-modal distribution, especially for small p-values. This leads to a large [[Type I error]] rate. The table below shows some p-values approximated by a chi-squared distribution that differ from their true alpha levels for small samples.
<span style="color: red">Follow this [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering link] to change your Math rendering settings.</span> You can also add a [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering-skin Custom CSS] to force the MathML/SVG rendering or select different font families. See [https://www.mediawiki.org/wiki/Extension:Math#CSS_for_the_MathML_with_SVG_fallback_mode these examples].


:{| class="wikitable"
==Demos==
|+Calculated p-value equivalents to true alpha levels at given sample sizes
! True α level !! 20 !! 30 !! 50 !! 70 !! 100
|-
! 0.1
| 0.307 || 0.252 || 0.201 || 0.183 || 0.1560
|-
! 0.05
| 0.1461 || 0.109 || 0.079 || 0.067 || 0.062
|-
! 0.025
| 0.051 || 0.0303 || 0.020 || 0.016 || 0.0168
|-
! 0.01
| 0.0064 || 0.0033 || 0.0015 || 0.0012 || 0.002
|}
(These values have been approximated by using [[Monte Carlo simulation]] in [[Matlab]])


In [[MATLAB]]'s implementation, the chi-squared approximation for the JB statistic's distribution is only used for large sample sizes (>&nbsp;2000). For smaller samples, it uses a table derived from [[Monte Carlo simulations]] in order to interpolate p-values.<ref name="MathWorks">{{cite web|url=http://www.mathworks.com/access/helpdesk/help/toolbox/stats/jbtest.html|title=Analysis of the JB-Test in MATLAB|publisher=MathWorks|accessdate=May 24, 2009}}</ref>
Here are some [https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Frederic.wang demos]:


==History==
Considering normal sampling, and √''β''<sub>1</sub> and ''β''<sub>2</sub> contours, {{harvtxt|Bowman|Shenton|1975}} noticed that the statistic ''JB'' will be asymptotically ''χ''<sup>2</sup>(2)-distributed; however they also noted that “large sample sizes would doubtless be required for the ''χ''<sup>2</sup> approximation to hold”. Bowman and Shelton did not study the properties any further, preferring [[D’Agostino’s K-squared test]].


Around 1979, Anil Bera and [[Carlos Jarque]] while working on their dissertations on regression analysis, have applied the [[Lagrange multiplier principle]] to the [[Pearson distribution|Pearson family of distributions]] to test the normality of unobserved regression residuals and found that the ''JB'' test was asymptotically optimal (although the sample size needed to “reach” the asymptotic level was quite large). In 1980 the authors published a paper ({{harvnb|Jarque|Bera|1980}}), which treated a more advanced case of simultaneously testing the normality, [[homoscedasticity]] and absence of [[autocorrelation]] in the residuals from the [[linear regression model]]. The ''JB'' test was mentioned there as a simpler case. A complete paper about the JB Test was published in the ''International Statistical Review'' in 1987 dealing with both testing the normality of observations and the normality of unobserved regression residuals, and giving finite sample significance points.
* accessibility:
** Safari + VoiceOver: [https://commons.wikimedia.org/wiki/File:VoiceOver-Mac-Safari.ogv video only], [[File:Voiceover-mathml-example-1.wav|thumb|Voiceover-mathml-example-1]], [[File:Voiceover-mathml-example-2.wav|thumb|Voiceover-mathml-example-2]], [[File:Voiceover-mathml-example-3.wav|thumb|Voiceover-mathml-example-3]], [[File:Voiceover-mathml-example-4.wav|thumb|Voiceover-mathml-example-4]], [[File:Voiceover-mathml-example-5.wav|thumb|Voiceover-mathml-example-5]], [[File:Voiceover-mathml-example-6.wav|thumb|Voiceover-mathml-example-6]], [[File:Voiceover-mathml-example-7.wav|thumb|Voiceover-mathml-example-7]]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Audio-Windows7-InternetExplorer.ogg Internet Explorer + MathPlayer (audio)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-SynchronizedHighlighting-WIndows7-InternetExplorer.png Internet Explorer + MathPlayer (synchronized highlighting)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Braille-Windows7-InternetExplorer.png Internet Explorer + MathPlayer (braille)]
** NVDA+MathPlayer: [[File:Nvda-mathml-example-1.wav|thumb|Nvda-mathml-example-1]], [[File:Nvda-mathml-example-2.wav|thumb|Nvda-mathml-example-2]], [[File:Nvda-mathml-example-3.wav|thumb|Nvda-mathml-example-3]], [[File:Nvda-mathml-example-4.wav|thumb|Nvda-mathml-example-4]], [[File:Nvda-mathml-example-5.wav|thumb|Nvda-mathml-example-5]], [[File:Nvda-mathml-example-6.wav|thumb|Nvda-mathml-example-6]], [[File:Nvda-mathml-example-7.wav|thumb|Nvda-mathml-example-7]].
** Orca: There is ongoing work, but no support at all at the moment [[File:Orca-mathml-example-1.wav|thumb|Orca-mathml-example-1]], [[File:Orca-mathml-example-2.wav|thumb|Orca-mathml-example-2]], [[File:Orca-mathml-example-3.wav|thumb|Orca-mathml-example-3]], [[File:Orca-mathml-example-4.wav|thumb|Orca-mathml-example-4]], [[File:Orca-mathml-example-5.wav|thumb|Orca-mathml-example-5]], [[File:Orca-mathml-example-6.wav|thumb|Orca-mathml-example-6]], [[File:Orca-mathml-example-7.wav|thumb|Orca-mathml-example-7]].
** From our testing, ChromeVox and JAWS are not able to read the formulas generated by the MathML mode.


==Jarque–Bera test in regression analysis==
==Test pages ==
According to Robert Hall, David Lilien, et al. (1995) when using this test along with multiple regression analysis the right estimate is:


: <math>
To test the '''MathML''', '''PNG''', and '''source''' rendering modes, please go to one of the following test pages:
    \mathit{JB} = \frac{n-k}{6} \left( S^2 + \frac14 (K-3)^2 \right)
*[[Displaystyle]]
  </math>
*[[MathAxisAlignment]]
*[[Styling]]
*[[Linebreaking]]
*[[Unique Ids]]
*[[Help:Formula]]


where ''n'' is the number of observations and ''k'' is the number of regressors when examining residuals to an equation.
*[[Inputtypes|Inputtypes (private Wikis only)]]
 
*[[Url2Image|Url2Image (private Wikis only)]]
==References==
==Bug reporting==
{{reflist}}
If you find any bugs, please report them at [https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=Math&version=master&short_desc=Math-preview%20rendering%20problem Bugzilla], or write an email to math_bugs (at) ckurs (dot) de .
<HR>
{{refbegin}}
* {{cite journal
  | first1 = K.O. | last1 = Bowman
  | first2 = L.R. | last2 = Shenton
  | title = Omnibus contours for departures from normality based on √''b''<sub>1</sub> and ''b''<sub>2</sub>
  | year = 1975
  | journal = Biometrika
  | volume = 62 | issue = 2
  | pages = 243–250
  | jstor = 2335355
  | ref = CITEREFBowmanShenton1975
  }}
* {{cite journal
  | first1 = Carlos M. | last1 = Jarque | authorlink1 = Carlos Jarque
  | first2 = Anil K. | last2 = Bera
  | title = Efficient tests for normality, homoscedasticity and serial independence of regression residuals
  | year = 1980
  | journal = Economics Letters
  | volume = 6 | issue = 3
  | pages = 255–259
  | doi = 10.1016/0165-1765(80)90024-5
  | ref = CITEREFJarqueBera1980
  }}
* {{cite journal
  | first1 = Carlos M. | last1 = Jarque | authorlink1 = Carlos Jarque
  | first2 = Anil K. | last2 = Bera
  | title = Efficient tests for normality, homoscedasticity and serial independence of regression residuals: Monte Carlo evidence
  | year = 1981
  | journal = Economics Letters
  | volume = 7 | issue = 4
  | pages = 313–318
  | doi = 10.1016/0165-1765(81)90035-5
  | ref = CITEREFJarqueBera1981
  }}
* {{cite journal
  | first1 = Carlos M. | last1 = Jarque | authorlink1 = Carlos Jarque
  | first2 = Anil K. | last2 = Bera
  | title = A test for normality of observations and regression residuals
  | year = 1987
  | journal = International Statistical Review
  | volume = 55 | issue = 2
  | pages = 163–172
  | jstor = 1403192
  | ref = CITEREFJarqueBera1987
  }}
* {{cite book
  | first = | last = Judge
  | coauthors = et al.
  | title = Introduction and the theory and practice of econometrics
  | year = 1988
  | edition = 3rd
  | pages = 890–892
  }}
* {{cite book
  | first1 = Robert E. | last1 = Hall
  | first2 = David M. | last2 = Lilien
  | coauthors = et al.
  | title = EViews User Guide
  | year = 1995
  | pages = 141
  }}
{{refend}}
 
== Implementations ==
* [http://www.alglib.net/statistics/hypothesistesting/jarqueberatest.php ALGLIB] includes implementation of the Jarque–Bera test in C++, C#, Delphi, Visual Basic, etc.
* [[gretl]] includes an implementation of the Jarque–Bera test
* [[R (programming language)|R]] includes implementations of the Jarque–Bera test: ''jarque.bera.test'' in package ''tseries'', for example, and ''jarque.test'' in package ''moments''.
* [[Matlab|MATLAB]] includes implementation of the Jarque–Bera test, the function "jbtest".
* [[Python (programming language)|Python]] [[statsmodels]] includes implementation of the Jarque–Bera test, "statsmodels.stats.stattools.py".
 
{{Statistics}}
 
{{DEFAULTSORT:Jarque-Bera test}}
[[Category:Normality tests]]

Latest revision as of 23:52, 15 September 2019

This is a preview for the new MathML rendering mode (with SVG fallback), which is availble in production for registered users.

If you would like use the MathML rendering mode, you need a wikipedia user account that can be registered here [[1]]

  • Only registered users will be able to execute this rendering mode.
  • Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.

Registered users will be able to choose between the following three rendering modes:

MathML


Follow this link to change your Math rendering settings. You can also add a Custom CSS to force the MathML/SVG rendering or select different font families. See these examples.

Demos

Here are some demos:


Test pages

To test the MathML, PNG, and source rendering modes, please go to one of the following test pages:

Bug reporting

If you find any bugs, please report them at Bugzilla, or write an email to math_bugs (at) ckurs (dot) de .