Jump to content

Bayes' rule: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Derivation: added derivation of Bayes' theorem from Bayes' rule (they are therefore equivalent)
Undoing 2 edits: see Talk page. More care is needed ... a good source is needed, not hand-waving.
Line 4: Line 4:
In [[probability theory]] and applications, '''Bayes' rule''' relates the [[odds]] of event <math>A_1</math> to event <math>A_2</math>, before (prior to) and after (posterior to) [[Conditional probability|conditioning]] on another event <math>B</math>. The odds on <math>A_1</math> to event <math>A_2</math> is simply the ratio of the probabilities of the two events. The prior odds is the ratio of the unconditional or prior probabilities, the posterior odds is the ratio of conditional or posterior probabilities given the event <math>B</math>. The relationship is expressed in terms of the '''likelihood ratio''' or '''Bayes factor''', <math>\Lambda</math>. By definition, this is the ratio of the conditional probabilities of the event <math>B</math> given that <math>A_1</math> is the case or that <math>A_2</math> is the case, respectively. The rule simply states: '''posterior odds equals prior odds times Bayes factor'''.
In [[probability theory]] and applications, '''Bayes' rule''' relates the [[odds]] of event <math>A_1</math> to event <math>A_2</math>, before (prior to) and after (posterior to) [[Conditional probability|conditioning]] on another event <math>B</math>. The odds on <math>A_1</math> to event <math>A_2</math> is simply the ratio of the probabilities of the two events. The prior odds is the ratio of the unconditional or prior probabilities, the posterior odds is the ratio of conditional or posterior probabilities given the event <math>B</math>. The relationship is expressed in terms of the '''likelihood ratio''' or '''Bayes factor''', <math>\Lambda</math>. By definition, this is the ratio of the conditional probabilities of the event <math>B</math> given that <math>A_1</math> is the case or that <math>A_2</math> is the case, respectively. The rule simply states: '''posterior odds equals prior odds times Bayes factor'''.


Bayes' rule is an equivalent way to formulate [[Bayes' theorem]]. Bayes' rule may be preferred to Bayes' theorem in practice since it is intuitively simpler to understand, and because one sometimes only needs to know ratios of probabilities, not the probabilities themselves, or because it is easy to do this conversion afterwards, anyway. If we know the odds for and against <math>A</math> we also know the probabilities of <math>A</math>. Bayes rule is widely used in [[statistics]], [[science]] and [[engineering]], for instance in [[Bayesian model selection|model selection]], [[probabilistic expert systems]], [[probabilistic reasoning]] in courts of law, and so on.
Bayes' rule is an equivalent way to formulate [[Bayes' theorem]]. Bayes' rule may be preferred to Bayes' theorem in practice since it is intuitively simpler to understand, and because normalizing probabilities is sometimes unnecessary (one sometimes only needs to know ratios of probabilities) or easy to do afterwards, anyway. If we know the odds for and against <math>A</math> we also know the probabilities of <math>A</math>. Bayes rule is widely used in [[statistics]], [[science]] and [[engineering]], for instance in [[Bayesian model selection|model selection]], [[probabilistic expert systems]], [[probabilistic reasoning]] in courts of law, and so on.


Bayes's rule, as an elementary fact from the calculus of probability, tells us how unconditional and conditional probabilities are related whether we work with a [[frequentist interpretation of probability]] or a [[Bayesian probability|Bayesian interpretation of probability]]. Under the Bayesian interpretation it is frequently applied in the situation where <math>A_1</math> and <math>A_2</math> are competing hypotheses, and <math>B</math> is some observed evidence. The rule shows how one's judgement on the whether <math>A_1</math> or <math>A_2</math> is true should be updated on observing the evidence <math>B</math>.
Bayes's rule, as an elementary fact from the calculus of probability, tells us how unconditional and conditional probabilities are related whether we work with a [[frequentist interpretation of probability]] or a [[Bayesian probability|Bayesian interpretation of probability]]. Under the Bayesian interpretation it is frequently applied in the situation where <math>A_1</math> and <math>A_2</math> are competing hypotheses, and <math>B</math> is some observed evidence. The rule shows how one's judgement on the whether <math>A_1</math> or <math>A_2</math> is true should be updated on observing the evidence <math>B</math>.
Line 70: Line 70:


