Maybe so, but a cannon-armed fighter could stand off outside the range of small-calibre defensive weapons on the bombers and still inflict casualties on the bomber formation with impunity.
I'm sorry, but I have to disagree with this heartily.
Against a plane mounting sufficient defensive armament (that is to say, multiple .50 caliber guns, and twin mounts in key locations,) if you and some of your friends try to sit on a bomber's tail at 400 or 500 yards, (which is pushing it, even for a high-velocity cannon,) you're still well in effective range of their tail guns, and they have a much more stable firing platform as well as more ammo. They'll happily hose you down until you cop one in the radiator. Multiply twin tail guns vs. 20 bombers and then things start to get fun.
So this, naturally, leads to the employment of the high-sides attack, or head-on attacks, to minimize your exposure to defensive fire. Given the closing rates involved, long-range benefits of cannons become nil.
Not to mention, ammo loads on most cannon-armed fighters were very limited, so you couldn't afford to hose rounds at long range and hope for hits, and many cannons of the war had very poor ballistics compared to .50 cal (the Japanese early 20mm and the German 30mm cannons, for example,) and a shorter effective range.
As for the effectiveness of self-defending bombers, those citing high casualties of the unescorted groups need to remember what they were attempting- to fly over 2,000 miles of enemy-held territory and bomb their rear-most areas, and then fly back out. To expect unescorted bombers to do this with low casualties is tantamount to expecting them to steamroll over the enemy, and Germany was not a weak or technologically deficient enemy whatsoever. The brutal attrition of the early bombing campaign is what you'd expect from a military fighting a foe of similar capabilities.
In any case, raw loss rates don't help us much because they don't tell us how many bombers were knocked down by flack, which to my memory was more dangerous by far then interceptor fighters.