I was thinking more along the lines of what causes AI cities to flip to me ... the reverse has very rarely occurred for me. But I suppose the formula works either direction?
Yes.
I don't know the civ-wide culture for Korea (or how to find it, apart from investigating all their cities), so I'm not sure how to use this formula - unless I missed that it's just about civ-culture points for the city alone (which is 100% me, 0% Korea).
It is the total culture. You could get to this figure, but you actually donnot need to know the value. For the formula you only need the ratio and a look at the culture graph will get you an idea. If you need precise facts make screnshot and count the pixels, but i really doubt you need best precision available.
In this particular case, it was a city of 12 that unexpectedly flipped to me. It had no buildings - i.e., no culture - and currently I have a Temple (not ToA), Library, Colosseum, other non-culture buildings, and am working on Cathedral. 11 happy, 1 content, all Korean (I'm Netherlands).
Please be aware that a flip destroys all culture buildings except world wonders. So culture production ceases upon flip, but foreign culture may be higher than zero.
Anyway, I'm interested in understanding how it flipped to me in the first place (I've not yet been to war with anyone), and how to prevent a return flip.
Mostly it means that a rare chance came true. Chances are very low.
I donnot have your facts available, so i will need to speculate a lot.
Say before the flip there were zero citizens of your nationality, but you controlled 3 tiles within the fatcross of the foreign city. That means F+T=3. You had no culture in this city, so Cc=1. Unless there was disorder in the city H=1. If your culture was 3 times as big, than Cte/Cty = 3. If there were 2 units defending the city, than G=2. If the city was twice as far away from their capital than yours, than D=1000.
This leaves P =(3x1x1x3-2)/1000=0.7%. That is an unusually high chance, lower chances are more likely.
Now the city is yours. F=12. Say no tiles in the fatcross are are under korean control, than F+T=12. According to your facts Cc=1. Due to 11 happy + 1 content citizens you have the WLTKD, thus H=0.5. Cte/Cty = 1/3 and D=4000 because facts need to stay the same as before. For educational purposes i assume G=0.
This leaves P =(12x1x0.5/3-G)/4000=(2-0)/4000=0.05%. This chance would be very small due to the many assumptions in your favour.
Please note that by increasing G to 2 chances will be zero. That will safely prevent a flip. But lose the WLTKD and you need G=4 instead. And if Cte/Cty = 1, than you need G=12. So pending many details you cannot have enough units in the city to safely prevent a flip.
If you cannot safely prevent it, than you should not even try because a flip will destroy all your units in the city.