Main Page: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
No edit summary
No edit summary
 
(438 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
In [[statistics]], the '''Neyman-Pearson [[lemma (mathematics)|lemma]]''', named after [[Jerzy Neyman]] and [[Egon Pearson]], states that when performing a [[statistical hypothesis testing|hypothesis test]] between two point  hypotheses ''H''<sub>0</sub>:&nbsp;''θ''&nbsp;=&nbsp;''θ''<sub>0</sub> and ''H''<sub>1</sub>:&nbsp;''θ''&nbsp;=&nbsp;''θ''<sub>1</sub>, then the [[likelihood-ratio test]] which rejects ''H''<sub>0</sub> in favour of ''H''<sub>1</sub> when
This is a preview for the new '''MathML rendering mode''' (with SVG fallback), which is availble in production for registered users.


:<math>\Lambda(x)=\frac{ L( \theta _{0} \mid x)}{ L (\theta _{1} \mid x)} \leq \eta</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]]
where
* Only registered users will be able to execute this rendering mode.
:<math>P(\Lambda(X)\leq \eta|H_0)=\alpha </math>
* Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.


is the '''most powerful test''' of [[Type I and type II errors|size ''&alpha;'']] for a threshold η. If the test is most powerful for all <math>\theta_1 \in \Theta_1</math>, it is said to be [[uniformly most powerful]] (UMP) for alternatives in the set <math>\Theta_1 \, </math>.
Registered users will be able to choose between the following three rendering modes:


In practice, the [[likelihood ratio]] is often used directly to construct tests &mdash; see [[Likelihood-ratio test]]. However it can also be used to suggest particular test-statistics that might be of interest or to suggest simplified tests &mdash; for this one considers algebraic manipulation of the ratio to see if there are key statistics in it related to the size of the ratio (i.e. whether a large statistic corresponds to a small ratio or to a large one).
'''MathML'''
:<math forcemathmode="mathml">E=mc^2</math>


==Proof==
<!--'''PNG'''  (currently default in production)
Define the rejection region of the null hypothesis for the NP test as
:<math forcemathmode="png">E=mc^2</math>
:<math>R_{NP}=\left\{ x: \frac{L(\theta_{0}|x)}{L(\theta_{1}|x)} \leq \eta\right\} .</math>


Any other test will have a different rejection region that we define as <math>R_A</math>. Furthermore, define the probability of the data falling in region R, given parameter <math>\theta</math> as
'''source'''
:<math forcemathmode="source">E=mc^2</math> -->


:<math>P(R,\theta)=\int_R L(\theta|x)\, dx, </math>
<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].


For both tests to have size <math>\alpha</math>, it must be true that
==Demos==


:<math>\alpha= P(R_{NP}, \theta_0)=P(R_A, \theta_0) \,.</math>
Here are some [https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Frederic.wang demos]:


It will be useful to break these down into integrals over distinct regions:


:<math>P(R_{NP},\theta) = P(R_{NP} \cap R_A, \theta) + P(R_{NP} \cap R_A^c, \theta),</math>
* 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.


and
==Test pages ==


:<math>P(R_A,\theta) = P(R_{NP} \cap R_A, \theta) + P(R_{NP}^c \cap R_A, \theta).</math>
To test the '''MathML''', '''PNG''', and '''source''' rendering modes, please go to one of the following test pages:
*[[Displaystyle]]
*[[MathAxisAlignment]]
*[[Styling]]
*[[Linebreaking]]
*[[Unique Ids]]
*[[Help:Formula]]


Setting <math>\theta=\theta_0</math> and equating the above two expression yields that
*[[Inputtypes|Inputtypes (private Wikis only)]]
 
*[[Url2Image|Url2Image (private Wikis only)]]
:<math>P(R_{NP} \cap R_A^c, \theta_0) =  P(R_{NP}^c \cap R_A, \theta_0).</math>
==Bug reporting==
 
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 .
Comparing the powers of the two tests, <math>P(R_{NP},\theta_1)</math> and <math>P(R_A,\theta_1)</math>, one can see that
 
:<math>P(R_{NP},\theta_1) \geq P(R_A,\theta_1) \iff
P(R_{NP} \cap R_A^c, \theta_1) \geq P(R_{NP}^c \cap R_A, \theta_1). </math>
 
Now by the definition of <math>R_{NP}</math>,
 
