Is there a correlation between the earthquake's magnitude and its depth?

The simple answer is that the largest earthquakes occur at shallower depths in the earth's crust, but smaller earthquakes can and do occur at all depths down to about 700 km (400 mi).

Earthquakes occur in the earth's crust, the topmost layer of the earth, which is typically 7 to 30 km (4 to 18 mi) thick. The crust is the coldest and most brittle part of the earth, and has many fault systems on which earthquakes occur. These earthquakes are caused by the buildup of tectonic stress, and result in frictional sliding on the faults.

Earthquakes also occur in the parts of the tectonic plates that are being pushed down into the earth, called subducting slabs. These slabs are known to penetrate down to depths of 700 km (400 mi) or so. At these depths, the higher temperatures make rock softer. It is not yet understood how frictional sliding can occur there, but earthquakes still occur. An alternative explanation may be that those deep earthquakes are caused by some kind of "phase transition", where the physical structure of the rocks suddenly changes to a different state.

Smaller magnitude earthquakes, those that have magnitudes less than about 7, are known to occur in both the crust and in the subducting slabs. Larger magnitude earthquakes, those having magnitudes up to the largest observed magnitude of 9.5 (1960 Chile earthquake), typically occur within the earth's crust. These large and great earthquakes are associated with frictional sliding on faults, which can only occur at colder temperatures.

What are the chances an earthquake could hit your favorite locations? Make a One-Step Earthquake Forecast here.
To see locations of current major earthquakes, go the Hazards Viewer and click on one of the Earth globes on the right hand side.
Risk Alert