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)

a1call 2016-09-18 00:13

Varible Salary Function
 
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:

VBCurtis 2016-09-18 00:34

200/hr for 20 hrs is $4000. 100/hr for 40 hrs is $4000.

So, you want to pay someone $200/hr for their first 20 hrs, and then 0/hr for their next 20?

a1call 2016-09-18 00:42

[QUOTE=VBCurtis;442868]200/hr for 20 hrs is $4000. 100/hr for 40 hrs is $4000.

So, you want to pay someone $200/hr for their first 20 hrs, and then 0/hr for their next 20?[/QUOTE]

working 20 hours per week you would make 20x200=$4000
working 40 hours per week you would make 20x200+20x100=$6000
working 30 hours per week you would make 20x200+10*150=$5500

Mini-Geek 2016-09-18 00:42

For hours <= 20: 200 * hours

For 20 < hours <= 40: -2.5 * hours^2 + 297.5 * hours - 950

For 40 < hours: 100 * hours + 2950

[QUOTE=VBCurtis;442868]200/hr for 20 hrs is $4000. 100/hr for 40 hrs is $4000.

So, you want to pay someone $200/hr for their first 20 hrs, and then 0/hr for their next 20?[/QUOTE]

That was my first thought, until I decided he means that the pay for the 40th hour is $100, not that at 40 hours, the pay must be such that the average rate is $100/hr.

My function should match the following table (generated by a python script I wrote):

[CODE]20 4000
21 4195
22 4385
23 4570
24 4750
25 4925
26 5095
27 5260
28 5420
29 5575
30 5725
31 5870
32 6010
33 6145
34 6275
35 6400
36 6520
37 6635
38 6745
39 6850
40 6950
41 7050
42 7150
[/CODE]

VBCurtis 2016-09-18 01:24

[QUOTE=a1call;442869]working 20 hours per week you would make 20x200=$4000
working 40 hours per week you would make 20x200+20x100=$6000
working 30 hours per week you would make 20x200+10*150=$5500[/QUOTE]

Note under your example you're offering $500 for the 31st-40th hours, which is $50/hr.
39 hrs = 4000 + 19*105 = $5995. 40 hrs = 6000. $5 for that 40th hour, eh?

a1call 2016-09-18 01:27

Here is a more complete set:

1 200 -- $200/h
2 400 -- $200/h
3 600 -- $200/h
4 800 -- $200/h
5 1000 -- $200/h
6 1200 -- $200/h
7 1400 -- $200/h
8 1600 -- $200/h
9 1800 -- $200/h
10 2000 -- $200/h
11 2200 -- $200/h
12 2400 -- $200/h
13 2600 -- $200/h
14 2800 -- $200/h
15 3000 -- $200/h
16 3200 -- $200/h
17 3400 -- $200/h
18 3600 -- $200/h
19 3800 -- $200/h
20 4000 -- $200/h
-
21 4000+1x195=4195 -- $199.76/h
22 4000+2x190=4380 -- $199.09/h
23 4000+3*185=4555 -- $198.04/h
24 4000+4*180=4720 -- $196.67/h
25 4000+5x175=4875 -- $195/h
26 4000+6x170=5020 -- $193.08/h
27 4000+7x165=5155 -- $190.93/h
28 4000+8x160=5280 -- $188.57/h
29 4000+9x155=5395 -- $186.03/h
30 4000+10x150=5500 -- $183.33/h
31 4000+11x145=5595 -- $180.48/h
32 4000+12x140=5680 -- $177.50/h
33 4000+13x135=5755 -- $174.39/h
34 4000+14x130=5820 -- $171.76/h
35 4000+15x125=5875 -- $167.86/h
36 4000+16x120=5920 -- $164.44/h
37 4000+17x115=5955 -- $160.95/h
38 4000+18x110=5980 -- $157.37/h
39 4000+19x105=5995 -- $153.72/h
40 4000+20x100=6000 -- $150/h

a1call 2016-09-18 01:39

Post to notify that I added salary per hour in the above post for clarity,

a1call 2016-09-18 02:21

1 Attachment(s)
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.

VBCurtis 2016-09-18 04:42

On the table you just created, look at the additional amount from 21 to 22, 22 to 23, etc. The average pay rate is meaningless- when you've already worked 22 hours, you'd like to know what you'll make for the next hour. Your method decreases the pay for hours already worked- if I've worked 35 hours already, why should the 36th reduce the rate I get for the previous 15 hours? Perhaps you should wiki "marginal revenue" for additional reading.

If you're looking for a simple formula, try 200/hr for the first 20 and some other flat rate for hours above 20. But don't most places encourage more labor per week, rather than less? Your entire concept is the opposite of overtime; the employer is incented to pile on as much work as possible, while the worker gets less and less for doing more and more work. Your 39th hour pays $15, your 40th pays $5, and your 41st would reduce the weekly wage- the worker would pay the employer for working the 41st hour!

a1call 2016-09-18 04:59

[QUOTE=VBCurtis;442878]On the table you just created, look at the additional amount from 21 to 22, 22 to 23, etc. The average pay rate is meaningless- when you've already worked 22 hours, you'd like to know what you'll make for the next hour. Your method decreases the pay for hours already worked- if I've worked 35 hours already, why should the 36th reduce the rate I get for the previous 15 hours? Perhaps you should wiki "marginal revenue" for additional reading.

