0

First time here, so I hope you'll not get too frustrated if I make any etiquette mistakes for this forum. So here's my question.

I know there are snow day calculators out there, but I'm trying to create my own for an application I'm building for my kids. I have the data, and I know how I'd like to calculate it, but I'd like to see if you all can help me create a math formula to calculate it.

Currently I'm just using accumulation to start. Here's an estimate my wife and I put together for snow days here.

  • 1" : 5% chance snow day
  • 2" : 6%
  • 3" : 10%
  • 5" : 40%
  • 7" : 80%

At first I thought I could just run with a fibonacci series... but I dont think it ramps up correctly.

Can anyone point out how I can find this formula out?

  • What does $1"$ mean? – Asinomás Jan 18 '16 at 04:19
  • 3
    @dREaM An archaic unit of measurement equal to 2.54 cm. –  Jan 18 '16 at 04:23
  • @dREaM presumably 1 inch of snowfall correlates to a .05 chance of it being a snow day. @ OP It seems as though you are trying to find a model for the chance that given a certain amount of snowfall, that it will in fact be a snow day. There is no reason to believe that it would be linear (in fact, how could it be, what would the chance of a snow day given a foot of snow by your "pattern"? Over 100 percent? Impossible). You might try to find a linear regression given your data, or perhaps a logarithmic regression. No curve will perfectly fit it though. – JMoravitz Jan 18 '16 at 04:24
  • Oh ok, so we are going to try to predict whether it is going to snow by looking at how much it has snowed during previous days right? I guess that makes sense, although it is clear it is going to be error prone (although it may give a rough estimate) – Asinomás Jan 18 '16 at 04:26
  • This doesn't make much sense to me, but that's probably because I live in a (relatively) snowfree country. Do you mean that for example $80$% of days have up to $7$" snow? – David Jan 18 '16 at 04:28
  • I expect it is quite the opposite @David. Rather, I expect that it means that if the snowfall on a given day happens to be 7 inches, that there is an 80% chance of school closure – JMoravitz Jan 18 '16 at 04:29
  • @JMoravitz So the OP is looking for an estimate of a probability as a function of snow depth? – David Jan 18 '16 at 04:30
  • Im sorry I appear to have not provided all the necessary data....

    So the schools will sometimes cancel school days based on snow fall

    What I'm trying to calculate is a % probability that school will be cancelled.... The more inches of snow in the forecast, the higher probability it will be a snow day.

    The problem I'm having with this, is that there is a definite curve once you get to the 3 inches of snow and higher... because < 3 inches of snow, its very unlikely the kids will get a school day off for snow. > 3 inches, it begins to dramatically increase...

    – Dev Fellow Jan 18 '16 at 04:54
  • @dREaM its 1 inch... sorry... damn Americans ;) – Dev Fellow Jan 18 '16 at 04:58
  • Wait what? Snow day means there is no school that day? I thought it meant it would snow that day. – Asinomás Jan 18 '16 at 05:46
  • 1
    @dREaM oxforddictionaries.com: A day on which a school or other institution is closed due to heavy snowfall or other extreme winter weather. See also any other from google search. – JMoravitz Jan 18 '16 at 05:50
  • Oh wow, there is so much I don't know. – Asinomás Jan 18 '16 at 05:51

1 Answers1

0

Hint: Looks like you have a 5-point data set, and you need to fit a curve to it. The curve should be the graph of a function $f:[0,\infty]\to [0,1]$, the probability of a snow day as a function of snow accumulation.

So pick a family of functions and fit the curve. Can you think of (say) a 2-parameter sigmoidal curve that might do the trick?

There is of course no single correct answer.

MPW
  • 43,638
  • Pardon my ignorance, but im not sure what you mean by pick a family of function to fit the curve. Not sure what a sigmoid is either.

    Im clearly an absolute novice with this. Thanks for your patience

    – Dev Fellow Jan 18 '16 at 04:57
  • Your function should increase from $0$ to $1$ (probability) as the accumulation ranges from $0$ to $\infty$. That suggests it is an S-shaped curve (that's a sigmoid). So, for example, try modeling the curve as $y= \frac12+\frac12\tanh(Ax+B)$. You must then find values for $A$ and $B$ that make the curve best fit the data you have. – MPW Jan 18 '16 at 05:45
  • Note: in my previous comment, I selected the vertical scale and shift to match the overall range. Now you have to choose the horizontal scale and shift to make the graph appropriate for the data points you know. – MPW Jan 18 '16 at 05:46
  • @jtmack additional reading on the topic: logistic function and logistic regression from wikipedia. – JMoravitz Jan 18 '16 at 05:54
  • @MPW Thank you!! Youre a genius! – Dev Fellow Jan 18 '16 at 06:08