I have browsed extensively on academia.se and generally understand from similar questions (e.g. Doing bad in undergraduate but good in a masters program and How does the admissions process work for Ph.D. programs in the US, particularly for weak or borderline students?) that Ph.D. admissions committees care most about an applicant's most recent performance.
Is this still true even if the poor undergraduate grades were at a highly ranked university, and the good masters grades were at a much less competitive program?
I am interested in applying to top statistics PhD programs, but I have very poor undergraduate grades (2.8 GPA, 3.3 major GPA in math/stats) from a top 15 department. My grades in the masters program are good (>3.9 GPA), but at a state university that is not so highly ranked.
If the grades from the less competitive masters aren't enough to overcome the poor undergraduate grades, is the quality of my masters thesis likely to help me secure admissions to a top PhD program? What about a strong but not top 10-15? There are faculty doing high quality research here that may be able to supervise my thesis.
Edit: This is not a duplicate of the linked question, while that question has great answers it does not specifically address my situation, namely I am working on a master's thesis and have a particular pattern of grades. Also difference between quality of undergrad and current institution.