I am looking at a formula to calculate the probability that $n$ points are on a straight line between point $1$ and point $n$ in 2d Euclidean space.
If the points are exactly on the line, the probability should be $1$, and I guess if point #$1$ is $(0,0)$ and point $n$ is $(m, m)$ then if the points are on the line $(0,0; 0,m)$ and $(0,m; m,m)$ then the probability would be $0$.
I can calculate the distance to the line between $(0,0)$ and $(m,m)$ but how can I use that as a measure? This would be very dependent on the length of the line and the amount of points.
If somebody could point me in the right direction that would be great :)
Thanks
thanks to fgp I found my answer; when googling collinearity measure I found on wikipedia correlation, which makes perfect sense :)
If the points are on a straight line, the abs(correlation) will be 1 and if there is a large curve between points, it will be close to 0 which is exactly what I was looking for.
Thanks for you help and describing in good way what I was looking for :)