上下文
(在本节中,我将以我自己的方式来解释假设检验,键入一个和两个错误等。如果您对此材料感到满意,请跳到下一节)
内曼-皮尔逊引理涉及简单假设检验的问题。在公共空间Ω上,我们有两种不同的概率分布:P0和P1,分别称为原假设和替代假设。基于单个观察ω∈Ω,我们必须拿出一个猜测这两个概率分布的生效。甲测试因此是到每个函数ω分配不是“零假设”或“替代假设”的猜测。显然,可以将测试标识为返回“替代”的区域,因此我们只在寻找概率空间的子集(事件)。
通常,在应用程序中,原假设与某种现状相对应,而替代假设则是您试图证明或反证的某些新现象是真实的。例如,您可能正在测试某人的心理能力。您对带有弯曲线或不弯曲线的卡运行标准测试,并让它们猜测一定次数。零假设是他们只会获得五分之一的权利(因为有五张牌),另一种假设是他们是通灵的,并且可能会获得更多权利。
我们要做的是最大程度地减少犯错的可能性。不幸的是,这是一个毫无意义的概念。您可以通过两种方式犯错。零假设为真,然后在测试的“替代”区域中对ω进行采样,或者替代假设为真,并且对“零”区域进行采样。现在,如果您固定概率空间的区域A(测试),则数字P0(A)和P1(Ac),产生这两种错误的概率是完全定义清楚的,但是由于您没有“原假设/替代假设为真的概率”的先验概念,因此您无法获得有意义的“两种概率的概率”错误”。因此,在数学中这是一个相当典型的情况,我们需要某种对象的“最佳”,但是当您仔细观察时,就没有“最佳”。实际上,我们试图做的是最小化P0(A)而最大化P1(A),这显然是相反的目标。
牢记心理能力测试的示例,我喜欢提到错误的类型,其中null为真,但是您将替代品的结论归类为“ 妄想 ”(您相信那个人的心理,但他不是),并且作为“ 遗忘 ”的其他错误 ”。
引理
Neyman-Pearson引理的方法如下:让我们选择一些我们愿意容忍的最大妄想概率α,然后找到在满足该上限的情况下遗忘概率最小的测试。结果是,此类检验始终采用似然比检验的形式:
主张(Neyman-Pearson引理)
L0,L1α>0A⊆ΩP1(A)P0(A)≤α
A={ω∈Ω∣L1(ω)L0(ω)≥K}
for some constant K>0. Conversely, for any K, the above test has P1(A)≥P1(B) for any B such that P0(B)≤P0(A).
Thus, all we have to do is find the constant K such that P0(A)=α.
The proof on Wikipedia at time of writing is a pretty typically oracular mathematical proof that just consists in conjecturing that form and then verifying that it is indeed optimal. Of course the real mystery is where did this idea of taking a ratio of the likelihoods even came from, and the answer is: the likelihood ratio is simply the density of P1 with respect to P0.
If you've learned probability via the modern approach with Lebesgue integrals and what not, then you know that under fairly unrestrictive conditions, it's always possible to express one probability measure as being given by a density function with respect to another. In the conditions of the Neyman-Pearson lemma, we have two probability measures P0, P1 which both have densities with respect to some underlying measure, usually the counting measure on a discrete space, or the Lebesgue measure on Rn. It turns out that since the quantity that we're interested in controlling is P0(A), we should be taking P0 as our underlying measure, and viewing P1 in terms of how it relates to P0, thus, we consider P1 to be given by a density function with respect to P0.
Buying land
The heart of the lemma is therefore the following:
Let μ be a measure on some space Ω, and let f be a positive, integrable function on Ω. Let α>0. Then the set A with μ(A)≤α which maximizes ∫Afdμ is of the form
{ω∈Ω∣f(ω)≥K}
for some constant K>0, and conversely, any such set maximizes ∫f over all sets B smaller than itself in measure.
Suppose you're buying land. You can only afford α acres, but there's a utility function f over the land, quantifying, say, potential for growing crops, and so you want a region maximizing ∫f. Then the above proposition says that your best bet is to basically order the land from most useful to least useful, and buy it up in order of best to worst until you reach the maximum area α. In hypothesis testing, μ is P0, and f is the density of P1 with respect to P0 (which, as already stated, is L1/L0).
Here's a quick heuristic proof: out of a given region of land A, consider some small one meter by one meter square tile, B. If you can find another tile B′ of the same area somewhere outside of A, but such that the utility of B′ is greater than that of B, then clearly A is not optimal, since it could be improved by swapping B for B′. Thus an optimal region must be "closed upwards", meaning if x∈A and f(y)>f(x), then y must be in A, otherwise we could do better by swapping x and y. This is equivalent to saying that A is simply f−1([K,+∞)) for some K.