Bayes Theorem (10B) Young Won Lim 6/3/17

Similar documents
Bayes Theorem (4A) Young Won Lim 3/5/18

Higher Order ODE's (3A) Young Won Lim 7/7/14

Matrix Transformation (2A) Young Won Lim 11/10/12

General CORDIC Description (1A)

Higher Order ODE's (3A) Young Won Lim 12/27/15

Expected Value (10D) Young Won Lim 6/12/17

Relations (3A) Young Won Lim 3/27/18

CT Rectangular Function Pairs (5B)

Detect Sensor (6B) Eddy Current Sensor. Young Won Lim 11/19/09

Root Locus (2A) Young Won Lim 10/15/14

Background Trigonmetry (2A) Young Won Lim 5/5/15

Fourier Analysis Overview (0A)

DFT Frequency (9A) Each Row of the DFT Matrix. Young Won Lim 7/31/10

Higher Order ODE's (3A) Young Won Lim 7/8/14

General Vector Space (2A) Young Won Lim 11/4/12

Fourier Analysis Overview (0A)

Complex Trigonometric and Hyperbolic Functions (7A)

Matrix Transformation (2A) Young Won Lim 11/9/12

Introduction to ODE's (0A) Young Won Lim 3/9/15

Signal Functions (0B)

Separable Equations (1A) Young Won Lim 3/24/15

Discrete Time Rect Function(4B)

Down-Sampling (4B) Young Won Lim 10/25/12

Line Integrals (4A) Line Integral Path Independence. Young Won Lim 10/22/12

Capacitor Young Won Lim 06/22/2017

Discrete Time Rect Function(4B)

Dispersion (3A) 1-D Dispersion. Young W. Lim 10/15/13

Linear Equations with Constant Coefficients (2A) Young Won Lim 4/13/15

Capacitor and Inductor

Capacitor and Inductor

Fourier Analysis Overview (0B)

Capacitor in an AC circuit

Implication (6A) Young Won Lim 3/17/18

Down-Sampling (4B) Young Won Lim 11/15/12

Group & Phase Velocities (2A)

Up-Sampling (5B) Young Won Lim 11/15/12

The Growth of Functions (2A) Young Won Lim 4/6/18

Propagating Wave (1B)

Magnetic Sensor (3B) Magnetism Hall Effect AMR Effect GMR Effect. Young Won Lim 9/23/09

Higher Order ODE's, (3A)

Complex Series (3A) Young Won Lim 8/17/13

Probability (10A) Young Won Lim 6/12/17

Audio Signal Generation. Young Won Lim 1/29/18

Sequential Circuit Timing. Young Won Lim 11/6/15

ODE Background: Differential (1A) Young Won Lim 12/29/15

Hamiltonian Cycle (3A) Young Won Lim 5/5/18

Definitions of the Laplace Transform (1A) Young Won Lim 1/31/15

Digital Signal Octave Codes (0A)

Differentiation Rules (2A) Young Won Lim 1/30/16

Line Integrals (4A) Line Integral Path Independence. Young Won Lim 11/2/12

Signals and Spectra (1A) Young Won Lim 11/26/12

Phasor Young Won Lim 05/19/2015

General Vector Space (3A) Young Won Lim 11/19/12

FSM Examples. Young Won Lim 11/6/15

Resolution (7A) Young Won Lim 4/21/18

Digital Signal Octave Codes (0A)

Propositional Logic Resolution (6A) Young W. Lim 12/12/16

Group Velocity and Phase Velocity (1A) Young Won Lim 5/26/12

Complex Functions (1A) Young Won Lim 2/22/14

Digital Signal Octave Codes (0A)

Audio Signal Generation. Young Won Lim 2/2/18

Digital Signal Octave Codes (0A)

Propositional Logic Resolution (6A) Young W. Lim 12/31/16

Hyperbolic Functions (1A)

Implication (6A) Young Won Lim 3/12/18

Group Delay and Phase Delay (1A) Young Won Lim 7/19/12

Introduction to ODE's (0P) Young Won Lim 12/27/14

CMOS Inverter. Young Won Lim 3/31/16

