# How do you calculate conditional expectation for a single continuous r.v.?

So if you have a distribution fx(x) and you observed x=a, how do you calculate E{x | x=a} = integral (x*fx(x|x=a) from -inf to inf, or more specifically, fx(x|x=a)

I am having trouble when using Bayes or finding Fx(x|x=a) because I end up with P(x=a) which is just a constant. Is there a simple example somewhere? Searching only leads me to bivariate distributions.

-

Unless I misunderstood your problem: your conditional density is just a Dirac delta function in $x=a$:
$$f_x(x|x=a) =\delta(x-a)$$
Hence, $E(x | x=a) = a$ ... as intuition says.
If you want to apply the definition, you can use a limiting procedure (because, for a continuous variable the event $X=a$ has actually zero probability), considering instead the event that $X$ takes a value around $a$, in a neighborhood of length $dx$. But that's not necessary. You already know that the joint probability (the one that goes into the numerator) is zero if $x\ne a$. Hence, as the conditional density must integrate to one, it must be a dirac delta function.