1
$\begingroup$

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

$\endgroup$
3
  • $\begingroup$ 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. $\endgroup$
    – David K
    Jan 31, 2018 at 0:57
  • $\begingroup$ Thanks David. I've updated the question to provide some more context $\endgroup$
    – Carl
    Jan 31, 2018 at 1:00
  • 1
    $\begingroup$ 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. $\endgroup$
    – David K
    Jan 31, 2018 at 1:05

1 Answer 1

1
$\begingroup$

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

$\endgroup$
5
  • $\begingroup$ Ahh, thanks for this. Only the values are known, not the function. I'll update my question to reflect this. $\endgroup$
    – Carl
    Jan 31, 2018 at 0:46
  • $\begingroup$ No worries. How have you obtained this function as a fit for the values? $\endgroup$
    – Harry Alli
    Jan 31, 2018 at 0:47
  • $\begingroup$ That was just a pretty excel graph. The data is simply a set of x/y points only $\endgroup$
    – Carl
    Jan 31, 2018 at 0:48
  • $\begingroup$ 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 $\endgroup$
    – Harry Alli
    Jan 31, 2018 at 0:50
  • $\begingroup$ 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. $\endgroup$
    – Carl
    Jan 31, 2018 at 0:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .