
Probabilistic Inference: Continuous Variables and Distributions
Explore the foundations of probabilistic inference for continuous variables, including probability density functions, uniform distributions, expected values, variances, and Gaussian distributions. Learn about key concepts such as mean, variance, and the three-sigma rule. Dive into the world of artificial intelligence with these lecture notes from Principles of Artificial Intelligence (COMS 4720/5720) at Iowa State University.
Uploaded on | 0 Views
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Lecture notes for Principles of Artificial Intelligence (COMS 4720/5720) Yan-Bin Jia, Iowa State University Probabilistic Inference Outline I. Probability for continuous variables II. Inference by enumeration * Figures are either from the textbook site or by the instructor.
I. Probability Density Function A continuous random variable has its outcome take on a continuous set of values. the high temperature tomorrow the reading from a noisy force sensor the actual arrival time of a flight, etc. The cumulative distribution function of a continuous random variable ? is ? ? = ?(? ?) Its derivative is the probability density function (pdf): ? ??? ? ? ? ? + ?? ?(? ?) ? ? = = lim ?? 0 ?? ?(? < ? ? + ??) ?? = lim ?? 0
Uniform Distribution A uniform distribution has constant pdf. Example Continuous uniform distribution over the interval [?,?]. 0, for ? < ?, 0, for ? < ?, 1 ? ? ? ?, for ? ? < ?, ? ? = ? ?, for ? ? < ?, ? ? = 0, for ? ?. 0, for ? ?. 1 ?(?)
Expected Value The expected value (or mean) ?(?) of a random variable ? is its average value over a large number of chance experiments. ? experiments ? different values: ?1, ,?? For 1 ? ?, the value ?? occurs ?? times. // ? = ?1+ + ?? ? ? ? =1 ? ?=1 ?? ?? Example Roll a die an infinite number of times. Each number appears 1/6 of the time. 6 ? ? 1 ? ?=1 6=7 ? ? = lim 2 ?
Variance and Standard Deviation Suppose ?? is the probability of the value ??, for 1 ? ?. The mean ? of ? is ? = ? ? = ?1?1+ + ????. The variance of ? measures the dispersion of the values ?1, ,?? around ?. ? ??(?? ?)2 = var ? = ? ? ?(?)2 ?=1 = ? (? ?)(? ?) = ? ?2 2?? + ?2 = ? ?2 2?2+ ?2 = ? ?2 ?2 The standard deviation of ? is ? = var ? .
Mean and Variance of a Continuous Variable If ? is a continuous variable with pdf ?(?), its expected value is ? = ? ? = ? ? ? ?? Its variance is given as ? ? ? ?2 ?? var ? =
Gaussian Distribution A continuous random variable ? with mean ? and variance ?2 has Gaussian distribution (or normal distribution) if its pdf is 1 ? 2?? ? ?2/ 2?2 ? ? = ? ? ? = ? ? ? ? ? + ? 0.6826895 ? ? 2? ? ? + 2? 0.9544997 ? ? 3? ? ? + 3? 0.9973002 ? ? 4? ? ? + 4? 0.9999366 ? ? 5? ? ? + 5? 0.9999994 ? = 0 2 ? = 2 Three-sigma rule (in practice): Consider population within ? 3?,? + 3? .
Why Gaussian Distribution? It is the most important distribution because it fits many natural phenomena (e.g., human characteristics such as weight, height, body temperature, etc.). It is the limiting distribution of ?1+ + ?? of ? independent random variables ?1, ,??, as ? (the central limit theorem), explaining a characteristic impacted by numerous independent factors. It is the foundation for important methods such as least-squares, Kalman filters, etc., which are used in statistics and engineering.
II. Inference by Enumeration Probabilistic inference: compute posterior probabilities for query propositions given observed evidence. ? ? = ?(?) Calculate the probability of a proposition ?: ? ? Joint distribution table: ? cavity toothache = 0.108 + 0.012 + 0.072 + 0.008 + 0.016 + 0.064 = 0.28
Marginalization The unconditional (or marginal) probability of toothache: ? toothache = 0.072 + 0.144 + 0.008 + 0.576 = 0.8 Marginalization: Sum up the probabilities for each possible value of the other variables. 1 variables 1 values ?(?)= ??(?,? = ?) Sums over all possible combinations of the values of the set of variables ?.
Conditioning Abbreviate ?(?,? = ?) as ?(?,?). values ? Cavity = ? Cavity,toothache,catch + ? Cavity,toothache, catch + ? Cavity, toothache,catch + ? Cavity, toothache, catch = 0.108,0.016 + 0.012,0.064 + 0.072,0.144 + 0.008,0.576 random variable beginning with an uppercase letter = 0.2,0.8 cavity cavity not bold-faced Rule of conditioning: ?(?)= ?? ? ?)?(?) = ?(?,?)
Computing Conditional Probabilities ? ? ?) =?(? ?) 1. an expression in terms of unconditional probabilities. ?(?) 2. Evaluate the expression from full joint distribution. ? cavity | toothache =? cavity toothache ? toothache 0.108 + 0.012 0.108 + 0.012 + 0.016 + 0.064= 0.6 = ? cavity | toothache =? cavity toothache ? toothache 0.016 + 0.064 = 0.108 + 0.012 + 0.016 + 0.064= 0.4 ? cavity | toothache + ? cavity | toothache = 1
Normalization ? cavity | toothache =? cavity toothache = 0.6 ? toothache ? cavity | toothache =? cavity toothache = 0.4 ? toothache ? toothache is a normalization constant for the distribution ? Cavity | toothache so it adds up to 1. We can calculate ? Cavity | toothache without ?(toothache) as follows. ? Cavity | toothache = ?? Cavity, toothache = ?[? Cavity, toothache,catch + ? Cavity, toothache, catch ] = ?[ 0.108,0.016 + 0.012,0.064 ] = ? 0.108 + 0.012,0.016 + 0.064 = ? 0.12,0.08 = 0.6,0.4 normalization constant ? = 5 = 1/?(toothache).
Inference Procedure ?: single query variable (e.g., Cavity). ?: evidence variables (e.g., Toothache). ?: their observed values. ?: unobserved variables (e.g., Catch). ? ? ?) ??(?,?) = ? ?(?,?,?) ? Summation is over all possible combinations ? of values of variables in ?. ? ?,?,? is a subset of probabilities from the full joint distribution. The full joint distribution has size exponential in # variables and is rarely computed.
Independence Add a fourth variable Weather with domain {sun, rain, cloud, snow}. ?(Toothache,Catch,Cavity,Weather) ?(toothache,catch,cavity,cloud) = ? cloud | toothache,catch,cavity ?(toothache,catch,cavity) ? cloud | toothache,catch,cavity = ?(cloud) = ? cloud ?(toothache,catch,cavity) ? Toothache,Catch,Cavity,Weather = ? Toothache,Catch,Cavity? Weather 8-element table + 4-element table A 32-element table.
Independent Variables Two propositions ? and ? are independent if ? ? ?) = ?(?) or ? ? ?) = ? ? or ? ? ? = ? ? ?(?) Equivalent Two variables ? and ? are independent if ? ? ?) = ?(?) or ? ? ?) = ? ? or ? ? ? = ? ? ?(?) Two continuous variables ? and ? are independent if, for all ?,? , ? ? ? ? ? = ?(? ?) ?(? ?) The joint probability density function ?(?,?) satisfies ? ?,? = ? ?,? ?? ? ?,? ??
Factoring a Joint Distribution The full joint distribution can be factored into separate joint distributions on subsets of variables that are independent. Weather and dental problems are independent. Coin flips are independent.