Question: Fsolve inside an integral

I am trying to solve a problem using fsolve. Where the fsolve is inside the integral. I keep getting the following message. Here is what I am trying to do 



where Q is a normal distribution and R is also normally distributed with its parameter conditional on Q. Following is the error message that I get.

"Error, (in fsolve) z is in the equation, and is not solved for"

I also checked the following post which suggests a solution

unfortunately, that did not work for me either. I deeply appreciate any help that is directed towards me. I am attaching a sample .mw file.

Thank you!test.mpl

Please Wait...