#Help with exponential function.

134 messages · Page 1 of 1 (latest)

rich steppe
#

Hey. Recently been trying to figure out ways to increase a set of percentages above its average and decrease percentages below it, with a variable (X) influencing how drastically it changes. With the help of GPT got up to here:

Pi + (Pi - Avg) * X * e^(-λ x PI)

Pi = Specific Percentage
Avg = Avg of all Percentages
X = ∞>0
λ = Rate of exponential change

For the most part it is okay. My main problem atm is trying to figure out what to consistently make λ to make it so the new percentages always still equal to 100% and so no negative numbers are made. As in what formula to make it to ensure it’s always at the right value.

burnt oceanBOT
exotic rain
rich steppe
#

X changes it in a less drastic way.

exotic rain
#

you want two different variables for the same change?

#

also, be specific on what behavior you need out of a specific percentage other than "strays away from the average"

rich steppe
#

Didn’t think of it that way fair. Could be one variable.

Lemme try making a shitty graph drawing for you since I think it’s better than me trying to express it in words lol

exotic rain
#

thats the best way you can use to express it, good job already

rich steppe
exotic rain
#

how many percentages are in the set

rich steppe
#

It will vary. That’s part of where the difficulty is

exotic rain
#

if you have four percentages, two of them going to 0% and two others going to 100% will not allow the percentages to add to 100%

rich steppe
#

Why so?

exotic rain
#

0% + 0% + 60% + 60% > 100%

rich steppe
#

The presumption is the percentages already add to 100%.

exotic rain
exotic rain
rich steppe
exotic rain
#

Im using it right now and it regularly crosses the line

#

what are these adjustments youre doing

#

also Im pretty sure you typoed the Pi + part of that, it should be Avg +

rich steppe
#

I just put -1 to exponent of e and it works 🤷‍♀️

exotic rain
#

that wouldnt work

#

Im looking at ti right now and it just doesnt

exotic rain
# rich steppe

if half the numbers rise to be near 100% and the other half lower to near 0%,
then the first half will add to be bigger than 100% (if it has at least two numbers)

#

your words right now make no sense
show your spreadsheet

#

do you want the numbers to rise to be something like 100%/(how many numbers there are) (which is definitely more plausible)?

rich steppe
#

https://docs.google.com/spreadsheets/d/17h32w3HbHjbinSbKZV8BU5pfCJAiVQarUV3hlGNW-SU/edit?usp=sharing I changed the important parts of the sheet to this one cause other spreadsheet has other important personal stuff on it. All the same equations still there. Made it edit to anyone so you can finangle with it

exotic rain
#

what in the hell

#

you never said the original percentages never added to 100%

#

what are you even intending with these numbers

rich steppe
#

The only ones that matter are the second ones. The first one is irrelevant in context of the problem I have. They’re just embedded into the second set (as in the equations make up the second set) and I was too lazy to copy the second one individually.

exotic rain
#

what is it with you people and never revealing the original problem like its a black site project

#

unless you reveal the original problem, you dont know if youre going down the completely wrong direction with the way youre using these numbers

rich steppe
#

Fair. Fines I’ll shares

#

It’s for stocks. The value (X) is meant to represent personal risk I’m willing to take. It’s supposed to act as a investment spreader, how much money to spread where. The personal risk being putting more stocks into the already higher weighted baskets. Adjust it depending on my situation.

exotic rain
#

also Ive just figured out how your C formula works

#

its just adding a certain amount to each number to space them out more/less than the mean

#

you know this doesnt have any guarantees towards having negatives or being above 100%

#

so it wont work entirely

exotic rain
exotic rain
exotic rain
#

consider it as cutting apart a pie chart

#

by spacing each row to be farther than the mean, the pieces have to either grow or shrink farther than the average area

#

but they each cannot grow to be 100%

#

the best they can do is grow to be the same size as the others

#

since half the pieces are above/below the mean,

#

this will mean that half the pieces will grow to be the same size, and the other half will shrink to nothing

#

if you have 20 rows,

#

each row can only grow as much as 10%

exotic rain
# rich steppe

so as this tends to ∞, youd have:
10% + 10% + 10% + 10% + 10% + 10% + 10% + 10% + 10% + 10%

  • 0% + 0% + 0% + 0% + 0% + 0% + 0% + 0% + 0% + 0%
#

you cant have more than one of them be 100%

exotic rain
#

please change that

exotic rain
rich steppe
exotic rain
#

your solution

#

to not communicating

#

is to communicate less?

rich steppe
#

I’m not very intelligent otherwise I wouldn’t be here lmao

