Adding Tails to Curve with a set Intercept, Area, and Weighted Integral

70 Views Asked by At

I have a roughly normal distribution curve with the tails chopped off. It looks like this:

enter image description here

I am trying to add tails to this curve (and others like it), but they have to meet some specific conditions

  1. It has to intersect the points at the end points. In this case left: (4780,.015) and right: (4805,.01)
  2. The sum of the area under the new curve (integral) has to add up to 1.0. So if the curve I have has an area of .9, the area of the left tail and right tail need to add up to .1. Could be .5 and .5, or .3 and .7, as long as it adds up.
  3. The weighted area under the curve (weighted integral) needs to add up to a number that I set. By weighted area under the curve what I mean is the integral that is multiplied by the x value at each slice being integrated. So two curves might have the same integral, but very different weighted integrals if they have different x values. Large x values under large y values also have a disproportionate skew on the weighted area because they multiply.

It also needs to be something like a normal distribution type tail of course.

This is something like how I would want the function call to look:

tail1,tail2 = add_tails(lower_intercept=[4780,.015],
                    upper_intercept=[4805,.01],
                    integral=.1,
                    weighted_integral=4800)

Unfortunately, this needs to run quickly and efficiently, so methods that rely on time consuming searches aren't really practical for me. I'm really not sure this is possible, but I was hoping if it is someone here might know something about it.

0

There are 0 best solutions below