* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Part I
Survey
Document related concepts
Transcript
Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Introduction to Probability (1) John Kelleher & Brian Mac Namee Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond 1 Introduction Summarizing Uncertainty 2 Where Do Probabilities Come From? 3 Basic Probability Notation Basics 4 The Axioms of Probabilities 5 Unconditional and Conditional Probabilities 6 Summary Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Introduction Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond So far we have looked at similarity-based and information-theory-based approaches to machine learning. Probability theory offers us another way to tackle the same sorts of problems. Probability theory offers us a formally sophisticated way in which to perform reasoning based on an assessment of the likelihood of various outcomes performed across a historical dataset. Probaility theory is used widely in artificial intelligence in particular because it solves the qualification problem. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Let’s consider a dental patient’s toothache as an example of uncertain reasoning. Consider a rule that attempts to capture the relationship between patients having a cavity and patients having a toothache. Toothache =⇒ Cavity But this doesn’t work as every toothache is not caused by a cavity. Toothache =⇒ Cavity OR GumProblem OR Abscess . . . We could try to go the other way around and make a rule such as Cavity =⇒ Toothache This has the same problem, though, as not all cavities cause toothaches. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Summarizing Uncertainty Trying to use exact rules to cope with a domain like medical diagnosis fails for three main reasons. Laziness it is too much work to list an exceptionless rule-set and actually too difficult to use such a rule-set. Theoretical ignorance Medical science has no complete theory for the domain. Practical ignorance Even if we know all the rules, we might be uncertain about particular patient because not all the necessary tests have been or can be run. This is essentially the qualification problem. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Summarizing Uncertainty Probability provides a way of summarizing the uncertainty that comes from our laziness and ignorance. We might not know for sure what afflicts a particular patient, but we believe that there is, say, an 80% chance that is, a probability of 0.8 - that the patient has a cavity if they have a toothache. The 80% summarises those cases in which all the factors needed for a cavity to cause a toothache are present and other cases in which the patient has both toothache and cavity but the two are unconnected. The missing 20% summarizes all the other possible causes of tootache that we are too lazy or ignorant to confirm or deny. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Where Do Probabilities Come From? Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Frequentist position is that the numbers can come only from experiments (i.e. they are based on the relative frequency of an event within a sample) Objectivist view is that probabilities are real aspect of the universe – propensities of objects to behave in a certain way. Subjectivist view describes probabilities as a way of characterising beliefs about the world, rather than as having any external physical significance Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Relative Frequency The relative frequency for any particular category is the proportion of all responses in the data set that fall in that category: relative frequency = frequency of event total number of sample points Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Example Suppose we take a coin and begin to toss it over and over. After each toss, we compute the relative frequency of heads observer so far, i.e., (number of heads)/(number of tosses). Table: Results of Coin Toss Experiment Toss Number Outcome Cum. Number of Heads Relative Frequency of Heads 1 T 0 0 2 H 1 0.5 3 H 2 .667 4 H 3 .75 5 T 3 .6 6 T 3 .5 7 H 4 .571 8 H 5 .625 9 T 5 .556 10 T 5 .5 Much empirical evidence suggests that as the number of tosses increases, the relative frequency of heads does not continue to fluctuate wildly but instead stablizes and approaches some fixed number. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basic Probability Notation Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Chance Experiment We use the phrases chance experiment or random experiment to refer to any activity or situation in which the outcome is uncertain. Example A chance experiment might involve: rolling a dice, tossing a coin, running a survey to ascertain whether or not each person in a sample supports the death penalty, or it could involve an investigation carried out in a laboratory to study how varying the amount of a certain chemical input affects the yield of a product. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Random Variables A random variable associates a single number with each outcome of an experiment. A random variable can be thought of as referring to ”part” of the world whose ”status” is initially unknown. We will always capitalize the names of random variables. Example For example, imagine we are about to roll two dice. We might have a random variable called Die1 to hold the value of the first dice after we roll it, another random variable called Die2 to hold the value of the second dice after we roll it, and another random variable called Total to hold the summation of the two dice values after we roll them. In our dentistry domain we might have a random variable called Cavity which would refer to whether my lower left wisdom tooth has a cavity. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Random Variables and Domains Each random variable has a domain of values that it can take on: for example, the domain of Cavity might be htrue, falsei. Random variables are typically divided into three kinds, depending on the type of the domain: 1 Boolean random variables have a domain < true, false > 2 Discrete random variables take values from a countable domain. The values in the domain must be mutually exclusive and exhaustive. For example, the domain of Weather might be < sunny , rainy , cloudy , snowy >. 3 Continuous random variables take on values from the real numbers. For example, the time it takes a car to travel a quarter of a kilometer. With some exceptions, we will be concentrating on the discrete case. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics In probability theory the set of all possible worlds (i.e. the set of all possible results of a chance experiment) is called the sample space Sample Space Ω We use the phrase sample space - denoted by the Greek symbol Ω (upper case omega) - to describe the results of a set of chance experiments; e.g., the results of 6 rolls of a dice. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Possible worlds are also known as atomic events or sample points A sample point/possible world/atomic event (denoted by the symbol ω) is one element of a sample space: ω ∈ Ω. Atomic events ω An atomic event is a complete specification of the state of the world. It can be thought of as an assignment of particular values to all the variables of which the world is composed. Example For example, if my world consists of only the Boolean variables Cavity and Toothache, then there are just four distinct atomic events; the proposition Cavity = false ∧ Toothache = true is one such event. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Atomic events have some important properties: They are mutually exclusive – at most one can actually be the case. The set of all possible atomic events is exhaustive – at least one of them must be the case. That is, the disjunction of all atomic events is logically equivalent to true. Any particular atomic event entails the truth or falsehood of every proposition, whether simple or complex. Any proposition is logically equivalent to the disjunction of all atomic events that entail the truth of the proposition. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Probability Space/Model A probability space or probability model is a sample space with an assignment P(ω) for every ω ∈ Ω s.t. 0 ≤ P(ω) ≤ 1 P ω P(ω) = 1 Example For example, if we are about to roll a dice, there are 6 possible worlds/atomic events/sample points to consider: d=1, d=2, d=3, d=4, d=5, d=6. If we assume that the dice is fair and the the rolls don’t interfere with each other then each of the possible worlds/atomic events/sample points has an equal probability P(1) = P(2) = P(3) = P(4) = P(5) = P(6) = 1/6. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Probabilistic assertions and queries are not usually about particular possible worlds, but about sets of them; e.g., we might be interested in the cases where two dice add up to 11. Event and Propositions An event is any collection of possible outcomes of a chance experiment. In other words, an event A is any subset of Ω In AI, these sets are always described by propositions in a formal language. For each proposition, the corresponding set contains just those possible worlds in which the proposition holds. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Propositions A proposition asserts that such-and-such is the case; Example For example, the simplest kind of proposition asserts that a random variable has a particular value drawn from its domain. (i.e. Cavity = true) might represent the proposition that I do in fact have a cavity in my lower left wisdom tooth. In the slides we may sometimes abbreviate a proposition such as Cavity = true by cavity and Cavity = false by ¬cavity Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics The Probability of an Event/Proposition Is denoted by P(E) Is defined to be the sum of the probabilities of the worlds in which it holds (i.e. the probability of an event E is the sum of the probabilities of all outcomes contained in E). P(E) = X P(ω) {ω∈E} Example For example, P(die roll < 4) = P(1) + P(2) + P(3) = 1/6 + 1/6 + 1/6 = 1/2 is the value approached by the relative frequency of occurrence of E in a very long series of replications of a chance experiment. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Basics Basics summary: Chance Experiments Random Variables and Domains Sample Space Ω Sample point/Possible world/Atomic Event ω e.g. die roll = 4. Probability Space/Model Ω with assignment P(ω) for every ω∈Ω 0 ≤ P(ω) ≤ 1 P ω P(ω) = 1 Events and Propositions, e.g. P(dieroll > 4) P P(E) = {ω∈E} P(ω) Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond The Axioms of Probabilities Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Andrei Kolmogorov, showed how that you can build up the rest of probability theory from three simple axioms (Kolmogorov’s axioms). (Ax.1) 0 ≤ P(a) ≤ 1 All probabilities are between 0 and 1. For any proposition a (Ax.2) P(true) = 1 P(false) = 0 Necessarily true (i.e. valid) propositions have probability 1, and necessarily false (i.e., unsatisfiable) propositions have probability 0. (Ax.3) P(a ∨ b) = P(a) + P(b) − P(a ∧ b) Inclusion-exclusion principle: the cases where a holds together with the cases where b holds cover all the cases where a ∨ b holds; but summing the two sets of cases counts the intersection twice, so we need to subtract P(a ∧ b). Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond We can derive a variety of useful facts from the basic axioms: Recall that, any proposition a is equivalent to the disjunction of all the atomic events in which a holds; call this set of events e(a). Recall also that atomic events are mutually exclusive, so the probability of any conjunction of atomic events is zero, by axiom 2. Hence, from axiom 3, we can derive the following relationship: P P(a) = ei ∈e(a) P(ei ) The probability of a proposition is equal to the sum of the probabilities of the atomic events in which it holds Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Unconditional and Conditional Probabilities Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Unconditional/Prior Probabilities The unconditional or prior probability associated with a proposition a is the degree of belief accorded to it in the absence of any other information; it is written as P(a) Example For example, if the prior probability that I have a cavity is 0.1, then we would write: P(Cavity = true) = 0.1 or P(cavity ) = 0.1 It is important to remember that P(a) can be used only when there is no other information! Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Conditional/Posterior Probabilities Once we obtain some evidence concerning the previously unknown random variables making up the domain, prior probabilities are no longer applicable. Instead we use Conditional or posterior probabilities; written as: P(a|b) where the | is prounced as given Example For example, P(cavity |toothache) = 0.8 i.e., given that toothache is all I know the probability of cavity is 0.8 Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond If we know more, e.g. swelling is also given, then we have P(cavity |toothache, swelling) = 0.95 Note: the less specific belief remains valid after more evidence arrives, but is not always useful New evidence may be irrelevant, allowing simplification, e.g., P(cavity |toothache, IrelandWins) = P(cavity |toothache) = 0.8 This kind of inference, sanctioned by domain knowledge, is crucial Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Practice Calculate P(fineGael) given the following dataset Name ADAMS, Gerry BANNON, James BARRETT, Sean BARRY, Tom BROUGHAN, Tommy BROWNE, John BRUTON, Richard BUTLER, Ray BURTON, Joan BYRNE, Eric CALLEARY, Dara COVENEY, Simon DEENIHAN, Jimmy DURKAN, Bernard FITZGERALD, Frances GILMORE, Eamon KIRK, Seamus KITT, Michael LYNCH, Kathleen LYONS, John MALONEY, Eamonn MARTIN, Micheal MATHEWS, Peter Party Sinn Fein Fine Gael Fine Gael Fine Gael Labour Fianna Fail Fine Gael Fine Gael Labour Labour Fianna Fail Fine Gael Fine Gael Fine Gael Fine Gael Labour Fianna Fail Fianna Fail Labour Labour Labour Fianna Fail Fine Gael Min? No No No No No No Yes No Yes No No Yes Yes No Yes Yes No No No No No No No Name MING NOONAN, Michael O’DEA, Willie QUINN Ruairi RABBITTE, Pat REILY, James RING, Michael ROSS, Shane RYAN, Brendan SHATTER, Alan SHERLOCK, Sean SHORTALL, Roisin SMITH, Brendan SPRING, Arthur STAGG, Emmet TROY, Robert TUFFY, Joanna TWOMEY, Liam VARADKAR, Leo WALL, Jack WALLACE, Mick WALSH, Brian WHITE, Alex Party Ind Fine Gael Fianna Fail Labour Fine Gael Fine Gael Fine Gael Independent Labour Fine Gael Labour Cork Labour Fianna Fail Labour Kerry Labour Fianna Fail Labour Fine Gael Fine Gael Labour Ind Fine Gael Labour Min? No Yes No Yes Yes Yes No No No Yes No No No No No No No No Yes No No No No Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Practice Calculate P(minister |fineGael) given the following dataset Name ADAMS, Gerry BANNON, James BARRETT, Sean BARRY, Tom BROUGHAN, Tommy BROWNE, John BRUTON, Richard BUTLER, Ray BURTON, Joan BYRNE, Eric CALLEARY, Dara COVENEY, Simon DEENIHAN, Jimmy DURKAN, Bernard FITZGERALD, Frances GILMORE, Eamon KIRK, Seamus KITT, Michael LYNCH, Kathleen LYONS, John MALONEY, Eamonn MARTIN, Micheal MATHEWS, Peter Party Sinn Fein Fine Gael Fine Gael Fine Gael Labour Fianna Fail Fine Gael Fine Gael Labour Labour Fianna Fail Fine Gael Fine Gael Fine Gael Fine Gael Labour Fianna Fail Fianna Fail Labour Labour Labour Fianna Fail Fine Gael Min? No No No No No No Yes No Yes No No Yes Yes No Yes Yes No No No No No No No Name MING NOONAN, Michael O’DEA, Willie QUINN Ruairi RABBITTE, Pat REILY, James RING, Michael ROSS, Shane RYAN, Brendan SHATTER, Alan SHERLOCK, Sean SHORTALL, Roisin SMITH, Brendan SPRING, Arthur STAGG, Emmet TROY, Robert TUFFY, Joanna TWOMEY, Liam VARADKAR, Leo WALL, Jack WALLACE, Mick WALSH, Brian WHITE, Alex Party Ind Fine Gael Fianna Fail Labour Fine Gael Fine Gael Fine Gael Independent Labour Fine Gael Labour Cork Labour Fianna Fail Labour Kerry Labour Fianna Fail Labour Fine Gael Fine Gael Labour Ind Fine Gael Labour Min? No Yes No Yes Yes Yes No No No Yes No No No No No No No No Yes No No No No Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Mathematical definition of conditional probability Conditional probabilities are defined in terms of unconditional probabilities as follows: For any propositions a and b we have: P(a|b) = P(a∧b) P(b) if P(b) 6= 0 The definition makes sense if you remember that observing b rules out all those possible worlds where b is false, leaving a set whose total probability is just P(b). Within that set, the a-worlds satisfy a ∧ b and constitute a fraction P(a∧b) P(b) . Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Product rule The definition of conditional probability can be rewritten in a different form called the Product Rule. P(a ∧ b) = P(a|b)P(b) = P(b|a)P(a) The product rule comes from the fact that, for a and b to be true, we need b to be true, and we also need a to be true given b. Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Unconditional/Conditional Probabilities summary: Unconditional/Prior Probabilities Conditional/Posterior Probabilities P(a|b) = P(a∧b) P(b) if P(b) 6= 0 P(a ∧ b) = P(a|b)P(b) = P(b|a)P(a) Product Rule Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond Summary Introduction Where Do Probabilities Come From? Basic Probability Notation The Axioms of Probabilities Unconditional and Cond 1 Introduction Summarizing Uncertainty 2 Where Do Probabilities Come From? 3 Basic Probability Notation Basics 4 The Axioms of Probabilities 5 Unconditional and Conditional Probabilities 6 Summary