Average, not median, because a relatively few true palaces drive the average much higher. You still can buy a 2br/1ba house for under 500k if you compromise on the neighborhood.
Compromising on the neighborhood — not a good survival strategy.
Ps: in today’s San Francisco realty listings there are exactly four little shanties available on the market meeting your criteria (500,000$$ 2 beds one bath -—— this in a city of 800,000 people). Almost anything halfway desirable comes in at over a million, at least in areas where there aren’t so many anti- burglar bars on the windows. FYI.