If we have $X$ with a density depending on the scalar parameter $\theta$, where the density is from of the exponential family: $f(x;\theta) = \exp(\theta x−\phi(\theta))h(x)$.
Also we have that $\theta$ has prior density $\pi(\theta)$. How would I calculate the conditional expectation of parameter, $\mathbb{E}(\theta | x)?$
I have tried to find the posterior and get the expectation that way, but I couldn't get a nice solution. I have also tried to calculate it using the integral definition and also get stuck.