I would say to dig down at least 12 inches, 18 would be safer. Alot would depend on the soil in your yard: is it nice dark toposoil thats easy to dig, or is it hard clay? Go deeper in the soft stuff, maybe not as deep in the hard clay. Remember , whats easier for you to dig will be easier for turtles, too.
Our turtles live outside year round. The pen has a solid barrier around the perimeter which extends a minimum of 12 inches down into the ground (in some places its deeper where there was an existing retaining wall). The pen's above ground barrier is solid wood the first 12 inches up, then fencing for another 2 1/2 ft, for a total fence height of about 3 1/2 ft.
The enclosure is about 25 x 30 ft, with lots of logs and leaf piles to hide under, a small pond with filter, pump, and small fountain, shady spots, sunny spots, etc.,and we have yet to have any escape attempts.
Try checking out Bill's Box Turtles: he's tried different kinds of enclosures over the years (including, most recently, the coreplast).
Err on the side of caution. 
Good luck
Stephanie