Estimation and Inference of Optimal Policies