Pinging

I was wondering if you can tell compression by doing a compression test. Is there a formula.

No, there isn't, and you can't. But - You can tell if whatever cam and whatever compression you have are set up for higher cylinder pressures at low engine speeds, which can cause ping. I've run as high as 185psi on pump super with no quench and iron open chamber heads. But generally you want no more than around 170 to give yourself a little margine of error when you're filling at any old gas station.

It does sound like your timing curve needs to be optomized, and then the carb needs to be tuned. If just dialing back initial "fixed" it, the vacuum advance can be utilized with some attention to the timing curve and carb setup. I always run them if possible.