Many flatwork contractors use finished 2x4 when pouring 4 inch sidewalks (3 1/2 inches, actually). If you don't mind the expense, 4 inches is great and less likely to crack.. I recommend that you use wire mesh and or rebar, use a tool (less than $10) to make your "expansion joints" or whatever they are called in your area. These purposely weaken the concrete at regular intervals so that hopefully if it cracks it will be in these "control joints" (another popular name). All concrete guys I have talked to say concrete will crack it is just a matter of where and when so engineer for it. Another good option and not too constly is to order at least 3500 psi mix AND get the fiber additive. The fibers help reduce cracking and help keep any hair line cracks, hairlines. Keep the job cool, pouring in a cooler part of the day, misting so it never dries out, covering to shade it or whatever. If it is allowed to get too hot it will crack more and not be as strong and crack resistant as it would have been if cured more slowly.
Oh yeah, compact the substrate if it is not already highly compacted and compact the sand too before pouring. A lot of folks don't do any of the things I mentioned and a few probably get away with it. Some folks could play Russian Roulette and not get killed but that doesn't make it a good idea. NOt much cost in doing a better than average job but if you want a higher probability of long term success, ask a knowlegeable concrete guy if any of these things are bad ideas or will weaken your job. Many will say it is overkill and different ones will say different ones of the ideas aren't needed but can't tell you that any of them won't make for a stronger longer lasting result.
Patrick