If you're looking for a simple formula, try 200/hr for the first 20 and some other flat rate for hours above 20. But don't most places encourage more labor per week, rather than less? Your entire concept is the opposite of overtime; the employer is incented to pile on as much work as possible, while the worker gets less and less for doing more and more work. Your 39th hour pays $15, your 40th pays $5, and your 41st would reduce the weekly wage- the worker would pay the employer for working the 41st hour![/QUOTE]

I am actually dealing with a real scenario.
I work under contract with a company and the contract has a fixed hourly rate (say $200 [I wish]) with guaranteed 20 hours of work per week.
Lately the work has been plentiful and I have ended up working near full-time. Now the company is offering me full-time employment at a rate of say $100. I am trying to give a counter offer that would make sense to the company. I would still have my minimum guaranteed salary and would make more if the company needs me at a reduced rate, ending up equal to what they offer me.
The setup would make sense to me and the company.

S485122 2016-09-18 09:21

[QUOTE=a1call;442881]...
the contract has a fixed hourly rate (say $200 [I wish]) with guaranteed 20 hours of work per week.
...
the company is offering me full-time employment at a rate of say $100.[/QUOTE]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

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.

Raman 2016-09-19 15:15

[QUOTE=a1call;442926]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:[/QUOTE]

Dude, you can be trying out with in some
playing out with in some curve games [url=http://wims.unice.fr/wims/wims.cgi?session=VAB52F8BA0.2&+lang=fr&+module=U1%2Falgebra%2Fcoincpoly.en]over[/url] [url=http://wims.unice.fr/wims/wims.cgi?session=VAB52F8BA0.2&+lang=fr&+module=H6%2Fgeometry%2Fcoincfree.en]here[/url] [url=http://wims.unice.fr/wims/wims.cgi?session=VAB52F8BA0.1&+lang=fr&+module=tool%2Fanalysis%2Ffunction.en]by[/url].

How many people over here by does know about WIMS web site page - do mersenne forum over here by? WWW Interactive Multipurpose Server.

Different links does lead out in to do different exercises - web site pages!
[colour="white"]- Sport / game / puzzle - in to over up on.[/color] [colour="white"]- Sport / game / puzzle - in to over up on.[/color]
George Woltman referenced back to me with in 2004 for a calculator, and then mersenne forum for persistent question and then answering e-mails [colour="white"]as like for the reply, a response, an respond, and then correspond over here by corresponse over here by coranswering - correply. Sake purpose process case. that ever which ever a way a way - random = custom - beginning out.[/color]
[colour="white"]- Sport / game / puzzle - in to over up on.[/color] [colour="white"]- Sport / game / puzzle - in to over up on.[/color]

VBCurtis 2016-09-19 20:20

Dammit, stop with the white text!

Raman 2016-09-21 16:14

1 Attachment(s)
[quote=Raman]
(Does do - immediate edits - in between intermediate.)
Nothing but noting that - that ever which ever a way a way - ever to - up on over on to to to.
One post triggers several posts.
Few posts in between on to intermediate on to several posts - up on over up on over to.
Few posts per on to per on to several posts - up on over up on over to.
One single files per on to per on to several posts - up on over up on over to.
On to on to - up on over up on over to.
[/quote]

I do wonder if there could be a mathematical closed / open function to does represent sign(x) function symbolically.

Of the three functions floor(x), round(x-0.5), ceiling(x-1) the latter function is being different from the first two functions.
Of the three functions floor(x+1), round(x+0.5), ceiling(x) the latter function is being different from the first two functions.

One post triggers several posts.
Few posts in between on to intermediate on to several posts - up on over up on over to.
Few posts per on to per on to several posts - up on over up on over to.
One single files per on to per on to several posts - up on over up on over to.
On to on to - up on over up on over to.

New developments. Never ending processes.

And then not enclosing or wrapping with in code tags.

Resources of IIT Madras department computing facility were being of suitable resources for Cunningham table number SNFS candidates - not GNFS iterations tables, aliquot sequences iterations tables candidates numbers prime / composite, sequential not parallel - randomized / deterministic - next iteration cannot be determined without finishing off out up one single iteration prime / composite - candidates iterations tables numbers prime / composite - candidate iterations tables numbers - prime / composite - Coppersmith SNFS - not GNFS - Factorization Factory variant.

Get.

Digest.

Puzzles sub forum - Fun stuff section sub forum had been largely inactive recently.
Private message - limits raised from 1000 to 10000 storage capacity - post counts show arbitrary numbers - images as like attachments are being supported over here by.

Simultaneous posts - time period frame duration - time times know known.
One time posting per day.
One place posting of extraneous stuff thoughts / strikings processes per day.

Not feeling well?
There are being several ways of text obsfucation / obscuring / hiding / are being encapsulating - abstracting - eclipsing - occulting - transitting - [b]showing out up[/b] - text information data stuff.
are being are being available - subject to availability cases - up on over on to to to

My own favourite colour? Guess what? Up down off out.
Well, let me know very well about this thing around - does variably.
think stuff style item step idea

Post editing feature does reveal junk out up do - feature facility faculty staff - feasible fragile fissile fertile.
Draw end line - that ever which ever a way a way - ever.

Incoherent.
Reference - Glossary of Data - Data Under Preparation - Less Important Data - Off Topic Data - Archive of Data.

xilman 2016-09-21 16:50

[QUOTE=VBCurtis;443008]Dammit, stop with the white text![/QUOTE]Your wish is my command.

Raman: I edited your post make to make the whole text visible on this occasion. Th next time you use white text I will delete your entire posting. The time after that you will be banned. Do you understand? We are tired of your infantile games.


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

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