Selectivity of PhD programs varies a lot with the subject (for example Math PhD programs are generally tougher to get into) as well as the school (Harvard PhD's are just as tough to get as Harvard MDs, while at average state universities the PhD programs are a lot easier to get into than the medical schools are).
You can't really compare between MD and PhD admissions at top schools because very different things are stressed - for the PhD they want to see successful self-directed research first and foremost, especially with publications, and stress your standard test scores and GPAs a lot less than MD schools.
So, for example, a 99.9th percentile standard test scorer and 3.95 GPA applicant from HYPSM with lots of shadowing, volunteering, and a couple semesters of lab experience, but no pubs, has a very good shot at a Washington University MD acceptance, and very little chance of a STEM PhD admission to MIT. Apples and oranges.