Notes - MIECT
Inteligência Artificial
Notes - MIECT
Inteligência Artificial
  • Inteligência Artificial
  • Tópicos de Inteligência Artificial
    • Definição de “Inteligência”
    • História até à “Inteligência Artificial”
  • Agentes
    • Definição de “Agente”
    • Teste de Turing
    • A "Sala Chinesa" de Searle
    • Agentes Reactivos
    • Agentes Deliberativos
    • Arquiteturas
  • Representação do Conhecimento
    • Redes Semântica
      • GOLOG
      • UML / Diagramas de Classes
      • Indução versus Dedução
      • Em Python
    • Resolução e Refutação na Lógica de Primeira Ordem
    • Lógica Proposicional e Lógica de Primeira Ordem
      • Interpretações em Lógica Proposicional
      • Interpretações em Lógica de Primeira Ordem
      • Lógica - Regras de Substituição
      • CNF e Forma Clausal
      • Consequências Lógicas, Provas
      • Correcção, Completude
      • Metateoremas
      • Resolução não é Completa
      • Refutação por Resolução
      • Substituições, Unificação
      • Resolução com Claúsulas de Horn
    • Linguagem KIF
    • Engenharia do Conhecimento
    • Ontologias
    • Redes de Bayes
  • Técnicas de Resolução de Problemas
    • Resolução de problemas em IA
    • Formulação de problemas e pesquisa de soluções
    • Estratégias de pesquisa
      • Avaliação das estratégias de pesquisa
      • Pesquisa A*
        • Avaliação da Pesquisa em Árvore
      • IDA*
      • RBFS
      • SMA*
      • Pesquisa com propagação de restrições
      • Pesquisa por melhorias sucessivas
      • Planeamento
        • Aprendizagem
      • Árvores de decisão
      • Avaliação de algoritmos de aprendizagem supervisionada
  • Bayesian Networks
    • Ways to deal with Uncertainty
    • Discrete Random Variables
    • Probabilities
    • Conditional Probability
    • More General Forms of Bayes Rule
    • The Joint Distribution
    • Independence
    • Computing a Joint Entry
    • Exercises
Powered by GitBook
On this page
  1. Bayesian Networks

More General Forms of Bayes Rule

P(A|B) = (P(B| A)P(A)) / (P(B|A)P(A)+P(B|~A)P(~A))

P(A|B∧ X) = (P(B| A∧ X)P(A∧ X)) / (P(B∧X))

P(A=vi |B) = (P(B|A=vi)P(A=vi)) / (∑P(B| A=vk)P(A=vk))

Example

Marie is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow. When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the day of Marie's wedding?

Solution: The sample space is defined by two mutually-exclusive events - it rains or it does not rain. Additionally, a third event occurs when the weatherman predicts rain. Notation for these events appears below.

Event A1. It rains on Marie's wedding.

Event A2. It does not rain on Marie's wedding.

Event B. The weatherman predicts rain.

In terms of probabilities, we know the following:

  • P( A1 ) = 5/365 =0.0136985 [It rains 5 days out of the year.]

  • P( A2 ) = 360/365 = 0.9863014 [It does not rain 360 days out of the year.]

  • P( B | A1 ) = 0.9 [When it rains, the weatherman predicts rain 90% of the time.]

  • P( B | A2 ) = 0.1 [When it does not rain, the weatherman predicts rain 10% of the time.]

We want to know P( A1 | B ), the probability it will rain on the day of Marie's wedding, given a forecast for rain by the weatherman. The answer can be determined from Bayes' theorem, as shown below.

  • P( A1 | B ) = (P( B | A1 ) * P( A1 )) / (P( A1 ) P( B | A1 ) + P( A2 ) P( B | A2 )) P( A1 | B ) = (0.014)(0.9) / [ (0.014)(0.9) + (0.986)(0.1) ] P( A1 | B ) = 0.111

Note the somewhat unintuitive result. Even when the weatherman predicts rain, it only rains only about 11% of the time. Despite the weatherman's gloomy prediction, there is a good chance that Marie will not get rained on at her wedding.

PreviousConditional ProbabilityNextThe Joint Distribution

Last updated 2 years ago