Environmental Variation
If the extra-leg deformity in your frogs is caused by worms, the underlying model of frog development works like this:
When the variation in leg number is environmental, individuals that get infected with worms as tadpoles grow five legs. All other individuals grow four legs.
The difference between ponds in the frequency of five legs is due to the fact that one of the ponds harbors more worms.