Epistemic processes : a basis for statistics and quantum theory