On the violation of Bell's inequality in quantum theory