3. QR codes: Start by reading the text under Figure 1. We will generally consider X and Y as random variables. For the highlighted pixel in the figure, the gray color X=25 and the true pixel value white i.e. Y = 0. We assume that QR codes are made so that there are on average as many white as black pixels, which means that pỵ (0) = pY (1) = 1/2. In this situation, X is continuously distributed (0 ≤x≤ 100) and Y is discretely distributed, but we car still talk about the simultaneous distribution of X and Y. We start by defining the conditional density

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question

3b)

3. QR codes: Start by reading the text under Figure 1. We will generally consider X and Y as random
variables. For the highlighted pixel in the figure, the gray color X = 25 and the true pixel value white,
i.e. Y = 0. We assume that QR codes are made so that there are on average as many white as black
pixels, which means that pY (0) = pY (1) = 1/2.
In this situation, X is continuously distributed (0≤x≤ 100) and Y is discretely distributed, but we can
still talk about the simultaneous distribution of X and Y. We start by defining the conditional density
of X, given the value of Y:
ONO
fx|x(x | 0) =
fx|x (x | 1) =
4
100 (1
X
100.
4
3
100 (100) ²
DXO
3
(pixel actually white)
(pixel actually black)
Figure 1: QR code photographed in poor lighting, making it difficult to distinguish black and white
pixels. The gray color (X) in each pixel is therefore coded on a scale from 0 (white) to 100 (black). The
true pixel value (without shadow) is coded Y=0 for white, and Y = 1 for black.
P(Y=0 | X = x) =
(a) Make a plot of the marginal density fx(x) = Eyfxy(x1y)Py (y) for 0 ≤ x ≤ 100
Bayes' formula in this situation takes the form:
fxy(x0)Py(0)
fx (x)
(b) Use Bayes' formula to find the probability of white when x = 25 as in the figure.
Transcribed Image Text:3. QR codes: Start by reading the text under Figure 1. We will generally consider X and Y as random variables. For the highlighted pixel in the figure, the gray color X = 25 and the true pixel value white, i.e. Y = 0. We assume that QR codes are made so that there are on average as many white as black pixels, which means that pY (0) = pY (1) = 1/2. In this situation, X is continuously distributed (0≤x≤ 100) and Y is discretely distributed, but we can still talk about the simultaneous distribution of X and Y. We start by defining the conditional density of X, given the value of Y: ONO fx|x(x | 0) = fx|x (x | 1) = 4 100 (1 X 100. 4 3 100 (100) ² DXO 3 (pixel actually white) (pixel actually black) Figure 1: QR code photographed in poor lighting, making it difficult to distinguish black and white pixels. The gray color (X) in each pixel is therefore coded on a scale from 0 (white) to 100 (black). The true pixel value (without shadow) is coded Y=0 for white, and Y = 1 for black. P(Y=0 | X = x) = (a) Make a plot of the marginal density fx(x) = Eyfxy(x1y)Py (y) for 0 ≤ x ≤ 100 Bayes' formula in this situation takes the form: fxy(x0)Py(0) fx (x) (b) Use Bayes' formula to find the probability of white when x = 25 as in the figure.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman