0
$\begingroup$

I'd like to derive an equation that enables me to calculate y based on x.

I'm having troubles figuring out how to do this as my data doesn't form a line/curve, but rather creates an edge (image below).

My background in statistics is a second year university level course.

Example Data - How best to model

Edit: Thank you for the comments. I created the following log-log graph, which allowed me to generate a trend line: $\text{log}_{10}y = -m*\text{log}_{10}x+k$. The data is from a survey. I'm plotting the acceptable error margin on the y-axis and the population size on the x-axis.

log-log graph of data

$\endgroup$
  • 2
    $\begingroup$ What is your goal to estimate the area under the curve at some x value or to describe the relationship between x and y? $\endgroup$ – RAND Aug 17 '19 at 3:40
  • 4
    $\begingroup$ It would help to use an effective graphic. This one is ineffective--and potentially deceiving--because the cloud of points does not reveal crucial information about where the individual points lie and in what amounts. You need a better visualization tool to display these points, one that can use (say) smaller point symbols, partial transparency, or methods to represent their spatial densities (hexagon plots, sunflower plots, etc.). It would also help us to know what the x and y points are showing and their units of measurement. $\endgroup$ – whuber Aug 17 '19 at 14:34
  • 3
    $\begingroup$ To me the question seems clear. The OP is used to relationships that follow a line (with some additional scatter), but now he/she is confronted with data points that fill an entire surface instead of a line and he wonders whether there are ways to express such types of data. (I agree that it is broad and unclear what direction the solution needs to be going for the specific case. But, the key point seems to me mostly that the OP is wondering about the principle in general that the data is not close to a line, but instead filling an entire area.) $\endgroup$ – Sextus Empiricus Aug 17 '19 at 15:12
  • 4
    $\begingroup$ @elliotdelaunay you would make it a lot easier to answer this question and understand the problem when you explain the context of the problem. The scatter in a surface rather than around a line can be caused in many different ways. it is difficult to explain all of them and it will be much easier to explain the situation when your specific case is clear. So while your question is clear, your use-case is not. (e.g. just for a start, what do the x-axis and y-axis represent?). $\endgroup$ – Sextus Empiricus Aug 17 '19 at 15:18
  • 3
    $\begingroup$ also, I imagine it might be good to plot the data on a log-log plot, instead of linear. In addition, you could use a smaller point size or make the colour of the points slightly transparent such that the density distribution of the points is easier to observe. $\endgroup$ – Sextus Empiricus Aug 17 '19 at 15:21
1
$\begingroup$

I extracted the data points from the visible edge of the scatterplot, and divided the "x" values by 1000 to scale the large values (ignoring what looks like a outlier in the center of the scatterplot). I then performed an equation search for equations with three or less parameters using this "x-scaled" extracted data. A good candidate equation for the (scaled) data along the edge seems to be a Standard Power equation, "y = a * pow(x, b)", with parameters a = 2.6628285636974988E+03 and b = -1.9397277551822167E+00 yielding R-squared = 0.940 and RMSE = 0.641. This should be a near approximation to the true edge, and this equation has the advantage of having only two parameters.

plot

$\endgroup$
  • 2
    $\begingroup$ The relationship defined by the upper edge may not describe the central relationship at all. e.g. take slightly correlated standard normals and exponentiate both variables. The upper edge of the relationship looks roughly similar to this, but the overall correlation will be positive! $\endgroup$ – Glen_b -Reinstate Monica Aug 19 '19 at 0:00
  • 1
    $\begingroup$ @Glen_b I will quote from the question: "but rather creates an edge". I don't know whether or not the OP is looking for a description of the central relationship, but I can read that they mention an edge. That said, I agree with you. $\endgroup$ – James Phillips Aug 19 '19 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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