I'm trying to figure out the analogies between the expectation of a random variable $X$ and the expectation of an observable of a quantum mechanical system $A$ (using this wikipedia article).
The expectation of $A$ is $$\mathbb{E}(A)\equiv\int_\mathbb{R}\lambda\text{d}\text{D}_A(\lambda)\,,$$ where the distribution of $A$ under $S$ is $$\text{D}_A(U)\equiv\text{Tr}(\text{E}_A(U)S)\,,$$ where $S$ is a given state (i.e. density operator) and the spectral measure is $$\text{E}_A(U)\equiv\int_U\lambda\text{d}\text{E}(\lambda)\,,$$ (where $\text{E}(\lambda)$ is the spectral projection of $A$?)
Does anybody know to how to define $\text{D}_X(\lambda)$ for a random variable in a way similar to $\text{D}_A(\lambda)$ such that $$\mathbb{E}(X)\equiv\int_\mathbb{R}\lambda\text{d}\text{D}_X(\lambda)\,,$$ and the analogy is complete? Also, to what does $E_A(U)$ correspond in the case of a random variable?
Partial attempt:
- the state $S$ corresponds to the probability measure $P$
- the distribution of $X$ under $P$ can be defined as $P(X\in U)$, which is $$D_X(U)=\int 1_{X\in U}\text{d}P\,,$$ but I still don't know how to write this like a trace of the form $\text{Tr}(\cdots P)$.