Probabilities Random Number Generators –Actually pseudo-random –Seed Same sequence from same seed Often time is used. Many examples on web. Custom random number generators exist. Can be used in algorithms.
Actions Based on Probabilities Assign probabilities to each action. Probabilities must add to 1. Roulette wheel method –Range of random number generator is size of roulette wheel. –Give each action a section of the roulette wheel proportional to its probability. –Generate a random number. (Run the wheel.)
Example P(go straight) = 50% P(turn left) = 30% P(turn right) = 20% Use random numbers from 0 – Roulette wheel –0 ≤ Go straight <.50 –.50 ≤ turn left <.80 –.80 ≤ turn right < 1.00
What is Probability? Often not well defined. –What does weather forecast of 75% rain mean? –Calling your shots (dart board example). Interpretations –Counting Interpretation –Frequency Interpretation –Subjective Interpretation
Some Uses of Probability Diagnosis Prediction Explaining away –water sprinkler example Randomized algorithms –for CS in general –for games and robotics in particular
Expectation Value Expected value of a variable is a kind of average value of the variable. Sum of utilities times probability. Used in decision theory. Utility may be nonlinear.
Assigning Subjective Probability Fair Bet Fair Price Dutch Book Fallacy –Leads to probability rules
Rules 1 Values: –Real number between 0 and 1. Something happens: –P(something) = 1 Not rule: –P(not A) = 1 – P(A)
Rules 2 Or Rules: P(A B) –Exclusive events P(A) + P(B) –Not exclusive P(A) + P(B) – P(A B) no double counting And Rules: P(A B) –Independent events P(A) P(B) –Conditional: P(A | B) P(B) P(B | A) P(A)
P(A) is prior probability of A P(A | B) is posterior probability of A P(B) is prior probability of B – acts as a normalizing constant Monte Hall Problem Bayes Theorem
Bayesian Network Graph representing probabilistic causal relations between variables. Allows efficient Bayesian reasoning in complicated situations
Simple Example Trapped --- Locked 100 chests 37 trapped –29 of trapped were locked 63 not trapped –18 of not trapped locked Need to find P(trapped | locked)