ECE531 Homework Assignment Number 2

Similar documents
ECE531 Lecture 2a: A Mathematical Model for Hypothesis Testing (Finite Number of Possible Observations)

ECE531 Lecture 2b: Bayesian Hypothesis Testing

ECE531 Lecture 13: Sequential Detection of Discrete-Time Signals

Chapter 2. Binary and M-ary Hypothesis Testing 2.1 Introduction (Levy 2.1)

ECE531 Lecture 4b: Composite Hypothesis Testing

ECE531 Lecture 6: Detection of Discrete-Time Signals with Random Parameters

Sheet 4 solutions. May 15, 2017

ECE 313: Hour Exam I

Introduction to Bayesian Statistics

University of Chicago Graduate School of Business. Business 41901: Probability Final Exam Solutions

University of Cambridge Engineering Part IIB Module 3F3: Signal and Pattern Processing Handout 2:. The Multivariate Gaussian & Decision Boundaries

Dynamic Programming Lecture #4

MA : Introductory Probability

Detection and Estimation Chapter 1. Hypothesis Testing

Recursive Estimation

Randomized Algorithms

Preliminary Statistics Lecture 2: Probability Theory (Outline) prelimsoas.webs.com

Chapter Three. Hypothesis Testing

CS 188: Artificial Intelligence Spring Today

Probabilistic Reasoning

Decision theory. 1 We may also consider randomized decision rules, where δ maps observed data D to a probability distribution over

Frequentist Statistics and Hypothesis Testing Spring

ECE531 Screencast 11.5: Uniformly Most Powerful Decision Rules

2 Statistical Estimation: Basic Concepts

Compute f(x θ)f(θ) dθ

More Spectral Clustering and an Introduction to Conjugacy

DS-GA 1003: Machine Learning and Computational Statistics Homework 7: Bayesian Modeling

Probability Density Functions and the Normal Distribution. Quantitative Understanding in Biology, 1.2

What does Bayes theorem give us? Lets revisit the ball in the box example.

+ + ( + ) = Linear recurrent networks. Simpler, much more amenable to analytic treatment E.g. by choosing

MAT 271E Probability and Statistics

Machine Learning: Homework Assignment 2 Solutions

To find the median, find the 40 th quartile and the 70 th quartile (which are easily found at y=1 and y=2, respectively). Then we interpolate:

STAT 830 Decision Theory and Bayesian Methods

Bayesian Methods: Naïve Bayes

(1) Introduction to Bayesian statistics

Introduction to Machine Learning. Maximum Likelihood and Bayesian Inference. Lecturers: Eran Halperin, Lior Wolf

Introduction to Spring 2006 Artificial Intelligence Practice Final

A(VeryBrief)IntroductiontoIdealPoint Estimates

Problem Set 2. MAS 622J/1.126J: Pattern Recognition and Analysis. Due: 5:00 p.m. on September 30

Hypothesis Testing. Testing Hypotheses MIT Dr. Kempthorne. Spring MIT Testing Hypotheses

Classical and Bayesian inference

Bias Variance Trade-off

Homework 2 Solutions Kernel SVM and Perceptron

ECE295, Data Assimila0on and Inverse Problems, Spring 2015

Introduction to Stochastic Processes

E&CE 358, Winter 2016: Solution #2. Prof. X. Shen

Naïve Bayes. Jia-Bin Huang. Virginia Tech Spring 2019 ECE-5424G / CS-5824

Hypothesis Tests Solutions COR1-GB.1305 Statistics and Data Analysis

Probability Theory. Introduction to Probability Theory. Principles of Counting Examples. Principles of Counting. Probability spaces.

MATH3200, Lecture 31: Applications of Eigenvectors. Markov Chains and Chemical Reaction Systems

An Informal Introduction to Statistics in 2h. Tim Kraska

Bayesian Methods. David S. Rosenberg. New York University. March 20, 2018

A Bayesian Approach to Phylogenetics

