I have been given and expression for a probability distribution precisely,
$P(x,y,z)= \sum_\lambda P(x|y,\lambda)P(y|\lambda,z)P(z)P(\lambda)$
and I have been asked to show that the above expression can be written in the forma of the following (with correct changes)
$P(x,y,z)= Tr(\rho_{AB}(E_A^{x|y} \otimes E_B^{y|z}))P(z)$
where $\rho_{AB}, E_A^{x|y}, E_B^{y|z}$ are the density matrix and POVM’s on system AB.
I have no clue of even how the trace comes into picture. I have no clue as to how the first expression can be simplified to get a trace, leave alone getting the whole expression correctly.
It's not exactly clear from the question exactly what you want but here's maybe something to get you started.
If you define some density matrices $\rho_A^\lambda$ such that $\mathrm{Tr}[\rho_A^{\lambda} E_A^{x|y}] = p(x|y,\lambda)$ and similarly define $\rho_B^{\lambda}$ such that $\mathrm{Tr}[\rho_B^{\lambda} E_B^{y|z}] = p(y|z,\lambda)$. Then you can define the joint state $$ \rho_{AB} = \sum_\lambda p(\lambda) \rho_A^\lambda \otimes \rho_B^\lambda. $$
Then you have \begin{align*} \mathrm{Tr}[\rho_{AB} (E_A^{x|y}\otimes E_B^{y|z})]p(z) &= \mathrm{Tr}[(\sum_\lambda p(\lambda) \rho_A^\lambda \otimes \rho_B^\lambda) (E_A^{x|y}\otimes E_B^{y|z})]p(z) \\ &= \sum_\lambda p(\lambda)\mathrm{Tr}[(\rho_A^\lambda \otimes \rho_B^\lambda) (E_A^{x|y}\otimes E_B^{y|z})]p(z) \\ &= \sum_\lambda p(\lambda)\mathrm{Tr}[\rho_A^\lambda E_A^{x|y}] \mathrm{Tr}[ \rho_B^\lambda E_B^{y|z}]p(z) \\ &= \sum_\lambda p(\lambda) p(x|y,\lambda) p(y|z,\lambda) p(z)\\ &= p(x,y,z) \end{align*}