Methods and systems are disclosed for estimating a glucose level of a person having diabetes and selecting automatically open-loop and closed-loop control for a connected therapy delivery device. The method may comprise analyzing measured glucose results and corresponding impedance values received from a glucose sensor coupled to the person with a probability analysis tool implemented by a microcontroller to determine a total quality score that is based on the minimum constraint of a probability of glucose sensor accuracy determined measured glucose results and a probability of sensing quality determined from the impedance values. The microcontroller may estimate the glucose level of the person with a recursive filter based on the plurality of measured glucose results weighted with the total quality score and select automatically either open-loop control or closed-loop control for the connected therapy delivery device based on the value of the total quality score.