Here's what we measured, using standard riot guns with improved cylinder bores (mostly 870's with a few Mossbergs - basic four round tubes, 18" barrels, simple bead sights, 12 ga using standard 2 3/4" 00buck rounds..). From the muzzle the shot spread out a one inch per meter from the barrel... At seven meters - a 7" pattern - at 15 meters - a 15" pattern over and over again... All of this was with range officers for the facility where every sworn officer in the Miami area went to qualify or practice during my era (1973 to 1995).
Here's what that means in practical terms - you have to be aiming where you want to hit at close quarters (distances at 15 meters or less (very few homes have rooms that are 15 meters long (roughly, a bit more than 45 feet...). For defensive purposes inside a structure it's a very good idea to actually do a bit of measuring - particularly down hallways and the exact distances from where you'd be in relation to entry points (front door, back door, patio entrance... You get the idea).
Now for the fun part - each shotgun needs to be patterned at known distances with the ammo you intend to use - since the combination of gun and ammo will pattern with individual variations.... For me, I want to do that at 7, 15, and 20 or 25 meters (or yards if you prefer) with basic ammo. Once you have a standard then you can go to Flite Control or similar rounds to see exactly what pattern they provide - if you intend to use them. In my opinion - no need for 3" magnum (high power, flame throwing monster killing rounds - you'll see lots of ads for...) the basic 2 3/4" 00buck round is a fight ender for close quarters work.... What is needed is some actual practice time with whatever ammo you choose - in the actual weapon you'll be relying on - in that one heart-stopping moment. If you'll make sure you can do your part - the basic riot gun will not fail you when it's needed to defend your home.
The only additional advice I ever gave my officers was to aim just a bit low in a combat situation. Most under severe stress will shoot a bit high....