:<math> P(R_{NP} \cap R_A^c, \theta_1)= \int_{R_{NP}\cap R_A^c} L(\theta_{1}|x)\,dx \geq \frac{1}{\eta} \int_{R_{NP}\cap R_A^c} L(\theta_0|x)\,dx = \frac{1}{\eta}P(R_{NP} \cap R_A^c, \theta_0)</math>
:<math> = \frac{1}{\eta}P(R_{NP}^c \cap R_A, \theta_0) = \frac{1}{\eta}\int_{R_{NP}^c \cap R_A} L(\theta_{0}|x)\,dx \geq \int_{R_{NP}^c\cap R_A} L(\theta_{1}|x)dx  = P(R_{NP}^c \cap R_A, \theta_1).</math>
 
Hence the [[Inequality (mathematics)|inequality]] holds.
 
==Example==
 
Let <math>X_1,\dots,X_n</math> be a random sample from the <math>\mathcal{N}(\mu,\sigma^2)</math> distribution where the mean <math>\mu</math> is known, and suppose that we wish to test for <math>H_0:\sigma^2=\sigma_0^2</math> against <math>H_1:\sigma^2=\sigma_1^2</math>. The likelihood for this set of [[normally distributed]] data is
 
:<math>L\left(\sigma^2;\mathbf{x}\right)\propto \left(\sigma^2\right)^{-n/2} \exp\left\{-\frac{\sum_{i=1}^n \left(x_i-\mu\right)^2}{2\sigma^2}\right\}.</math>
 
We can compute the [[likelihood ratio]] to find the key statistic in this test and its effect on the test's outcome:
 
:<math>\Lambda(\mathbf{x}) = \frac{L\left(\sigma_1^2;\mathbf{x}\right)}{L\left(\sigma_0^2;\mathbf{x}\right)} =
\left(\frac{\sigma_1^2}{\sigma_0^2}\right)^{-n/2}\exp\left\{-\frac{1}{2}(\sigma_1^{-2}-\sigma_0^{-2})\sum_{i=1}^n \left(x_i-\mu\right)^2\right\}.</math>
 
This ratio only depends on the data through <math>\sum_{i=1}^n \left(x_i-\mu\right)^2</math>. Therefore, by the Neyman–Pearson lemma, the most [[Statistical power|powerful]] test of this type of [[Statistical hypothesis testing|hypothesis]] for this data will depend only on <math>\sum_{i=1}^n \left(x_i-\mu\right)^2</math>. Also, by inspection, we can see that if <math>\sigma_1^2>\sigma_0^2</math>, then <math>\Lambda(\mathbf{x})</math> is an [[increasing function]] of <math>\sum_{i=1}^n \left(x_i-\mu\right)^2</math>. So we should reject <math>H_0</math> if <math>\sum_{i=1}^n \left(x_i-\mu\right)^2</math> is sufficiently large. The rejection threshold depends on the [[Type I and type II errors|size]]  of the test. In this example, the test statistic can be shown to be a scaled Chi-square distributed random variable and an exact critical value can be obtained.
 
==See also==
* [[Statistical power]]
 
==References==
* {{cite journal
|title=On the Problem of the Most Efficient Tests of Statistical Hypotheses
|author=[[Jerzy Neyman]], [[Egon Pearson]]
|journal=[[Philosophical Transactions of the Royal Society of London]]. Series A, Containing Papers of a Mathematical or Physical Character
|volume=231
|year=1933
|pages=289–337
|doi=10.1098/rsta.1933.0009
|jstor=91247
}}
*[http://cnx.org/content/m11548/latest/ cnx.org: Neyman-Pearson criterion]
 
==External links==
* Cosma Shalizi, a professor of statistics at Carnegie Mellon University, gives an intuitive derivation of the Neyman-Pearson Lemma [http://cscs.umich.edu/~crshalizi/weblog/630.html using ideas from economics]
 
{{DEFAULTSORT:Neyman–Pearson Lemma}}
[[Category:Statistical theorems]]
[[Category:Statistical tests]]
[[Category:Articles containing proofs]]
 
[[ca:Lema de Neyman-Pearson]]
[[de:Neyman-Pearson-Lemma]]
[[es:Lema de Neyman-Pearson]]
[[fr:Lemme de Neyman-Pearson]]
[[it:Lemma fondamentale di Neyman-Pearson]]
[[he:הלמה של ניימן-פירסון]]
[[ja:ネイマン・ピアソンの補題]]

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 .