On the other hand, most people I know have at least dabbled in learning to code. In this case the cost of quitting is very low and the cost of getting good is reasonably high, so it self-selects for people who excel at it and love it.
That said, if you only compare people with similar aptitudes, my experience is that people with formal training are better.
tl;dr: The most important thing to me is comparing past work, interview and personality. If you have a CS degree with no personal projects, you won't get a job offer. If you don't have a degree but have active projects with good code then I don't care if you have a degree. That said, I have been getting hundreds of applications for every entry level job I post so I can normally find someone who has both.