Expectation values in path integral formalism In quantum field theory, it is often assumed that the expectation value $\langle A\rangle$ of an operator $A$ can be written in the path integral formalism in the following way:
$$
\langle A\rangle = \frac{\int \mathcal{D}\phi\, A\, e^{\frac{i}{\hbar}S[\phi]}}{\int \mathcal{D}\phi\,  e^{\frac{i}{\hbar}S[\phi]}}.
$$
How can we reach this conclusion? Is this always true for all operators $A$, or is it only true in some cases?
 A: If you are looking for a proof then the recommendations given in the comments appear to be quite helpful. There is a ''physics'' type proof in $\underline{Peskin\;\&\;Schroeder's}$ textbook where they first state the formula, and then show that we obtain the same result for a scalar propagator in the canonical formulation (commutators).
However, if you would like to know the motivation for the expectation value of an operator in field theory, then we can look back at examples from introductory quantum physics. For example, the classical formula to compute the average value for energy values over a distribution is the following,
$$ \bar{E} = \frac{\int_0^\infty E*P(E)\, dE}{\int_0^\infty P(E)dE}, $$
which is just a Maxwell-Boltzmann distribution. The numerator is just the energy of the system, weighted by the probability distribution; while the denominator is the integral of finding the system with any energy.
A: *

*On one hand, the formal connection between the operator formalism in the Heisenberg picture and the Hamiltonian phase space path integral is
$$\begin{align}
&{}_J\langle Q_f,t_f  |TF[\hat{Q},\hat{P}] |Q_i,t_i\rangle_J \cr
~=~&{}_J\langle Q_f,0| T F[\hat{Q},\hat{P}]\exp\left\{ - \frac{i}{\hbar}e^{-i\epsilon}\int_{t_i}^{t_f}\!dt~ H_J(\hat{Q},\hat{P})\right\} |Q_i,0\rangle_J \cr
~=~&\int_{Q(t_i)=Q_i}^{Q(t_f)=Q_f}\! {\cal D}Q~{\cal D}P~F[Q,P]\exp\left\{ \frac{i}{\hbar}S_J[Q,P]\right\} 
, \end{align} \tag{1} $$
cf. e.g. this Phys.SE post. We have inserted Feynman's $i\epsilon$ prescription to ensure that an otherwise oscillatory Boltzmann-factor is exponentially damped.


*On the other hand, we can insert a complete set of energy eigenstates
$$\begin{align}
{}_J \langle Q_f,t_f|n\rangle_J  
~=~&{}_J \langle Q_f,0|T \exp\left\{ - \frac{i}{\hbar}e^{-i\epsilon}\int_{0}^{t_f}\!dt~ H_J(\hat{Q},\hat{P})\right\} | n\rangle_J\cr
~=~& \exp\left\{ - \frac{i}{\hbar}e^{-i\epsilon}t_f E_n \right\} {}_J \langle Q_f,0| n\rangle_J
, \end{align} \tag{2} $$
and
$$\begin{align}
{}_J \langle m| Q_i,t_i\rangle_J  
~=~&{}_J \langle m|T \exp\left\{ \frac{i}{\hbar}e^{-i\epsilon}\int_{t_i}^{0}\!dt~ H_J(\hat{Q},\hat{P})\right\} | Q_i,t_i\rangle_J\cr
~=~& \exp\left\{ \frac{i}{\hbar}e^{-i\epsilon}t_i E_n \right\} {}_J \langle m| Q_i,t_i\rangle_J
. \end{align} \tag{3} $$
Therefore the excited energy states wash out of the overlap
$$\begin{align}
&{}_J\langle Q_f,t_f  |TF[\hat{Q},\hat{P}] |Q_i,t_i\rangle_J \cr
~=~&\sum_{n,m=0}^{\infty} {}_J\langle Q_f,t_f|n\rangle_J  {}_J\langle n |TF[\hat{Q},\hat{P}] |m\rangle_J  {}_J\langle m |Q_i,t_i\rangle_J\cr
~\stackrel{(2)+(3)}{\sim}&\exp\left\{ -\frac{i}{\hbar}e^{-i\epsilon}(t_f-t_i) E_0 \right\} \langle Q_f,t_f|0\rangle_J  
{}_J\langle 0 |TF[\hat{Q},\hat{P}] |0\rangle_J  
{}_J\langle 0 |Q_i,t_i\rangle_J \cr
&\quad\text{for}\quad -t_i,t_f~\to~\infty. 
\end{align} \tag{4} $$


*In conclusion, the quotient leads to OP's sought-for formula
$$\begin{align}
&\frac{\int_{Q(t_i)=Q_i}^{Q(t_f)=Q_f}\! {\cal D}Q~{\cal D}P~F[Q,P]\exp\left\{ \frac{i}{\hbar}S_J[Q,P]\right\}}{\int_{Q(t_i)=Q_i}^{Q(t_f)=Q_f}\! {\cal D}Q~{\cal D}P~\exp\left\{ \frac{i}{\hbar}S_J[Q,P]\right\}}\cr
~\stackrel{(1)}{=}~&\frac{{}_J\langle Q_f,t_f  |TF[\hat{Q},\hat{P}] |Q_i,t_i\rangle_J}{{}_J\langle Q_f,t_f   |Q_i,t_i\rangle_J}\cr
~\stackrel{(4)}{\sim}~&\frac{{}_J\langle 0 |TF[\hat{Q},\hat{P}] |0\rangle_J}{{}_J\langle 0  |0\rangle_J} \quad\text{for}\quad -t_i,t_f~\to~\infty. 
\end{align} \tag{5} $$
References:

*

*M. Srednicki, QFT, 2007; Chapter 6. A prepublication draft PDF file is available here.

