Mean distance between points of 2D array

  • Context: Undergrad 
  • Thread starter Thread starter cosmik debris
  • Start date Start date
  • Tags Tags
    2d Array Mean Points
Click For Summary

Discussion Overview

The discussion revolves around finding a formula for the mean distance between points in an N x N array, with a particular focus on the median distance rather than the mean. Participants explore various approaches to calculating these distances and the implications of different configurations of points.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks a formula for the mean distance between points in an N x N array, noting the prevalence of short distances and fewer long ones.
  • Another participant suggests calculating the mean distance by finding distances for every pair of points, summing them, and dividing by the number of pairs.
  • A clarification is made that the original inquiry was about the median distance, not the mean.
  • It is noted that to find the median, distances must be ranked, and there is no straightforward equation for this.
  • A participant calculates the number of distances and suggests that the median distance would be near N²(N²-1)/4, which is always an integer, indicating potential averaging between two values.
  • Further exploration reveals that for large N, the median distance from a corner point to all other points approaches √(2N/π), while from a central point it approaches √(N/2π).
  • Another participant mentions a closed form solution for a related continuous case, providing insights into a massive MIMO investigation comparing linear and square antenna arrays.

Areas of Agreement / Disagreement

Participants express differing views on the approach to calculating distances, with some focusing on the mean and others on the median. There is no consensus on a definitive formula or method for determining the median distance.

Contextual Notes

The discussion includes assumptions about the distribution of distances and the implications of different configurations of points, which remain unresolved.

cosmik debris
Messages
734
Reaction score
172
Say I have an N X N array of points, I would like a formula to give the mean distance between the points. There are lots of short distances but only two long ones (diagonal). There are plenty of algorithms to do this but I would like to work out a formula if there is one. Can someone point me in the right direction?

Thanks
 
Mathematics news on Phys.org
You know how to find the distance between any two points right?
To get the mean distance, find the distances for every possible pair of points, add them up, and divide by the number of pairs.
 
Yeah I know how to calculate the distances, and I meant median not mean.
 
I that case you need to also rank the distances.
To my knowledge there is no "equation" that will do that.

The median is so that the number of data points above and below is the same.
 
My initial thoughts:
Number of points will be N², so number of distances will be N²(N²-1)/2.
So if theses distances were sorted by length, the one you would be looking for would be near N²(N²-1)/4.
As it turns out, N²(N²-1)/4 is always an integer, so it will always be possible that to get the median, you will be averaging between two values.

The number of distances of value 1 will be: 2·N(N-1)
The number of distances of integer value M will be: 2·N(N-M)
The number of distances of √2 will be 2·(N-1)²

Skipping to infinity:
When N is very large, the median distance between a corner point and all other points would be the radius of an arc that divides the square into equal areas: √(2N/π)
In contrast, a point near the center would be half that: √(N/2π)

Don't have time for more thinking right now.

Nasty problem.
 
Yes it's tricky. We managed to get a closed form solution for the continuous case and as it turns out it did give us an insight into our problem. In case you're interested; this is a massive MIMO investigation. We were trying to compare a linear array of antennas to a square array. It turns out that a linear array say 10m long is equivalent to a square array of about 6m X 6m, not really any improvement.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K