SRL Archive - Help

Bell curve (gauss function)


CX gamer

2010-07-30 14:23:53

Hi,

Does anyone know the formula for a function of which when the x-axis is a random linear number between left_bound and right_bound, the function for the chance of having an Y-value equals a bell curve AKA gauss function?

In other words, part of an inverted gauss function. It should look like this;

That would be awesomum maximus. Also, with the formula of the previous, I should be able to get this one too;

I'm kinda throwing an attempt to rewrite a core function of SRL. I hope this will work. :)

Cstrike

2010-07-30 14:32:34

Sorry I dont follow :(

Are you trying to get the input of an X value and turn it into a Y value?

If you want an equation for the bottom graph I can get a ton for you if that's what you mean. Sorry if I don't follow. I got woken up 3x last night and I'm so tired :( Maybe this will be of some help though

Cigue

2010-07-30 15:49:21

From: CX gamer
Hi,

Does anyone know the formula for a function of which when the x-axis is a random linear number between left_bound and right_bound, the function for the chance of having an Y-value equals a bell curve AKA gauss function?

In other words, part of an inverted gauss function. It should look like this;

That would be awesomum maximus. Also, with the formula of the previous, I should be able to get this one too;

I'm kinda throwing an attempt to rewrite a core function of SRL. I hope this will work. :)


I don't get the second one, but would the first one be the d/dx of a gaussian formula?


Killerdou

2010-07-30 17:02:17

the second one maybe something like:

ax*e^(bx) with a > 0 and b < 0
I can't help it but it looks A LOT like the phi(r) of the 2p orbital….

Dan Cardin

2010-07-30 17:23:10

isnt the first one just a variant of x^3?

i luffs yeww

2010-07-30 17:27:32


Yes.

CX gamer

2010-07-30 18:29:44

cstrike, I know what you're talking about.. I'm mailman, I need to get up at 4:30, I'm always tired. :(

Cigue, the d/dx of the gaussian formula would look nothing like the function I need. :(
The one I need is when you take a guassian function and invert it (turn it to it's side), and take half of that (since it can only have 1 Y-value for each X-value).

Killerdou, the second one should just be a logaritmic scale applied to the x of a standard normal function (or a guassian function). Your function doesn't share the same shape. :(

Dan Cardin, I wish it was that simple. And I have thought of that too, and I didn't think it would work as it is a very different function. But hence the lack of a better solution, I will be testing a x³ function if it matches the gaussian curve I need. :)

Thank you all for your replies. :D

Nava2

2010-07-30 19:56:24


I started to calculate the inverse, but it appears as though it goes into the complex plane. Which I don't think you really wanted..

Killerdou

2010-07-31 04:38:23

It does have a similar shape(of what you drew) if you choose the right a and b (try plotting a = 100 and b = -10) However… exactly what are you trying to do with this? Making a new random function?

CX gamer

2010-07-31 05:21:51

Thanks Nava for your effort. Yes, I'd favourably stay out of the complex plane.

Killerdou, you have guessed right. I am trying to make a human-like random function, which can be used to improve MMouse. I've figured that a human's mouse movement works in pulses. I have plotted some here, these use 10 ms intervals.
You can see that the initial pulse takes just about the reaction speed of a human to an expected event (200-250 ms), that is why I would need the second graph.
But that was not my main problem, I really need the first one. :P

Thank you for your replies, all. I will be trying out the x³ and your function now. :)

i luffs yeww

2010-07-31 05:31:31

May I ask why exactly you're doing this?

The Claw

2010-07-31 05:36:58

Python would be perfect for this

CX gamer

2010-07-31 05:43:47

From: i luffs yeww
May I ask why exactly you're doing this?

Improving a linear random function to a human-like random.

CX gamer

2010-07-31 06:39:51

Great! Dan Cardin was right! I can use that kind of function to generate a gauss function :D
This graph was generated using 0.2x+0.8*x^5 with 10k values;

Thanks all. :D

Dan Cardin

2010-07-31 08:31:29

i win. The simplest answer is always less wrong!