I agree with most everything that has been said so far. You may not be dealing with someone that is logical, rational, or sober. So the fact of just a small rifle being present might not and probably would not be much of a deterrent especially on drugs.
Although I have a Marlin 917V 17 HMR with scope and love to shoot the little rifle! It is accurate and a fast little round! But I would not recommend it as a home defense gun. As was stated nothing better for the money for defense than the old reliable Shotgun. For example if they would not be deterred by the "racking of the slide" the impact on their body would get the point across if they lived to realize it. Actually better than a handgun in a lot of ways. And the selection of good defense loads is almost unlimited. So if you are going to buy a gun on the pretense of self defense I would not suggest the 17 HMR for that specific purpose.
The Constitution is not an instrument for the Government to restrain the people. It is an instrument for the people to restrain the Government!
Today, we need a nation of Minutemen, citizens who are not only prepared to take arms, but citizens who regard the preservation of freedom as the basic purpose of their daily life and who are willing to consciously work and sacrifice for that freedom."
-- John F. Kennedy