Both Sun Tzu and Von Clauseowitz said take the high ground. They would know.
Unless there is some other factor and all other issues equal, defend from the top of the stairs.
I would base it on your gut, your own situation, etc. For me it is an easy decision, but everyone's home is different. If at the top of the stairs at least stay out of sight, so you don't get shot.