Surface Integrals (6A)

Digital Signal Octave Codes (0A)

Background ODEs (2A) Young Won Lim 3/7/15

CLTI Differential Equations (3A) Young Won Lim 6/4/15

Audio Signal Generation. Young Won Lim 2/2/18

Signal Processing. Young Won Lim 2/20/18

Digital Signal Octave Codes (0A)

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17

Differentiation Rules (2A) Young Won Lim 2/22/16

Bayesian Updating: Discrete Priors: Spring

Bandpass Sampling (2B) Young Won Lim 3/27/12

Background LTI Systems (4A) Young Won Lim 4/20/15

CT Correlation (2A) Young Won Lim 9/9/14

CLTI System Response (4A) Young Won Lim 4/11/15

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

Undersampling (2B) Young Won Lim 4/4/12

Second Order ODE's (2A) Young Won Lim 5/5/15

Surface Integrals (6A)

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

MA : Introductory Probability

Capacitor in an AC circuit

Bayesian Updating: Discrete Priors: Spring

Capacitor in an AC circuit

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Capacitor in an AC circuit

Background Complex Analysis (1A) Young Won Lim 9/2/14

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

CS-E3210 Machine Learning: Basic Principles

Capacitor in an AC circuit

Hilbert Inner Product Space (2B) Young Won Lim 2/7/12

Capacitor in an AC circuit

Capacitor in an AC circuit

Transcription:

Bayes Theorem (10B)

Copyright (c) 2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Please send corrections (or suggestions) to youngwlim@hotmail.com. This document was produced by using OpenOffice and Octave.

Intersection Probability https://en.wikipedia.org/wiki/conditional_probability Bayes Theorem (10B) 3

Bayes' Rule (1) P(F E) = P(E F) P( E) P(E F) = P(E F) P(F) P(F E) P(E) = P(E F) P( E F) P(F) = P(E F) P(E F) = P(F E) P(E) = P(E F) P(F) P(F E) = P(E F) P(F) P( E) P( E F) = P(F E) P(E) P(F) Bayes Theorem (10B) 4

Bayes' Rule (2) E = ( E F) (E F) F E F E E F F F E F E S = E F F F S + E F F F S P( E) = P(E F) P(F) + P(E F) P(F) Bayes Theorem (10B) 5

Bayes' Rule (3) P(F E) = P(E F) P(F) P( E) P( E) = P(E F) P(F) + P(E F) P(F) P(F E) = P(E F) P(F) P(E F) P(F) + P(E F) P(F) Bayes Theorem (10B) 6

A Priori and a Posteriori Two types of knowledge, justification, or arguments A Priori - from the earlier independent of experience All bachelors are unmarried A Posteriori - from the later Dependent on experience or empirical evidence Some bachelors are happy Bayes Theorem (10B) 7

Bayes' Rule (1) means given H : Hypothesis E : Evidence The prior probability the probability of H before E is observed. The likelihood of observing E given H P(H E) = P(E H ) P(H ) P(E) The posterior probability the probability of H given E, i.e., after E is observed. the marginal likelihood or "model evidence" the same for all possible hypotheses Bayes Theorem (10B) 8

Bayes' Rule (2) P( H E) = P( E H ) P(H) P(E) P(H), the prior probability the probability of H before E is observed. This indicates one's preconceived beliefs about how likely different hypotheses are, absent evidence regarding the instance under study. P(H E), the posterior probability the probability of H given E, i.e., after E is observed. the probability of a hypothesis given the observed evidence P(E H), the probability of observing E given H, is also known as the likelihood. It indicates the compatibility of the evidence with the given hypothesis. P(E), the marginal likelihood or "model evidence". This factor is the same for all possible hypotheses being considered. This means that this factor does not enter into determining the relative probabilities of different hypotheses. Bayes Theorem (10B) 9

Bayes' Rule (3) means given H : Hypothesis E : Evidence P(H E) = P(E H ) P(H ) P(E) P(E H ) P( H E) Update P(H) The posterior probability the probability of H given E, i.e., after E is observed. The likelihood of observing E given H The prior probability the probability of H before E is observed. Bayes Theorem (10B) 10

