The definition of the expectation value for a continuous domain f(x) is given by
$$<f(x)>=\int{f(x)p(x)dx}$$ where p(x) is the probability density function corresponding to {x}.
In quantum mechanics the expectation value of an operator (for 1-d space) $\hat{Q}$ is given by
$$<\hat{Q}> = \int{\psi^{*}{(x)}\hat{Q}\psi{(x)} dx}$$
My question, and confusion, is twofold.
1) f(x) is a domain of values. $\hat{Q}$ is an operator that can only be considered a domain of values when it operates on $\psi$. Thus it strikes me that one wouldn't be able to evaluate $<\hat{Q}>$ but rather $<\hat{Q}\psi{(x)}>$. This however wouldn't work because this would be evaluated as $$ <\hat{Q}\psi{(x)}>=\int{\hat{Q}\psi{(x)}p(x)dx}=\int{\hat{Q}\psi{(x)}|\psi{(x)}|^2dx}=\int{\hat{Q}\psi{(x)}\psi{(x)}^*\psi{(x)} dx}$$
This is obviously does not fit the definition of the expectation value of an operator used in QM
2) Say I'm missing something in the definition of an expectation value or this is just some notational convenience I'm unaware of. Let us then assume I can take the expectation value of an operator alone.
$$ <\hat{Q}>=\int{\hat{Q}p(x)dx}=\int{\hat{Q}|\psi{(x)}|^2dx}=\int{\hat{Q}\psi{(x)}^*\psi{(x)} dx}$$
But this still does not make sense because $\int{\hat{Q}\psi{(x)}^*\psi{(x)} dx}$ does not necessarily equal $\int{\psi^{*}\hat{Q}\psi dx}$
I know I'm doing something wrong, but what?
To answer the end of 2) $Q$ is Hermitian ($Q = {Q}^*$ in this notation [I know its poor notation]), so $\langle Q \rangle \equiv \langle \psi , Q \psi \rangle = \langle Q \psi , \psi \rangle$ which shows that $\int \psi^* Q \psi \; dx = \int {Q}^* \psi^* \psi \; dx = \int {Q} \psi^* \psi \; dx.$
1) The $Q$ versus $Q$ acting on some domain issue is easily fixed since we let that the symbol $\langle Q \rangle$ implicitly mean "the expectation of $Q$ acting on this particular state function" - it doesn't mean "the expectation of $Q$ forever and always in all situations." So we are not finding the expectation value of the operator, but the expectation of the operator acting on this system.
One could define $\langle Q \rangle \equiv \langle \psi | Q | \psi \rangle \equiv \int \psi^* Q \psi \; dx$ to be the expectation of $Q$ acting on $\psi$, that fixes the problem but is not satisfying for the question you posed. Perhaps using what you did in problem 2 in combination with the fact that $Q$ is Hermitian solves your problem.