An image , corrupted with noise, has pixels which take the value 1 with probability q and 0 with probability 1−q, with q being the value of a random variable Q which is uniformly on [0,1]. Xi is the value of pixel i, but we observe Yi=Xi+N for each pixel. N is normal and has mean =2 and unit variance. The q and N is the same for every pixel, and conditioned on Q, every Xi is independent. The noise is independent of Q and every Xi. Let A be the event that the actual values of X1 and X2, (the first and second pixels) are =0.

find:E[Yi], Var[Yi] and fQ|A(q) (conditional probability of Q given A, as a function of q) for 0≤q≤1

My working so far:
E[Xi] = bernoulli RV, so E[Xi] = q = 0.5 (Q is uniform on [0,1])
E[Yi] = E[Xi] + E[N]
= q + 2 = 2.5
Var[Yi] =Var[Xi] +Var[N]
= q(1-q) + 1
= 0.5*0.5 + 1 = 1.25
P(X1 = 0) = 1-q = P(X2 = 0)
fQ(q) = 1 (uniform on [1,0])
fA(q) = ? =
fQ|A(q) = (fQ(q) * fA|Q(q)) / fA(q) ?
fQ|A(q) = (1*(1-q)*(1-q))/?)

To find fQ|A(q), we need to find fA(q) first.

The event A is defined as the actual values of X1 and X2 both being 0. Since Xi is a Bernoulli random variable with probability of success q, the probability of X1 and X2 both being 0 is simply the probability of X1 being 0 multiplied by the probability of X2 being 0, which is (1-q) * (1-q) = (1-q)^2.

Now, we need to find the normalizing constant for fQ|A(q), which is the probability of event A, P(A). P(A) can be calculated by integrating fA(q) over the range of q from 0 to 1. Since fA(q) is simply (1-q)^2, the integral is:

P(A) = ∫(1-q)^2 dq from 0 to 1
= ∫(1-2q+q^2) dq from 0 to 1
= [q - q^2/2 + q^3/3] from 0 to 1
= (1 - 1/2 + 1/3) - (0 - 0 + 0)
= 1/6

Now, we can find fQ|A(q) using Bayes' theorem:

fQ|A(q) = (fQ(q) * fA|Q(q)) / fA(q)

Since fQ(q) is uniformly distributed on [0,1], it is simply 1. And fA|Q(q) is the conditional probability of A given Q=q.

Since Xi is independent of Q, the conditional probability of A given Q=q is the same as the probability of A, which is 1/6. Therefore, fA|Q(q) is also 1/6.

Finally, we can substitute these values into the equation to find fQ|A(q):

fQ|A(q) = (1 * (1/6)) / (1/6)
= 1

So, the conditional probability of Q given A, as a function of q, is simply 1 for 0 ≤ q ≤ 1.