A similar derivation applies for conditioning on multiple events, using the appropriate [[Bayes' theorem#Further extensions|extension of Bayes' theorem]]
A similar derivation applies for conditioning on multiple events, using the appropriate [[Bayes' theorem#Further extensions|extension of Bayes' theorem]]

Here is the proof that Bayes' theorem can be derived from Bayes' rule. Suppose that events <math>A_1</math>, <math>A_2</math>, ... are exhaustive and exclusive: that means to say that one of the events ''has'' to happen, but two can't happen at the same time. If another event <math>B</math> is observed then according to Bayes' rule, the conditional probabilities <math>P(A_j|B)</math>, <math>j=1,2,...</math>, are proportional to the quantities <math>P(A_j)P(B|A_j)</math> (posterior is proportional to prior times likelihood). By the [[law of total probability]], these quantities add up to <math>P(B)</math>. Therefore <math>P(A_j|B)=P(A_j)P(B|A_j)/P(B)</math>.


==Examples==
==Examples==

Revision as of 10:56, 20 April 2013

In probability theory and applications, Bayes' rule relates the odds of event to event , before (prior to) and after (posterior to) conditioning on another event . The odds on to event is simply the ratio of the probabilities of the two events. The prior odds is the ratio of the unconditional or prior probabilities, the posterior odds is the ratio of conditional or posterior probabilities given the event . The relationship is expressed in terms of the likelihood ratio or Bayes factor, . By definition, this is the ratio of the conditional probabilities of the event given that is the case or that is the case, respectively. The rule simply states: posterior odds equals prior odds times Bayes factor.

Bayes' rule is an equivalent way to formulate Bayes' theorem. Bayes' rule may be preferred to Bayes' theorem in practice since it is intuitively simpler to understand, and because normalizing probabilities is sometimes unnecessary (one sometimes only needs to know ratios of probabilities) or easy to do afterwards, anyway. If we know the odds for and against we also know the probabilities of . Bayes rule is widely used in statistics, science and engineering, for instance in model selection, probabilistic expert systems, probabilistic reasoning in courts of law, and so on.

Bayes's rule, as an elementary fact from the calculus of probability, tells us how unconditional and conditional probabilities are related whether we work with a frequentist interpretation of probability or a Bayesian interpretation of probability. Under the Bayesian interpretation it is frequently applied in the situation where and are competing hypotheses, and is some observed evidence. The rule shows how one's judgement on the whether or is true should be updated on observing the evidence .

The rule

Single event

Given events , and , Bayes' rule states that the conditional odds of given are equal to the marginal odds of multiplied by the Bayes factor or likelihood ratio :

where

Here, the odds and conditional odds, also known as prior odds and posterior odds, are defined by

In the special case that and , one writes , and uses a similar abbreviation for the Bayes factor and for the conditional odds. The odds on is by definition the odds for and against . Bayes rule can then be written in the abbreviated form

or in words: the posterior odds on equals the prior odds on times the Bayes factor for given information .

Multiple events

Bayes' rule may be conditioned on an arbitrary number of events. For two events and ,

where

In this special case, the equivalent notation is

Derivation

Consider two instances of Bayes' theorem:

Combining these gives


Now defining

this implies

A similar derivation applies for conditioning on multiple events, using the appropriate extension of Bayes' theorem

Examples

Frequentist example

Consider the drug testing example in the article on Bayes' theorem.

The same results may be obtained using Bayes' rule. The prior odds on an individual being a drug-user are 199 to 1 against, as and . The Bayes factor when an individual tests positive is in favour of being a drug-user: this is the ratio of the probability of a drug-user testing positive, to the probability of a non-drug user testing positive. The posterior odds on being a drug user are therefore , which is very close to . In round numbers, only one in three of those testing positive are actually drug-users.

Model selection