DeepAI # Posterior Probability

## What is the posterior probability?

In statistics, the posterior probability expresses how likely a hypothesis is given a particular set of data. In terms of conditional probability, we can represent it in the following way:

Posterior = P(H|D)

where D = data and H = hypothesis

This contrasts with the likelihood function, which is represented as P(D|H). This distinction is more of an interpretation rather than a mathematical property as both have the form of conditional probability. In order to calculate the posterior probability, we use Bayes theorem, which is discussed below.

Posterior and Bayes Theorem

Bayes theorem, which is the probability of a hypothesis given some prior observable data, relies on the use of likelihood P(D|H) alongside the prior P(H) and marginal likelihood P(D) in order to calculate the posterior P(H|D). The formula for Bayes theorem is:

where D = data and H = hypothesis

Bayes theorem is a fundamental theorem in machine learning because of its ability to analyze hypotheses given some type of observable data. With this analysis, we can more accurately predict hypotheses on unseen data (note: see Black Swan Paradox). Since an agent is only able to view the world via the data it is given, it is important that it can extract reasonable hypotheses from that data and any prior knowledge. With the posterior, an agent is able to determine the validity of its hypothesis knowing the probability that expresses how likely the data is given its hypothesis and all prior observations.

## Example of Posterior Probability

Let’s say you’re at the grocery store and a person walking in front of you drops a \$5 bill. You pick it up and want to try to get their attention but you are unsure of whether to say “Excuse me Miss, or Sir”. All else being equal and based on the fact that there’s roughly equal populations of men and women on earth, the conditional probability that you say “Excuse me Miss” and it is in fact a woman that turns around is 0.5.

If we introduce new relevant information, say, that the person in question had long hair, we would have to update our conditional probability of the outcome that the person is in fact a woman. We would now have a new factor built into our probability calculation, giving us our posterior probability.

For a more detailed mathematical representation of the posterior probability and how to calculate it, see the Bayesian inference page.
{"ft_lang_label":"__label__en","ft_lang_prob":0.93366975,"math_prob":0.96690315,"size":3519,"snap":"2023-14-2023-23","text_gpt3_token_len":692,"char_repetition_ratio":0.15192035,"word_repetition_ratio":0.5859107,"special_character_ratio":0.19295254,"punctuation_ratio":0.08435583,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9983934,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-04T23:18:28Z\",\"WARC-Record-ID\":\"<urn:uuid:519c341c-37cf-44d2-80df-6b9b8d68b0bd>\",\"Content-Length\":\"127025\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:14c20eaa-2c2e-4cbe-8f25-8d0ff90b2a32>\",\"WARC-Concurrent-To\":\"<urn:uuid:5db40849-a9ad-49a0-96b7-9bad3fe0a633>\",\"WARC-IP-Address\":\"44.239.60.49\",\"WARC-Target-URI\":\"https://cdnjs.deepai.org/machine-learning-glossary-and-terms/posterior-probability\",\"WARC-Payload-Digest\":\"sha1:FQCNIC4WVNPMKDJIWMEDTWPM3RYRQ3ET\",\"WARC-Block-Digest\":\"sha1:HET2XWTPMWKZB6UL52QWU4F5TMJDIHDU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224650409.64_warc_CC-MAIN-20230604225057-20230605015057-00006.warc.gz\"}"}