Asking for a recommendation letter to transfer PhD programs from someone who I want to be my advisor if I don't succeed in transferring
Professors are human too. If you stayed within the current program those professors may doubt your level of interest/motivation since you tried to transfer out. I would suggest that you apply only if you're absolutely sure you want to transfer. 

On another note, anecdotally, computer science graduate programs are quite welcoming of people from different backgrounds. In your case, having a statistics background might make you an attractive candidate for machine learning professors. So I would say apply to a broad range of programs including the top programs, you never know what will happen.