Example If the Evidence doesn't match up with a Hypothesis, one should reject the Hypothesis. But if a Hypothesis is extremely unlikely a priori, one should also reject it, even if the Evidence does appear to match up. P(E H ) P(H ) Three Hypotheses about the nature of a newborn baby of a friend, including: H1: the baby is a brown-haired boy H2: the baby is a blond-haired girl. H3: the baby is a dog. Consider two scenarios: I'm presented with Evidence in the form of a picture of a blond-haired baby girl. I find this Evidence supports H2 and opposes H1 and H3. I'm presented with Evidence in the form of a picture of a baby dog. I don't find this Evidence supports H3, since my prior belief in this Hypothesis (that a human can give birth to a dog) is extremely small. Bayes' rule a principled way of combining new Evidence with prior beliefs, through the application of Bayes' rule. can be applied iteratively: after observing some Evidence, the resulting posterior probability can then be treated as a prior probability, and a new posterior probability computed from new Evidence. Bayesian updating. Bayes Theorem (10B) 11

Posterior Probability Example (1) Suppose there are two full bowls of cookies. Bowl #1 has 10 chocolate chip and 30 plain cookies, while bowl #2 has 20 of each. When picking a bowl at random, and then picking a cookie at random. No reason to treat one bowl differently from another, likewise for the cookies. The drawn cookie turns out to be a plain one. How probable is it from bowl #1? more than a half, since there are more plain cookies in bowl #1. The precise answer Let H1 correspond to bowl #1, and H2 to bowl #2. P(H1)=P(H2)=0.5. The event E is the observation of a plain cookie. From the contents of the bowls, P(E H1) = 30/40 = 0.75 and P(E H2) = 20/40 = 0.5. Bayes' formula then yields P(H1 E) = P( E H1) P( H1) P(E H1)P(H1) + P(E H2)P(H2) = 0.75 0.5 0.75 0.5 + 0.5 0.5 = 0.6 Bayes Theorem (10B) 12

Posterior Probability Example (2) Bowl #1 Bowl #2 P(H1 E) = P(E H1) P(H1) P(E H1) P(H1) + P(E H2)P(H2) P(H1)=0.5 P(H2)=0.5 = 0.75 0.5 0.75 0.5 + 0.5 0.5 = 0.6 P(E H1) = 30/40 = 0.75 P(E H2) = 20/40 = 0.5 P(E) = P(E H1) P(H1) + P(E H2)P(H2) P(H1 E) = P(E H1) P(H1) P(E) Bayes Theorem (10B) 13

Posterior Probability Example (3) Bowl #1 Bowl #2 Bowl #1 Bowl #2 P(H1)=0.5 P(H2)=0.5 P(E H1) = 30/40 = 0.75 P(E H1)P(H1) = 0.75 0.5 = 0.375 P(E H2)P(H2) = 0.5 0.5 = 0.25 P(E H2) = 20/40 = 0.5 P(H1 E) = P(E H1) P(H1) P(E H1)P(H1) + P(E H2)P(H2) = 0.75 0.5 0.75 0.5 + 0.5 0.5 = 0.6 Bayes Theorem (10B) 14

Posterior Probability Example (4) Bowl #1 Bowl #2 Bowl #1 Bowl #2 P(H1)=0.5 P(H2)=0.5 P(E C H1) = 10/40 = 0.25 P(E C H1)P(H1) = 0.25 0.5 = 0.125 P(E C H2)P(H2) = 0.5 0.5 = 0.25 P(E C H2) = 20/40 = 0.5 P(E H1)P(H1) P(E H2)P(H2) = 0.75 0.5 = 0.375 = 0.5 0.5 = 0.25 P(H1)=0.5 P(H2)=0.5 Bayes Theorem (10B) 15

Bayes Theorem (10B) 16

Bayes Theorem (10B) 17

Bayes Theorem (10B) 18

Bayes Theorem (10B) 19

Bayes Theorem (10B) 20

References [1] http://en.wikipedia.org/ [2] https://en.wikiversity.org/wiki/understanding_information_theory