1、 A Bayesian ruleBiass Law (Bayestheorem/Bayes theorem/Bayesian law) Bias was a basic tool called Biass law, although it is a mathematical formula, but the principle can be understood without digital. If you see a person always do some good, then that person will probably be a good man. That is to sa
2、y, when cannot accurately knows the essence of a thing, can how much depends on the specific nature of the events and things appear to judge the nature of probability. It is expressed in mathematical language: support a property of the event of the possibility, the attribute set is big.The basic con
3、cept贝叶斯法则又被称为贝叶斯定理、贝叶斯法则是概率统计中的应用所观察到的现象对有关概率分布的主观判断(即先验概率)进行修正的标准方法。 所谓贝叶斯法则,是指当分析样本大到接近总体数时,样本中事件发生的概率将接近于总体中事件发生的概率。 但行为经济学家发现,人们在决策过程中往往并不遵循贝叶斯规律,而是给予最近发生的事件和最新的经验以更多的权值,在决策和做出判断时过分看重近期的事件。面对复杂而笼统的问题,人们往往走捷径,依据可能性而非根据概率来决策。这种对经典模型的系统性偏离称为“偏差”。由于心理偏差的存在,投资者在决策判断时并非绝对理性,会行为偏差,进而影响资本市场上价格的变动。但长期以来,
4、由于缺乏有力的替代工具,经济学家不得不在分析中坚持贝叶斯法则。Biass law is also known as the Bias theorem, Biass law is the application of probability and statistics of the observed phenomena on subjective judgments about the probability distribution (i.e., prior probability) standard correction method. The so-called Bayesian rul
5、e, when analyzing samples to close to the overall number, probability sample of events will be close to the overall probability of events. But the behavioral economists found, people in the decision-making process is often not followed by Bayesian rule, but given recent events and the latest experie
6、nce with more weight, recent events have too much weight to make judgments in the decision-making and. In the face of the complex and the general questions, people often take shortcuts, on the basis of probability rather than according to probability decision. System of this classic model called dev
7、iation deviation. Because of the psychological bias, investors are not in decision making when absolutely rational, behavior deviation, and the impact of price changes on the capital market. But for a long time, because of the lack of a strong alternative tools, economists have to adhere to the Baye
8、s rule in the analysis.Principle通常,事件A在事件B(发生)的条件下的概率,与事件B在事件A的条件下的概率是不一样的;然而,这两者是有确定的关系,贝叶斯法则就是这种关系的陈述。 作为一个规范的原理,贝叶斯法则对于所有概率的解释是有效的;然而,频率主义者和贝叶斯主义者对于在应用中概率如何被赋值有着不同的看法:频率主义者根据随机事件发生的频率,或者总体样本里面的个数来赋值概率;贝叶斯主义者要根据未知的命题来赋值概率。一个结果就是,贝叶斯主义者有更多的机会使用贝叶斯法则。 贝叶斯法则是关于随机事件A和B的条件概率和边缘概率的。 Pr(A|B) = fracPr(B |
9、 A), Pr(A)Pr(B)propto L(A | B), Pr(A) ! 其中L(A|B)是在B发生的情况下A发生的可能性。 在贝叶斯法则中,每个名词都有约定俗成的名称: Pr(A)是A的先验概率或边缘概率。之所以称为先验是因为它不考虑任何B方面的因素。 Pr(A|B)是已知B发生后A的条件概率,也由于得自B的取值而被称作A的后验概率。 Pr(B|A)是已知A发生后B的条件概率,也由于得自A的取值而被称作B的后验概率。 Pr(B)是B的先验概率或边缘概率,也作标准化常量(normalized constant)。 按这些术语,Bayes法则可表述为: 后验概率 = (相似度 * 先验概率
10、)/标准化常量 也就是说,后验概率与先验概率和相似度的乘积成正比。 另外,比例Pr(B|A)/Pr(B)也有时被称作标准相似度(standardised likelihood),Bayes法则可表述为:后验概率 = 标准相似度 * 先验概率Usually, the event A in the event B (happen) probability, probability and event B in the event A conditions are not the same; however, these two are determined, the Bayes rule is t
11、his statement. As a normative theory, Bayes rule is effective for all probabilistic interpretation; however, frequency, and Bayesian principle regarding the probability to be assigned a different view in the application: frequency, according to the random events, or the number of total sample assign
12、ment probability; Bayesian theory depending on the unknown proposition to assign probability. As a result, Bayesians have had more chances to use Bayes rule. Biass law of random events A and B conditional and marginal probabilities. Pr (A|B) = fracPr (A, B |), Pr (A)Pr (B)propto L (A | B), Pr (A), w
13、here L (A|B)! Is the possibility of A occurred in the B case. In the Bayesian rule, each noun has a name: Pr (A) is the prior probability or probability of edge A. It is called a priori because it does not consider any aspect of B. Pr (A|B) is known B occurred after A conditional probability, also d
14、ue to the self value of B and A called the posterior probability. Pr (B|A) is known A occurred after B conditional probability, also due to the self value of A and B called the posterior probability. Pr (B) is the prior probability or probability of edge of B, are also normalized constant (normalize
15、d constant). According to these terms, the Bayes rule can be expressed as: the posterior probability = (similarity * prior probability) / normalized constant that is to say, the product of a posteriori probability and is proportional to the prior probability and similarity. In addition, the ratio of
16、 Pr (B|A) /Pr (B) is also sometimes referred to as the standard similarity (standardised likelihood), the Bayes rule can be expressed as: the posterior probability = standard similarity * prior probability.The example analysis案例一: 全垄断市场,只有一家企业A提供产品和服务。现在企业B考虑是否进入。当然,A企业不会坐视B进入而无动于衷。B企业也清楚地知道,是否能够进入,
17、完全取决于A企业为阻止其进入而所花费的成本大小。 挑战者B不知道原垄断者A是属于高阻挠成本类型还是低阻挠成本类型,但B知道,如果A属于高阻挠成本类型,B进入市场时A进行阻挠的概率是20%(此时A为了保持垄断带来的高利润,不计成本地拼命阻挠);如果A属于低阻挠成本类型,B进入市场时A进行阻挠的概率是100%。 博弈开始时,B认为A属于高阻挠成本企业的概率为70%,因此,B估计自己在进入市场时,受到A阻挠的概率为: 0.70.2+0.31=0.44 0.44是在B给定A所属类型的先验概率下,A可能采取阻挠行为的概率。 当B进入市场时,A确实进行阻挠。使用贝叶斯法则,根据阻挠这一可以观察到的行为,B
18、认为A属于高阻挠成本企业的概率变成A属于高成本企业的概率=0.7(A属于高成本企业的先验概率)0.2(高成本企业对新进入市场的企业进行阻挠的概率)0.44=0.32 根据这一新的概率,B估计自己在进入市场时,受到A阻挠的概率为: 0.320.2+0.681=0.744 如果B再一次进入市场时,A又进行了阻挠。使用贝叶斯法则,根据再次阻挠这一可观察到的行为,B认为A属于高阻挠成本企业的概率变成 A属于高成本企业的概率=0.32(A属于高成本企业的先验概率)0.2(高成本企业对新进入市场的企业进行阻挠的概率)0.744=0.086 这样,根据A一次又一次的阻挠行为,B对A所属类型的判断逐步发生变化
19、,越来越倾向于将A判断为低阻挠成本企业了。 以上例子表明,在不完全信息动态博弈中,参与人所采取的行为具有传递信息的作用。尽管A企业有可能是高成本企业,但A企业连续进行的市场进入阻挠,给B企业以A企业是低阻挠成本企业的印象,从而使得B企业停止了进入地市场的行动。 应该指出的是,传递信息的行为是需要成本的。假如这种行为没有成本,谁都可以效仿,那么,这种行为就达不到传递信息的目的。只有在行为需要相当大的成本,因而别人不敢轻易效仿时,这种行为才能起到传递信息的作用。 传递信息所支付的成本是由信息的不完全性造成的。但不能因此就说不完全信息就一定是坏事。研究表明,在重复次数有限的囚徒困境博弈中,不完全信息
20、可以导致博弈双方的合作。理由是:当信息不完全时,参与人为了获得合作带来的长期利益,不愿过早暴露自己的本性。这就是说,在一种长期的关系中,一个人干好事还是干坏事,常常不取决于他的本性是好是坏,而在很大程度上取决于其他人在多大程度上认为他是好人。如果其他人不知道自己的真实面目,一个坏人也会为了掩盖自己而在相当长的时期内做好事。Case 1: the monopoly market, only an enterprise A provides products and services. Now consider whether to enter the enterprise B. Of cours
21、e, A enterprise will not sit back and watch B and completely indifferent to. B know, whether can enter, depends entirely on the A enterprise to prevent the entry and the cost of size. Challenger B do not know the original monopolist A belongs to the high block cost type or low block cost type, but B
22、 know, if A belongs to the high block cost type, the probability of B in the market of A block is 20% (high profits, at A in order to maintain the monopoly regardless of the cost to piece together the life; if the block) A belongs to the low blocking probability B to enter the market cost type, when
23、 the A block is 100%. The game began, according to B probability A belongs to the high block cost of enterprises is 70%, therefore, the B estimate oneself in the market, by the probability A block: 0.7 * 0.2+0.3 * 1=0.44 0.44 is the prior probability type given in B A, A may use blocking behavior pr
24、obability. When B entered the market, A does block. Using the Bayes rule, according to block the observable behavior, according to B probability A belongs to the high block cost of enterprises into A belongs to the probability of =0.7 high costs of enterprises (A belongs to the high cost of the prio
25、r probability of enterprise) x 0.2 (probability of high cost of enterprises in the new market enterprises by) 0.44=0.32 according to this new probability, B estimates themselves in the market, by the probability A block: 0.32 0.2+0.68 1=0.744 if B again to enter the market, A was blocked. Using the
26、Bayes rule, according to block the observed behavior, B thinks the probability A belongs to the high block cost of enterprises into A belongs to the probability of =0.32 high costs of enterprises (A belongs to the high cost of the prior probability of enterprise) x 0.2 (probability of high cost of e
27、nterprises in the new market enterprises by) 0.744=0.086 thus, according to the blocking behavior of A once again, B on A type judgment has changed gradually, more and more inclined to judge for the low cost A to enterprise. The above example shows that, in a dynamic game of incomplete information,
28、has the function of transmitting information in one act. Although the A enterprise may be the high cost of enterprise, but enterprise A continuous market entry deterrence, to B enterprises to A enterprise is low block impression cost of enterprises, thus enterprise B stopped coming into the market a
29、ction. It should be pointed out is, information behavior is a cost. If there is no cost to this behavior, who can follow, then, this kind of behavior is not up to the purpose of transmitting information. Only in the act requires considerable cost, so that others can not easily imitated, this behavio
30、r can play the role of information transmission. Transfer payment information cost is caused by incomplete information. But we can not say that the incomplete information is necessarily a bad thing. Research shows that, in the repeated prisoners dilemma game times are limited, incomplete information
31、 can lead to bilateral cooperation. The reason is: when the information is incomplete, participants in order to obtain the long-term interests of cooperation brings, not premature exposure of his nature. That is to say, in a long-term relationship, a person to do good or bad, often does not depend o
32、n his nature is good is bad, but to a large extent depends on the extent to which other people think he is a good man. If the other person doesnt know his true colors, a bad man will do good to cover themselves in a quite long period.案例二: 考虑一个医疗诊断问题,有两种可能的假设:(1)病人有癌症。(2)病人无癌症。样本数据来自某化验测试,它也有两种可能的结果:
33、阳性和阴性。假设我们已经有先验知识:在所有人口中只有0.008的人患病。此外,化验测试对有病的患者有98%的可能返回阳性结果,对无病患者有97%的可能返回阴性结果。 上面的数据可以用以下概率式子表示: P(cancer)=0.008,P(无cancer)=0.992 P(阳性|cancer)=0.98,P(阴性|cancer)=0.02 P(阳性|无cancer)=0.03,P(阴性|无cancer)=0.97 假设现在有一个新病人,化验测试返回阳性,是否将病人断定为有癌症呢?我们可以来计算极大后验假设: P(阳性|cancer)p(cancer)=0.98*0.008 = 0.0078 P(
34、阳性|无cancer)*p(无cancer)=0.03*0.992 = 0.0298 因此,应该判断为无癌症。Case two: consider a medical diagnosis problem, there are two possible hypotheses: (1) patients with cancer. (2) patients without cancer. The sample data from a laboratory test, it also has two possible results: positive and negative. Suppose we
35、 have a priori knowledge: only 0.008 of the people in all the population prevalence. In addition, laboratory testing of disease in 98% of patients may return to positive results, no patients had 97% may return a negative result. The above data can be represented by the following formula: the probabi
36、lity P (cancer) =0.008, P (non cancer) =0.992 P (+ |cancer) =0.98, P (|cancer negative (positive) =0.02 P | without cancer) =0.03, P (negative | without cancer) =0.97 if you have a new patient, the test returns positive if the patient will determine, for cancer? We can calculate the maximum a poster
37、iori hypothesis: P (+ |cancer) P (cancer) =0.98*0.008 = 0.0078 P (positive | without cancer) *p (without cancer) =0.03*0.992 = 0.0298, therefore, should be judged as no cancer.Difference海萨尼转换与贝叶斯法则 1967年,海萨尼(JohnHarsanyi)指出所有老定义下具有不完全信息的博弈都可以在不改变其精髓的情况下被重新模型化为一个完全但不完美的信息博弈,这一切只需要添加一个由自然在不同规则集合中进行选择的
38、初始行动即可。在老的定义中,博弈论学家常指出不完全信息博弈是不可分析的,而海萨尼的创见使得这一切有所改变。老的定义是这样描述的:在完全信息博弈中,全体参与人都知道博弈的规则,否则这一博弈就是一个不完全信息博弈。尽管海萨尼未指出老的定义是有问题的,但事实上人们的观点已经发生了变化,现在认为在原有定义中,被转换后的博弈才是不完全信息博弈。在博弈中,其中有参与人也许对博弈的支付并不十分清楚,但对支付还是有一定的了解的。一般情况下,采用主观概分布来表示信息。也就是基于概率对进行分组构建各种博弈支付,可以形成一个特定的支付集合。比如甲与乙选择策略时,可以这样考虑,甲选择某一种策略时,乙选择策略有几种,乙
39、的这些策略按发生的概率进行分组。通常构建一个博弈树就可以较好地表达这一切。海萨尼教义的观点关键在于假定所有的参与人都是有共同的认识,对于策略采取发生的概率是一个共同知识。隐含的意思也就是:参与人对于自己的猜测至少是少许公开了的。 在对一个博弈的信息结构进行划分的时候,并不试图决定参与人能从其它参与人的行动中推断出些什么东西。先验概率是作为博弈规则的一部分存在,因此,一个参与人必须是持有关于其它参与人类型的先验信念,同时,在观察到他们的行动后,就要假定他们遵循着均衡的行为,然后更新自己的信念。Harsanyi transformation and Bayesian rule in 1967, H
40、arsanyi (JohnHarsanyi) points out the game with incomplete information of all the old definition can not change its essence is under the condition of the new model into a complete but imperfect information game, it only needs to add a different set of rules from nature in the choice of the initial a
41、ction. In the old definition, game theory often point out game of incomplete information can not be analyzed, while the Harsanyi ideas make all this change. The old definition is described in this way: in complete information game, all players know the rules of the game, otherwise the game is a game
42、 of incomplete information. Although not that old Harsanyi definition is a problem, but the fact that people view has changed, now believes that in the original definition, the game was converted to a game of incomplete information. In the game, including participation in the game may pay is not ver
43、y clear, but some understanding of payment. In general, represented by the information of subjective probability distribution. Is the probability to construct various game payment based on grouping, can form a specific payment collection. For example, a and B are choice of strategy, it can be consid
44、ered, a selection of a certain strategy, B to select several strategies, these strategies are grouped according to B of the probability of occurrence. Usually build a game tree can better express all this. The key point of Harsanyi doctrine assumed that all the participants have a common understandi
45、ng, to adopt the strategy of the probability of occurrence is a common knowledge. The implied meaning is: participants at least a little discloses to our assumptions. The division of time in the information structure of a game, not trying to decide in what can be inferred from the other people invol
46、ved in the campaign. The prior probability is present, as part of the game rules, a player must be held about other players types of prior beliefs, at the same time, their actions after observation, is to assume that they follow the equilibrium behavior, and then update their beliefs.Related princip
47、les先验概率和后验概率 用P(h)表示在没有训练数据前假设h拥有的初始概率。P(h)被称为h的先验概率。先验概率反映了关于h是一正确假设的机会的背景知识如果没有这一先验知识,可以简单地将每一候选假设赋予相同的先验概率。类似地,P(D)表示训练数据D的先验概率,P(D|h)表示假设h成立时D的概率。机器学习中,我们关心的是P(h|D),即给定D时h的成立的概率,称为h的后验概率。极大后验假设 学习器在候选假设集合H中寻找给定数据D时可能性最大的假设h,h被称为极大后验假设(MAP)确定MAP的方法是用贝叶斯公式计算每个候选假设的后验概率,计算式如下: h_map=argmax P(h|D)=a
48、rgmax (P(D|h)*P(h)/P(D)=argmax P(D|h)*p(h) (h属于集合H) 最后一步,去掉了P(D),因为它是不依赖于h的常量。极大似然假设 在某些情况下,可假定H中每个假设有相同的先验概率,这样式子可以进一步简化,只需考虑P(D|h)来寻找极大可能假设。 h_ml = argmax p(D|h) h属于集合H P(D|h)常被称为给定h时数据D的似然度,而使P(D|h)最大的假设被称为极大似然假设。The prior probability and posterior probability P (H) expressed in the absence of tr
49、aining data before assuming the initial probability h owned. P (H) is known a priori probability H. The prior probability reflects on the H is a correct hypothesis opportunity background knowledge without the prior knowledge, can simply be each candidate that gives the same prior probability. Similarly, P (D) represents the prior probability of the training data of D, P (D|h) represents the probability of D assumptions h established. In machine learning, we are concerned with P (h|D), wh