EE 574 Detection and Estimation Theory Lecture Presentation 8

Unobservable Parameter. Observed Random Sample. Calculate Posterior. Choosing Prior. Conjugate prior. population proportion, p prior:

Elementary Discrete Probability

Lecture 8: Information Theory and Statistics

Lecture 8: Information Theory and Statistics

Bayesian Inference. STA 121: Regression Analysis Artin Armagan

Introduction to Machine Learning

Generative classifiers: The Gaussian classifier. Ata Kaban School of Computer Science University of Birmingham

Introduction to Machine Learning

DS-GA 1002 Lecture notes 11 Fall Bayesian statistics

Detection theory. H 0 : x[n] = w[n]

Universität Potsdam Institut für Informatik Lehrstuhl Maschinelles Lernen. Bayesian Learning. Tobias Scheffer, Niels Landwehr

Homework 2. Spring 2019 (Due Thursday February 7)

COMP 551 Applied Machine Learning Lecture 19: Bayesian Inference

A.I. in health informatics lecture 2 clinical reasoning & probabilistic inference, I. kevin small & byron wallace

The devil is in the denominator

BAYESIAN DECISION THEORY

CS 6140: Machine Learning Spring What We Learned Last Week. Survey 2/26/16. VS. Model

Total. Name: Student ID: CSE 21A. Midterm #2. February 28, 2013

ORF 245 Fundamentals of Statistics Chapter 9 Hypothesis Testing

Be able to define the following terms and answer basic questions about them:

Probability Intro Part II: Bayes Rule

Fundamentals of Statistical Signal Processing Volume II Detection Theory

Bayesian Updating with Continuous Priors Class 13, Jeremy Orloff and Jonathan Bloom

CS 6140: Machine Learning Spring 2016

Detection and Estimation Theory

Naïve Bayes classification

18.05 Final Exam. Good luck! Name. No calculators. Number of problems 16 concept questions, 16 problems, 21 pages

Bayesian inference. Justin Chumbley ETH and UZH. (Thanks to Jean Denizeau for slides)

Chapter 2 Signal Processing at Receivers: Detection Theory

MATH 180A - INTRODUCTION TO PROBABILITY PRACTICE MIDTERM #2 FALL 2018

Lecture 3. STAT161/261 Introduction to Pattern Recognition and Machine Learning Spring 2018 Prof. Allie Fletcher

MAE 493G, CpE 493M, Mobile Robotics. 6. Basic Probability

IEOR 3106: Introduction to Operations Research: Stochastic Models. Professor Whitt. SOLUTIONS to Homework Assignment 2

ECE531 Homework Assignment Number 6 Solution

EECS 126 Probability and Random Processes University of California, Berkeley: Spring 2015 Abhay Parekh February 17, 2015.

Reminders. Thought questions should be submitted on eclass. Please list the section related to the thought question

Bayesian Inference. Introduction

CHAPTER 2 Estimating Probabilities

Pattern Classification

Fundamentals. CS 281A: Statistical Learning Theory. Yangqing Jia. August, Based on tutorial slides by Lester Mackey and Ariel Kleiner

Midterm Examination. Mth 136 = Sta 114. Wednesday, 2000 March 8, 2:20 3:35 pm

Outline. 1. Define likelihood 2. Interpretations of likelihoods 3. Likelihood plots 4. Maximum likelihood 5. Likelihood ratio benchmarks

Bios 6649: Clinical Trials - Statistical Design and Monitoring

Physics 403. Segev BenZvi. Choosing Priors and the Principle of Maximum Entropy. Department of Physics and Astronomy University of Rochester

Lecture 7. Union bound for reducing M-ary to binary hypothesis testing

Transcription:

