I have a basic question related to finding expectation values of an operator $\hat{Q}$
We know that the expectation of $\hat{Q}$ (in the position space) is given by
$$\langle Q \rangle=\int {\Psi^* Q\Psi \,\mathrm dx} \tag 1$$
How do we know that the above equation is valid for all $\hat Q$?
I understand that expectation of $x$ is given by
$$\langle x \rangle=\int {\Psi^* (x)\Psi\, \mathrm dx}$$
so differentiating this wrt to $t$ we get the momentum expectation value $\langle p\rangle$, the author just derives $\langle p\rangle$ and tells for a general $\hat Q$ the expectation value is given by the eq(1)
One reason I can think of (which is probably wrong) is that any physical operator can be expressed as a combination of $x$ and $p$.
How do we know eq(1) gives the expectation value for any $Q$? Is there something I am missing out?
Any help appreciated!!