Pistol caliber carbine, especially if there's a specific and credible threat. And don't over complicate it. Realistically assess their ability to use a light and if they'll maintain an optic. For in the house and for a low skilled user who's unlikely to train, a laser may be a better answer as it's quite intuitive. If the person has compromised vision as well, consider what they can best see under a variety of lighting conditions.
If the individual has no credible threat, doesn't have drug fueled violence issues in the neighborhood, etc. then whatever goes bang will most likely work. Most random home invasions begin as burglaries where the suspect didn't realize someone was home. A layered security system is the first step to preventing that. A gun is another layer, but has little preventative value compared to a visibly posted alarm, cameras, indications someone is home, answering but not opening the door to strangers, etc.