# $X$-positions under graph covers $55$% of the area

I have a graph with only a few data points. I need to identify the min/max $x$ points that cover $55$% of the area (or any other percentage). In the example image below, I would expect the answer to be $1 < x < 3$.

Note, only the values are known and not the function that produces the graph.

The problem comes from a 4x4 matrix, with each cell having a numeric value. I need to find which rows make up the main focus of the matrix. Example outcomes would be to know that the toprow has the highest combined numeric value, or the first two rows together, or the middle two rows. Obviously there needs to be a limit, hence the $55$%.

• Would you like to explain where this question comes from and what actual problem you're trying to solve (such as trying to estimate the number of bricks needed to pave your patio)? People might have helpful ideas that they would never have thought of when looking at the question the way it was first posed here. Jan 31, 2018 at 0:57
• Thanks David. I've updated the question to provide some more context
– Carl
Jan 31, 2018 at 1:00
• OK, that's actually very useful added information. I'd suggest that "combined numeric value" is simply the sum of the numbers in the row (or two rows if you combine two of them)--no integration required, just read them off and add them up. Jan 31, 2018 at 1:05

Since you mentioned integration, I will assume that the function in the question is known and integrable (if not you can use numerical methods like Simpson's Rule or the Trapezium Rule).

Let the function be $f(x)$, with antiderivative $F(x)$

The total area under the graph is $\int_1^4f(x)dx=\left[F(x)\right]_1^4$. You need to find $k$ such that $$\frac{\int_1^kf(x)dx}{\int_1^4f(x)dx}=\frac{\left[F(x)\right]_1^k}{\left[F(x)\right]_1^4}=0.55$$

• Ahh, thanks for this. Only the values are known, not the function. I'll update my question to reflect this.
– Carl
Jan 31, 2018 at 0:46
• No worries. How have you obtained this function as a fit for the values? Jan 31, 2018 at 0:47
• That was just a pretty excel graph. The data is simply a set of x/y points only
– Carl
Jan 31, 2018 at 0:48
• Well, if it was an Excel graph, the computer gives you a curve fit of which line fits the data best. So you could still obtain the function of this (Excel should say what it is), then use the method above. Alternatively, I know for a fact that LoggerPro (a data graphing software) gives you the equation explicitly for a data set Jan 31, 2018 at 0:50
• Thanks. I just used Excel to draw the graph. This will be built into a software application and . I'll do some research on the other rules you've suggested.
– Carl
Jan 31, 2018 at 0:52