We are witnessing a significant advancements in the sensor technologies which has enabled a broad spectrum of applications. Often, the resolution of the produced data by the sensors significantly affects the output quality of an application. We study a sensing resolution optimization problem for a wireless powered device (WPD) that is powered by wireless power transfer (WPT) from an access point (AP). We study a class of harvest-first-transmit-later type of WPT policy, where an access point (AP) first employs RF power to recharge the WPD in the down-link, and then, collects the data from the WPD in the up-link. The WPD optimizes the sensing resolution, WPT duration and dynamic power control in the up-link to maximize an application dependant utility at the AP. The utility of a transmitted packet is only achieved if the data is delivered successfully within a finite time. Thus, we first study a finite horizon throughput maximization problem by jointly optimizing the WPT duration and power control. We prove that the optimal WPT duration obeys a time-dependent threshold form depending on the energy state of the WPD. In the subsequent data transmission stage, the optimal transmit power allocations for the WPD is shown to posses a channel-dependent fractional structure. Then, we optimize the sensing resolution of the WPD by using a Bayesian inference based multi armed bandit problem with fast convergence property to strike a balance between the quality of the sensed data and the probability of successfully delivering it. INDEX TERMS Bayesian inference, multi-armed bandit, reinforcement learning, wireless power transfer. I. INTRODUCTION A. MOTIVATION MEHDI SALEHI HEYDAR ABAD received the B.S. degree in electrical engineering from IUST, Tehran, Iran, in 2012, and the M.S. degree in electrical and electronics engineering from Sabanci University, Istanbul, Turkey, in 2015, where he is currently pursuing the Ph.D. degree. He was a Visiting Researcher with The Ohio State University, Columbus, OH, USA. His research interests include mathematical modeling of communication systems, stochastic optimization, and green communication networks. He was a recipient of the Best Paper Award at the 2016 IEEE Wireless Communications and Networking Conference (WCNC).