Assignment 2: CS 215 Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

Questions:
1. Given random variables X and Y having probability density functions fX(x) and fY (y) respectively and
joint probability density function fXY (x, y), derive an expression for the probability density function of the
random variable Z = XY (i.e. the product of X and Y ) in terms of fX(x), fY (y) and fXY (x, y). Also derive
an expression for P(X ≤ Y ). Refine the expressions if X and Y are independent. [5+5=10 points]
2. Let X1, X2, …, Xn be n > 0 independent identically distributed random variables with cdf FX(x) and
pdf fX(x) = F
0
(X)(x). Derive an expression for the cdf and pdf of Y1 = max(X1, X2, …, Xn) and Y2 =
min(X1, X2, …, Xn) in terms of FX(x). [10 points]
3. Consider a sequence of Bernoulli trials with success parameter p ∈ (0, 1) where you bet a certain amount.
If a trial results in success, you gain that amount, else you pay the same amount. Now consider a strategy
where you bet amount x in the first trial. If the trial is a failure, you bet double the amount in the next
trial, and stop as soon as a trial is a success. Compute the total amount you will win if n trials are played
(i.e. you won on the n
th trial). [10 points]
4. Prove that any two independent random variables are uncorrelated (i.e., their covariance is zero). Construct
a counter-example to show that the converse is not always true. [2 + 5 = 7 points]
5. Given a random variable X whose values lie in the interval [a, b] where a < b, prove that Var(X) ≤
(b − a)
2
4
.
[8 points]
1
6. A function g(x) of variable x is said to be convex if it always lies lies above its tangent. In other words if
the line l(x) = a + bx is a tangent at x, then g(x) ≥ a + bx. For example, g(x) = x
2
is a convex function.
Prove that g(E(X)) ≥ E(g(X)). [10 points]
7. (a) Read in the image parrots.png from the homework folder using the MATLAB function imread and cast
it as a double array. Consider random variables X1, X2 where X1 is a random variable that denotes the
pixel intensities from the image and X2 denotes the intensities of a neighbor of each pixel located z pixels
away. For the case z = 1, your task is to write MATLAB code to compute (1) the correlation coefficient,
(2) a measure of dependence called quadratic mutual information (QMI) defined as P
x1
P
x2
(pX1X2
(x1, x2)−
pX1
(x1)pX2
(x2))2
, and (3) another measure of independence defined as P
x1
P
x2
|pX1X2
(x1, x2)−pX1
(x1)pX2
(x2)|.
Here pX1X2
(x1, x2) represents the normalized joint histogram (i.e., joint pmf) of X1 and X2 (‘normalized’
means that the entries sum up to one). For X2, ignore the first z columns of the image. For X1, ignore
the last z columns of the image. For computing the joint histogram, use a bin-width of 10 in both X1 and
X2. For computing the marginal histogram, you need to integrate the joint histogram along one of the two
directions respectively. You should write your own joint histogram routine in MATLAB – do not use any
inbuilt functions for it.
(b) Compute only the correlation coefficient for different values of z ranging from 0to100. Plot a graph of
the correlation coefficient versus z. Comment on the graph.
Your report should include a table containing all the three values for each case. Comment on the differences
in the values for the original and scrambled image in your report. What is the minimum and maximum
value that measure (3) can ever acquire? Explain in your report. [15 points]

  • A2-150050022-150050061.zip