2
$\begingroup$

I am interested in a measurement or index that will tell me if a curve is more convex or concave versus a straight line.

This curve is sampled in n points and I know the x and y coordinates of these points.

The straight line I am comparing this curve with is a line that goes through the first and last point of the curve. Let's suppose that the straight line is oriented bottom left to top right with a certain angle and if the curve is on the left side of the straight line or north of it (top) then it is convex and if it is on the right side or south (bottom) it is concave.

If this curve never intersects the straight line – then I can imagine a way to maybe deal with this problem, but if it intersects the straight line then... I am at a loss. Any suggestions will be very much appreciated.

$\endgroup$

2 Answers 2

1
$\begingroup$

How about using the signed area between the straight line and the curve? That is, treating the area as positive when the curve is above the line, and negative when it is below.

You could compute that using the trapezium rule by subtracting the area of the big trapezium, formed by the single straight line whose top is line through the first and last points, from the sum of the areas of the tall thin trapeziums formed whose tops are formed by joining up all the points with straight lines.

$\endgroup$
0
$\begingroup$

Yes, I agree, sounds like you could use a ROC curve/AUC approach (sounds a lot like what you're describing, actually). Plenty of info on ROC curves here. You could use the ROCR R package and there are also some SAS macros at http://www2.sas.com/proceedings/sugi27/p226-27.pdf. Analyse-It has a commercial package as well.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.