Do you know what my favorite thing about Deckstats is? The probabilities!
Wait... crap... no... Messed that up.
Moving on, I did the calculation to figure out what the best ratio of lands to spells is, to lower the odds of getting screwed off of either. I did the calculation for both 99 card decks and 60 card decks, and found that the perfect ratio is... 50/50.
Probably... could have figured that out on my own.
The real problem with determining the perfect number of lands is that is comes down to your mana curve, and your preference. I've attached a chart that shows the probabilities for not getting mana screwed. This should help you decide how many lands you want.
The first page is for commander decks, and shows the probability of getting a hand with a certain number of lands in it. So if you want to get a 3 land hand for most of your games, use between 37 and 49 lands. Note that when I say "lands" it could also mean "mana providing permanents", assuming that you'll be able to play whatever mana ramp you draw. Note that this probability excludes mulligans.
The second page is still for commander decks, and give the probability that you'll hit your land drop in a given turn. The third page is the same thing for 60 card decks, but it assumes that you're on the play (and won't draw a card on your first turn).