mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Miscellaneous Math (https://www.mersenneforum.org/forumdisplay.php?f=56)
-   -   Varible Salary Function (https://www.mersenneforum.org/showthread.php?t=21585)

Antonio 2016-09-18 09:40

[QUOTE=a1call;442875]I get the following formula for the 21 Hours and up:



I am looking for the simplest general form to actually offer an HR dept. With different actual rates but same concept.
I do not want to overwhelm them by a complicated looking formula.[/QUOTE]

Your formulae is fine (simplifies to 4000 + (200 - 5*h)*h), so long as the contract also stipulates that you [B][U]shall not [/U][/B]work more than 40 hours per week under these terms, or that the rate above 40hrs returns to $200/hr (overtime rate).

Dubslow 2016-09-18 10:14

1 Attachment(s)
Lets use some basic calculus. You want the marginal value of your time to vary from $200/hr at 20 hours linearly down to $100/hr at 40 hours.

In other words, if $(h) is the pay as a function of hours worked, then you want to define it based on the following parameters:

d$/dh (0) = d$/dh (20) = 200
d$/dh (40) = 100

With linear variance in $ over the 20-40 range. This means that d$/dh is constant, with the slope being (100-200)/(40-20) = -5.



So you want to use this function:

[$$]\frac{d$}{dh} =
\left\{
\begin{array}{ll}
200 & \mbox{if } 0 \leq h \leq 20 \\
200 - 5(h-20) = 300 - 5h & \mbox{if } 20 \lt h \leq 40
\end{array}
\right.[/$$]

Trivial integration (with the constant such that $(20) = 4000) reveals $(h):

[$$]$(h) =
\left\{
\begin{array}{ll}
200h & \mbox{if } 0 \leq h \leq 20 \\
300h - \frac{5}{2}h^2 - 1000 & \mbox{if } 20 \lt h \leq 40
\end{array}
\right.[/$$]

(Confession: I did this wrong the first time.)

Working 40 hours under this structure would be $7000 (quite a lot!).

The graph is quite boring. Just a parabola moving smoothly from $200/hr to $100/hr. (Making the graph took longer than the rest of this post, mostly because I'm on my laptop and didn't have the correct software installed like on my desktop. It took a few tries to get it right.)

[code]In [1]: In [1]: from matplotlib import pyplot as plt
...:
...: In [2]: import numpy as np
...:
...: In [3]: g = lambda x: -5/2*x**2 + 300*x - 1000
...:
...: In [4]: def f(x):
...: ...: if 0 <= x <= 20:
...: ...: return 200*x
...: ...: elif 20 < x <= 40:
...: ...: return g(x)
...: ...:
...: ...: else:
...: ...: raise ValueError("{} is out of range".format(x))
...: ...:
...:
...: In [5]: x = np.linspace(0, 40, 100)
...:
...: In [6]: y = np.array([f(i) for i in x])
...:
...: In [7]: plt.plot(x, y)
[/code]

Dubslow 2016-09-18 10:45

1 Attachment(s)
You can drop the total from $7K to $6K by making the final marginal pay 0. (That is, d$/dh (40) = 0.)

Then d$/dh over the second interval is 400-10h, which integrates to (again setting $(20) = 4000) $(h) = -5h^2 + 400h - 2000, which we can verify meets $(20) = 4000 and $(40) = 6000.

That's of course what VBCurtis means by your pay going below 0 if you take that linear decrease and continue running with it.

This plot is somewhat more interesting because it disappears to exactly flat at the top right corner.

[code]In [1]: In [1]: from matplotlib import pyplot as plt
...:
...: In [2]: import numpy as np
...:
...: In [3]: g = lambda x: -5 * x**2 + 400*x - 2000
...:
...: In [4]: def f(x):
...: ...: if 0 <= x <= 20:
...: ...: return 200*x
...: ...: elif 20 < x <= 40:
...: ...: return g(x)
...: ...:
...: ...: else:
...: ...: raise ValueError("{} is out of range".format(x))
...: ...:
...:
...: In [5]: x = np.linspace(0, 40, 100)
...:
...: In [6]: y = np.array([f(i) for i in x])
...:
...: In [7]: plt.plot(x, y)[/code]

Raman 2016-09-18 18:51

[QUOTE=a1call;442867]Hi,

I would like to come up with [U][B]a[/B][/U] simplified function not (a computer code) to determine a variable salary according to the following rules.

* If work hours are 20 hours or less, the salary will be $200 per hour

* If work hours are between 20 hours to 40 hours per week the salary will be a variable amount starting at $200/h for 20-hours/week and linearly decreasing to $100/h for 40-hours/week

Thanks in advance.:smile:[/QUOTE]

[TEX]f(x) = 200x - \frac{5}{2}(sign(x-20)+1)(x-20)^2[/TEX]

[code]
Just for filling space out up out up.
By heart things out up. Reproduce things out up.
To need to care about appearence.
Irrelevant material inside code tags. Junk material inside attachments.
To need to care about relevance of material rather than instead of post length size - short long lengthy.
To trying out to conserve post counts ratios.
Better not to get involved some how any way rather than instead of giving away some how junk replies any way.
How about posting all of my opinions over here, rather than in their appropriate threads?
[/code]

a1call 2016-09-18 20:43

[QUOTE=S485122;442889]There is a problem with the figures you give : at the moment you get 20 * 200 = 4000 a week plus some more if you work longer hours...
Their proposition is 4000 for a 40 hour week, meaning 100 per hour. There is no increase for all the hours between 20 and 40.

The only point in that new proposition is that they guarantee 40 hours. Is that security enough for accepting the reduction in rate.

Or is it that you would become an employee instead of a contractor ? In that case you have to weight the (dis-)advantages of that change (perhaps security, health-care, retirement fund, other perks...

Jacob[/QUOTE]

The figures were changed to protect the Innocent.:smile:
But yes becoming an employee rather than a contractor at a significant hourly reduced rate. I figure with my counter offer I will stay a contractor at as about a good rate near 20 hours and at worst, better than an employee on near 40 hours weeks. This should make sense to the company as well since they would generally end up paying me less than an employee and all their tasks would be accomplished. This might seem odd, but I value my me time and prefer better hourly rate over higher monthly salary, working 11 hours (transportation, lunch) daily, for the foreseeable future.

a1call 2016-09-18 20:47

[QUOTE=Antonio;442890]Your formulae is fine (simplifies to 4000 + (200 - 5*h)*h), so long as the contract also stipulates that you [B][U]shall not [/U][/B]work more than 40 hours per week under these terms, or that the rate above 40hrs returns to $200/hr (overtime rate).[/QUOTE]

Yes, That is an important stipulation. Thank you. It should be charged at time and a half at over 40 hours per week or so. $150/hour constant rate.

a1call 2016-09-18 20:51

Thank you [B]Dubslow[/B] for the formulas and the graphs.

I will propose your formula if the HR feels confused with the linear formula.
Much appreciated.

a1call 2016-09-18 20:54

Thank you [B]Raman[/B],
Let's hope that I can stay a contractor, in which case I will have the time to digest your post regarding the LLR test.:smile:

Batalov 2016-09-18 21:36

[QUOTE=a1call;442923]...But yes becoming an employee rather than a contractor at a significant hourly reduced rate. [/QUOTE]
Contractor pays his/her own soc.security tax doubled, pays for their own medical insurance, loses all implied benefits (paid vacation, paid sick time, LTD, 401k/403b, etc etc). That's why contractor's hourly rate is (much) higher. One can't expect to convert to employee at the same rate - ...or maybe the employer can't count their money? (I don't think so.)

Also, don't expect to get HR impressed by a fancy formula :-) Most likely they will ask that you put it back into understandable words.

Dubslow 2016-09-18 21:39

[QUOTE=Batalov;442930]

Also, don't expect to get HR impressed by a fancy formula :-) Most likely they will ask that you put it back into understandable words.[/QUOTE]

A picture is a thousand words... that's why I bothered with the graphs :)

a1call 2016-09-18 22:23

[QUOTE=Batalov;442930]Contractor pays his/her own soc.security tax doubled, pays for their own medical insurance, loses all implied benefits (paid vacation, paid sick time, LTD, 401k/403b, etc etc). That's why contractor's hourly rate is (much) higher. One can't expect to convert to employee at the same rate - ...or maybe the employer can't count their money? (I don't think so.)

Also, don't expect to get HR impressed by a fancy formula :-) Most likely they will ask that you put it back into understandable words.[/QUOTE]
That is all true. I have worked as an employee in this company before and personally don't think the "Benefits" are worthwhile in my case. In Canada, medicare is free to all and is not work related. Medicare lacks dental coverage, but the work group insurances also generally do not cover the full cost of expensive dental procedures. There are unemployment deductions and benefits, but as a contractor you have tax deductions for gas and car depreciation and the likes which you don't have as an employee. Overall having tried both, I prefer the contractor status.

I have prepared an excel sheet with graphs for comparing employment vs fixed rate contractor vs variable rate contractor payouts applied to past few months actual work hours. It clearly shows that the company has payed overall less than they would have paid if I was an employee and obviously would have paid even less with the proposed variable rate contract.
If logic prevails then they should see things my way.


All times are UTC. The time now is 14:52.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.