Given data:
Days Prices 0 0 1 1000 2 1000 3 1000 4 1600 5 2200 6 2800 7 3400 8 4000 9 4600 10 5200
Price is function of day.
I had my formula but always put negative result when I put 0 or 1 or 2 to the variable of days (days = [0, 1, 2], result is always negative). I've kind a stuck. Can you guide me steps by step to get a formula for my data? Thank you very much.
If you plot the price as a function of the day, you notice taht the curve is composed by three different pieces. Then, as explained by the others answers, the following model represents exactly your data.
$ f(x) = \left\{ \begin{array}{ll} 0 & \textrm{if } x =0\\ 1000 & \textrm{if } x =1 \textrm{ or } x = 2 \textrm{ or } x = 3\\ 600 x - 800 &\textrm {if } x > 3 & \ \end{array} \right. $