ECE53 Homework Assignment Number 2 Due by 8:5pm on Thursday 5-Feb-29 Make sure your reasoning and work are clear to receive full credit for each problem 3 points A city has two taxi companies distinguished by the color of their taxis: 85% of the taxis are Yellow and the rest are Blue A taxi was involved in a hit and run accident and was witnessed by Mr Green Unfortunately, Mr Green is mildly color blind and can only correctly identify the color 8% of the time In the trial, Mr Green testified that the color of the taxi was blue Should you trust him? Solution: This problem can be interpreted as: Does Mr Green s decision minimizes the Bayesian risk? Let s assume a uniform cost assignment (UCA) and use x and H to represent Yellow and x and H to represent Blue Also let = 85 denote the prior probability of a yellow taxi, = 5 denote the prior probability of a blue taxi, and Y = y denote Mr Green s observation of a blue taxi Then from slide 26 in Lecture 2b, a deterministic Bayes decision rule can be written in terms of the posterior probabilities as δ B (y) = arg max j (y), i {,} x j H i where j (y) = Prob(state is x j observation is y) Given Mr Green s observation Y = y (the taxi was blue), then if (y ) > (y ) the posterior probability of the taxi being blue is greater than the posterior probability of the taxi being yellow and we can trust MrGreen We can write the posterior probabilities (y ) = p (y ) p(y ) (y ) = p (y ) p(y ) Thus we only need to compare κ = p (y ) and κ = p (y ) κ = 2 85 = 7 κ = 8 5 = 2 We see that κ > κ, hence the posterior probability of the taxi being yellow is greater than the posterior probability of the taxi being blue and we can not trust MrGreen 2 8 points total Consider the coin flipping problem where you have an unknown coin, either fair (HT) or double headed (HH), and you observe the outcome of n flips of this coin Assume a uniform cost assignment For notational consistency, let the state and hypothesis x and H be the case when the coin is HT and x and H be the case when the coin is HH

(a) 3 points Plot the conditional risk vectors (CRVs) of the deterministic decision rules for the cases of n =,2,3,4, coin flips You might want to write a Matlab script to do this for n > 2 Solution: See the Matlab script and plots below % 2 % ECE53 Spring 29 3 % DRB 5 Feb 29 4 % Solution to Homework 2 Problem 2 part a 5 % 6 % USER PARAMETERS BELOW 7 % 8 ntest = :4; % values of n to test 9 % N = 2; % number of hypotheses 2 M = 2; % number of states 3 p H = 5; % conditional p robability of H given x 4 p H = ; % conditional p robability of H given x 5 C = [ ; ] ; % UCA 6 7 for n = ntest 8 9 L = n+; % number of possible observations 2 totd = MˆL; % total number of decision matrices 2 B = makebinary (L, ) ; 22 23 % form conditional probability matrix 24 % columns are indexed by state 25 % rows are indexed by observation 26 P = zeros (L, ) ; 27 P = zeros (L, ) ; 28 for i = :( L ), 29 P( i +) = nchoosek (n, i ) p Hˆ i ( p H )ˆ(n i ) ; 3 P( i +) = nchoosek (n, i ) p Hˆ i ( p H )ˆ(n i ) ; 3 end 32 P = [P P ] ; 33 34 % compute CRVs for a l l possible deterministic decision matrices 35 for i = :( totd ), 36 D = [ B( :, i +) ; B( :, i +) ] ; % decision matrix 37 % compute risk vectors 38 for j =:, 39 R( j +, i +) = C( :, j +) D P( :, j +); 4 end 4 end 42 43 fi gure 44 plot (R(,:),R( 2,:), p ) ; 45 xlabel ( R ) 46 ylabel ( R ) 47 title ( [ n= num2str(n ) ] ) ; 48 axis square 49 grid on 5 5 end Here is the function makebinarym that is called by the main code function y=makebinary (K, unipolar ) 2

3 y=zeros (K,2ˆK) ; % a l l possible b it combos 4 for index =:K, 5 y(k index +,:)=( )ˆ ceil ( [:2ˆK]/(2ˆ( index ))); 6 end 7 if unipolar >, 8 y = (y+)/2; 9 end Here are the plots n= 9 8 7 6 R 5 4 3 2 2 3 4 5 6 7 8 9 R

