North Korea reports that they have again detonated a nuclear weapon of about 10 to 20 kt. The magnitude earthquake created by the blast was initially reported as a 5.3 magnitude earthquake (90kt), but was downgraded to a 4.7 magnitude (11.3 kt). For what it's worth, one kiloton of energy is liberated by a 4.0 magnitude earthquake and the converse, a 1 kiloton underground blast will cause a 4.0 earthquake, is roughly true. To calculate the approximate yield of a blast from the resultant earthquake, you have to remember that each increase of one point of the Richter scale is a 32 fold increase in energy. If a 4.0 earthquake is 1kt, a 5.0 earthquake is 32kt, and so on. The formula for yield is thus the following:
yield(kt) = 32^(eq magnitude - 4.0)
So there you have it.