There's no such thing as too much useful stuff, and this is definitely useful. You don't say "this formula proves I'm right" anyway - all you need to tell this idiot that sooner or later you would have gotten that "OMG FREEZE".
Personally I'd prefer to let the idiot stew in his own ignorance. This is the kind of thing I don;t feel needs a mathematical formula to go with it. If you use Fire Blast over Flamethrower you are making the assumption that the power will serve you better in a clutch situation than the accuracy, landing you a much needed KO.
Moreover this formula, as its assumptions state, is only useful for 3HKOs on wall switchins where any additional affect or crit is meaningful. Most of the time its irrelevant though.
Really, there's nothing this tells us that hasn't been common competitive knowledge since RBY. In fact, this was even more exaggerated in RBY since Freeze was essentially equivalent to a KOd pokemon, and CH's were tied to speed.
Maybe I'm just not getting it, but a switch rate of 11 or 5 isn't meaningful at all to me. The liklihood I'm going to switch anything into a 3HKO rather than sacrifice something to bring my wall in unharmed late game is minimal. If I do switch in, I usually want either A: impunity, or B: I'm essentially trying to create a stall war, where this formula is rendered meaningless.
I fail to see how it isn't simpler to just say:
Switch Rate = )ceil(100/Damage %)
Ex: Switch Rate = (ceil)100/40 = 2.5 = 3. That's your baseline.
Since Crits do double damage (4x with Sniper), if you want how many times you could switch into a crit, just divide by 2. If your number is 2 or less, You probably shouldn't switch in. Since Crits are statistically certain to happen after either 16(normal) or 8 turns (high CH), just subtract your initial (unrounded) number.
Switch Rate = ceil(100/Damage %) - ((100/((Damage%)(2)))/Turns to Crit Certainty.
Switch Rate = ceil(100/40 = 2.5) - ((100/80 = 1.25) 1.25/16 = .078. Switchrate = 2.5-0.078 = 2.42 = 3.
In other words, you're still statistically likely to be able to switch in 3 times on a normal hit. If it were something like Cross Chop you'd still end up with 3 in this instance, but the true value would be 2.34 times, not 2.42.
To adjust for leftovers, subtract 8 from the damage percent, subtract 12 for Poison Heal, Dry Skin, and Ice Body. For burn and normal poison, add 12, for toxic add 6. For SR and Spikes add appropriately.
You could even add in accuracy by multiplying your Base Damage number by that accuracy.
In other words:
Switch Rate = ceil(100/((Base Damage% * 1-MA) + (F + S) - (I + A)) - ((Base Damage% * 1-Acc)(CHM)/TtCC)
This reads:
Switch Rate is equal to the ceiling of 100 divided by the sum of base damage percent multiplied by 1 minus Move Accuracy plus additional field effects(Spikes, SR, Sandstorm), status(toxic, burn), and abilitity damage(Dry Skin in Sun) minus item(Lefties/Black Sludge) and ability recovery(Ice Body, Rain Dish). Then subtract the sum of Base Damage multiplied by 1 - move accuracy multiplied by critical hit multiplier (usually 2, 4 for sniper), which is then divided by the Turns to Critical Certaintly.
Ex: Spiritomb with Leftovers switches into a Weavile Night Slash that does 42% Base Damage. Stealth Rock is out.
Switch Rate = ceil(100/((42%+12%-6%)*1) - ((100/80%)*1)/8
Switch Rate = ceil(100/48 - 0.16
Switch Rate = ceil(2.08 - 0.16
Switch Rate = ceil(1.92. = 2.
Summary: Only do this once folks.
Freeze is a nuisance to account for primarily because it isn't a damaging effect. What I would do in that case is since you're usually going to be frosted over for 2 or 3 turns minimum, subtract that amount from the end value. If the answer is less than zero or one, be advised you're taking a huge risk.
I love you guys, but [log] isn't my specialty. Give me addition, subtraction, multiplication, and division plox. When I solve for something, I prefer to have the thing I'm solving for as one concrete value on the left side of an equivalency.