n=2 9 8 7 6 R 5 4 3 2 2 3 4 5 6 7 8 9 R n=3 9 8 7 6 R 5 4 3 2 2 3 4 5 6 7 8 9 R

n=4 9 8 7 6 R 5 4 3 2 2 3 4 5 6 7 8 9 R (b) 2 points What can you say about the convex hull of the deterministic CRVs as n increases? Solution: You can see the trend from the plots of how the CRVs of the deterministic decision rules move closer to the bottom left corner as n increases The convex hull of achievable CRVs then fills more of the risk plane as n gets larger Hence, you can achieve any arbitrarily small risk combination for sufficiently large n (c) 3 points When n = 2, find the deterministic decision rule(s) that minimize the Bayes risk for the prior = 6 and = 4 Repeat this for the case when n = 3 Does the additional observation reduce the Bayes risk for this prior? Solution: Notation: HT = x H and HH = x H When n=2, we can write the conditional probability matrix P as and the expected cost matrix G as [ G = P = 25 5 25 4 5 3 5 Hence the optimal deterministic decision matrix that minimizes the Bayes cost is [ ] D = and the resulting Bayes risk is r = 5 ]

When n=3, we can write the conditional probability matrix P as 25 P = 375 375 25 and the expected cost matrix G as [ ] 4 G = 75 225 225 75 Hence the optimal deterministic decision matrix that minimizes the Bayes cost is [ ] D = and the resulting Bayes risk is r = 75 The risk is reduced by flipping the coin one more time, as you would expect 3 3 points Poor textbook Chapter II Problem 2 (a) Solution: The likelihood ratio is given by L(y) = p (y) p (y) = 3 2(y + ), y With uniform costs and equal priors, we can compute the optimum threshold on the likelihood function as τ = From our expression for L(y), an equivalent condition to L(y) is y [,5] Thus, for priors = = 5, the deterministic Bayes decision rule is given by if y < 5 δ B (y) = / if y = 5 if 5 < y The corresponding minimum Bayes risk for this prior is 5 r(δ B 2 ) = 5 (y + )dy + 5 dy = 3 5 24 4 3 points Poor textbook Chapter II, Problem 4 (a) Solution: Here the likelihood ratio is given by L(y) = p (y) 2 p (y) = y 2 ey Let 2 τ = and note that L(y) = τ is equivalent to y = τ where ( ) τ = 2ln 2e 2e (y ) 2 e 2, y

Hence, we can express the critical region of observations where we decide H as Γ = { y (y ) 2 τ } There are three cases that depend on τ : if τ < Γ = [ τ, + ] τ if τ [, + ] τ if τ > For notational convenience, let s define the following constants: Then we can say that α := + β := + 2e 2e 2 2 5683 44379 The condition τ < is equivalent to α < The condition τ is equivalent to β α The condition τ > is equivalent to < β The minimum Bayes risk V ( ) can be calculated according to these three regions: if α < [ + τ V ( ) = e y 2 τ dy + ( τ ) e y 2 2 dy + ] + τ e y 2 2 dy if β α + τ e y 2 dy + ( ) + τ e y 2 2 dy if < β Note that these integrals can be expressed as Q-functions (or erf/erfc functions) but cannot be evaluated in closed form for arbitrary priors 5 3 points Poor textbook Chapter II, Problem 6 (a) Solution: Here we have p (y) = p N (y + s) and p (y) = p N (y s), where p N (x) is the pdf of the random variable N This gives the likelihood function L(y) = + (y + s)2 + (y s) 2 With equal priors and uniform costs, the critical region where we decide H is Γ = {L(y) } = { + (y + s) 2 + (y s) 2} = {2sy 2sy} = [, ) Thus, the Bayes decision rule reduces to { δ B if y (y) = if y < The minimum Bayes risk is then r(δ B ) = 2 [ + (y + s) 2 ] dy + 2 [ + (y s) 2 ] dy = 2 tan (s)