# calculate standard deviation from percentage of mean occuring.

I'm not a math person, although I find it quite interesting. I'm a programmer but I've got a math problem I'm trying to figure out.

Lets assume I'm trying to create a program that will predict at what mile marker a car will run out of gas. I can take the average gas mileage, size of the gas tank, road conditions etc and use those to predict how far I think it will go.

Most trials will be off by a varying amount depending on driving habits, wind, etc and I'm assuming the results will be normally distributed with my predicted value ideally being at the center as the mean. (as long as my program is calibrated correctly).

I can consider my program successful if the car stops at the mile marker I predict 20% of the time or more.

My first question is, how do I figure out the minimum standard deviation necessary to require that the car will stop at my predicted mile marker at least 20% of the time. I'm thinking If I can come up with a standard deviation, I can test sample data against this SD to see if my program is works.

My second question is harder, and probably doesn't seem practical, but this is only an example scenario. Lets say that I'm only interested in finding out what the last number of the mile marker is. So my program would be considered a success if it estimated the car to stop at the correct mile marker (e.g. mile marker 115), but I would also get credit for factors of 10 in either direction (e.g. 105, 135). So I need to know the standard deviation that would allow the total possibility that the car stops at any one of my mile markers to be at least 20%.

Thanks guys, I know the reasoning is vague, esp. the last part, but I have to keep my next killer app a secret!

-Jeff

-
If you're doing this professionally and hoping to strike it rich with a killer app, you ought to hire a mathematical consultant instead of looking for handouts on the internet. – Gerry Myerson Jun 19 '12 at 6:40
Really? So no questions can be asked unless there is no potential for financial gain? I'm mostly joking about making it the next killer app. I build things because I love to program. If I only built things I thought would make me rich, I wouldn't build too many things. This is something I'm doing for fun. Doesn't mean I want to say everything about it or wont try to make it successful. – Jeff Ryan Jun 19 '12 at 6:49
You can ask whatever you want to. I can't stop you. All I'm saying is that if --- and please note that if --- this is something you need for a profit-making enterprise, it's only fair that you pay for it, and that could be done by hiring a mathematical consultant. – Gerry Myerson Jun 19 '12 at 7:27
I'm all for compensating those who help me. I assume that this question is a fairly basic statistical question. I feel bad saying that because I hate it when my clients tell me a website change "should only take a couple minutes", because they are most often wrong and time to complete isn't always a good gauge of how difficult something is - or what its worth. So if the question is too complex to answer for free on a forum, I'm sorry for asking it. – Jeff Ryan Jun 19 '12 at 7:59

$$\Phi^{-1}(0.6) - \Phi^{-1}(0.4) \approx 0.50669$$ so if the distribution is indeed normal then you will not be able to achieve your 20% target of hitting a number rounded to a particular integer if the standard deviation is more than the reciprocal of this i.e. $2$ or above.
Multiply this by $21$ if your target interval is twenty-one times as wide.