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

25 Views Asked by At

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$%.

Sample image

1

There are 1 best solutions below

5
On

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$$