# Fitting a left-skewed curve to data [closed]

I have the following data for x and y-axis inputs. I am trying to fit a left skewed curve (i.e. long right tail) with a steep right peak to this data in R. I am not sure what curve equation to use (the quadratic, or normal don't work). I tried to do splines, but it isn't the fit that I am hoping for. I also looked at a couple of gaussian curves with varying lambda. But I think I am hoping for a curve that fits the contours of a geometric distribution with p = 0.1. I am trying to achieve this in R, and I want to avoid maximum likelihood approach (for now).

xaxis <- c(12,60,200,2,50,7,50,2,0,50,20,4,10,110,18,2,7,1,1,2,7,9,3,3,11,29,30,6,1,2,21,2,11,1,2,1,18,11,6,3,1,8,32,9,4,13,1,4,32,4,5,42,72,32,2,24,1,22,9,11,24,9,182,336,5,144,88,102,8,11,176,5,15,31,140,0,2,9,18,260,140,36,104,8,82,7,50,10,6,104,56,7,13,34,14,23,34,11,46,120,110,21,100,34,110)

yaxis <- c(3.735,3.4,3.65,6.35,5.39,4.214285714,5.07,3.35,0.933333333,4.54,5.22,5.375,5.33,4.43,4.48,6,5.285714286,4.5,1.166666667,5.5,3.5,4.366666667,4,5.3,4.85,4.95,4.135,3.42,2,3.3,5.37,2.025,4.86,3.5,3.75,3,6.31,4.94,6.283333333,3.5,5.5,4.125,5.61,5.444444444,4.85,3.63,4.7,3.5625,5.36,4.0875,6.86,2.63,4.03,3.45,4.375,4.285,6,4.32,5.488888889,5.08,4.9,4.188888889,2.34,3.06,4.25,3.54,3.7,3.3,4.59375,3.16,4.47,2.24,5.4,5.55,1.126666667,3.3,1.175,2.985,4.9,2.41,3.7,2.23,3.785,1.90625,4.015,3.742857143,3.15,4.826666667,4.916666667,3.79,5.03,2.657142857,5.6,4.8,2.79,4.72,3.73,5.63,4.5,3.86,3.44,4.95,3.26,5.45,3.33)


This isn't a full answer but a graph won't fit into a comment.

I can't tell you whether you have

1. a univariate distribution which you are trying to fit (which would make the talk of "distributions" and "skewness" understandable, but why are the data presented in this way?)

or

1. bivariate data, in which case it is clear that you have crowding for low $$x$$, but otherwise it is unclear whether you have anything other than noise.

Here is a graph. The use of a cube root scale is just to try and see what structure you have (and arises because otherwise a logarithmic scale given zeros for $$x$$ would need some kind of fudge).

There is, or should be, some underlying science here in terms of what you have and what can be expected. I can't see that there is good statistical advice possible without that context.

Key questions include expectations about limiting behaviour: how should the curve change or be constant for $$x = 0$$ and large $$x$$? Is $$y$$ necessarily positive? Are there physical (biological, economic, whatever) grounds for a turning point?

The curve you suggest starts at $$(0, 0)$$ but the data do not seem consistent with that limit.

• $6^3 = 216$. Silly of me, but a detail. – Nick Cox Oct 12 '18 at 19:15