NYC education is pretty much an all or nothing game for kids. If you can afford the $20,000 to $30,000 a year then you can get a good education. Ditto for bright kids who go to the specialized schools -- the ones you mentioned, as well as schools like Performing Arts, Art and Design, Fashion, etc.
However, if the you're an ordinary kid with average grades, etc. then you're pretty much kicked to the curb.
Oddly, the same model holds true for employment.
It's expensive to live in NYC--I assume the salaries are high also so one can afford to live in NYC? or am I just uninformed?