exotic rain
#

if you were, youd still be here

exotic rain
# exotic rain as for getting an exponential formula that can at least get the pieces to tend t...

the graph of your x-axis did not say whether you wanted X or lambda to go to ∞ so I assumed at the time that:

  • lambda is a parameter based on PI thats determined per row
  • X is what is being tended to ∞

not very good progress here, I dont think I can solve this beyond using a computer, theres far too many possible solutions, but there should be one of many valid solutions hidden in there, but I wouldnt know how to find them

#

if you use that formula up above and enforce that the total of the new percentages total(Pi + (Pi - Avg) * X * e^(-lambda * Pi)) = 1, then you dont get any solutions for X or for lambda (this is assuming 1 value for X and 1 value for lambda across all the Pi)

#

this is partly due to that if X is positive, its values can be taken over by lambda anyway, and X cant be negative, so you really only have one variable to solve for

#

now I know nothing about stocks so unfortunately I cant provide more than "your current formulas show no promise" and "my current solutions also show no promise"

#

so here's an alternate idea

exotic rain
exotic rain
#

but you can then try to show this to someone else

#

this time, people arent going to know youre using chatgpt to do math, its not very good with the creative or innovative aspects which we need

#

and also, you get to blame a person instead of blaming a bot that doesnt know how to unstick itself

#

let me make sure I can make it as usable as possible before I drop it in, but here's what I found:

#

not really using the same variables as you are, most likely your intentions with X do not match up with what I thought they are

rich steppe
exotic rain
#

oh I see

#

sigmoid function is an initial first idea, but it wouldnt work for being too hard to work with

#

the one thing its looking for is the sigmoid function's unique shape

#

which partly does what you need (only the asymptote part)

#

it couldve just as easily recommended arctan for example

#

maybe its corpus expects sigmoids to be used more? Idk

rich steppe
#

It recommend using tanh later on to try and limit it between -1 and 1

exotic rain
#

all good suggestions for only limiting something but not making sure results add to 100%

#

oh just so I dont leave you with nothing

#

did you have intentions for X and for lambda, or did chatgpt generate those for you?

rich steppe
#

Lambda chatgpt suggested. Funnily enough I actually did some research on exponential decrease earlier but didn’t think it was the right track. Only for gpt to go back to it.

exotic rain
#

hmm

#

does this risk factor have to be proportional like that?

rich steppe
#

Somewhat so yeah

exotic rain
#

then I dont think what Ive suggested will work very well

#

if the risk factor is like an interest rate, then the lambdas end up being the interest rate here

#

Ill try swapping them

#

I have a feeling maybe just using one variable (risk factor) should be enough to do this

#

theres a naturally exponential solution to this that would space these out nicely

#

I just dont know what it is

rich steppe
exotic rain
#

Ive got a dumb idea, but Ill see if it works before I try it

rich steppe
#

Yeah agree think it could be.

rich steppe
#

Dew it

exotic rain
#

the idea is this:

#

pretend you have a slider that goes from "every row is the same number" to "every row is either the highest it can be or 0%"

#

and it just linearly goes from the left to the right

#

just going to say, stocks definitely shouldnt work like that

#

but it at least vaguely satisfies all your conditions

#

Ill go put it in

rich steppe
#

Honestly that’s vaguely what I was trying to do yeah so go for it

exotic rain
#

if a row is exactly the average, should it remain unchanged the whole time?

rich steppe
#

Yeah. That was my initial thoughts anyways on it

exotic rain
#

btw you should get used to writing down percents as being from 0 to 1

#

so write 50% as 0.5

#

sheets can naturally convert decimals to percents anyways

#

but having 1 be the upper bound instead of 100 mathematically is easier to work with

#

for consistency Im leaving these percents at 100 instead of 100% but remember that for next time

rich steppe
#

Ah. Yeah I’m relatively new to sheet programs in general.

I was wondering why it kept giving me crazy high percentages when I marked it as a percentage lol

exotic rain
#

oh also

#

the idea from before is now X^lambda instead

#

the idea is that if lambda = 0, it will set them to the average

#

if lambda = 1, it will multiply by the risk factor

#

if lambda = 2, it will multiply by the risk factor twice

#

wait

#

thats not what I actually typed in

#

either idea's impractical anyways

exotic rain
#

alr

#

anything else?

rich steppe
#

Noh. Looks useful. Thank you ;3

I’ll try and ask others for help to see if I can do my original idea still. If not will prob use slider.

#

I appreciate your help a lot!

exotic rain
#

np

#

.close