Help with sample size for finding average distance betwee geographical points

17 Views Asked by At

I have a program that I want to test through simulations (since I don't know exactly how it works).

The program converts a precise location (lat, lon) to an approximate location (it adds noise and rounds it). A specific precise location will not always return the same approximate location since the random noise can be different.

The scenario I would like to test is where I receive approximate locations for the same precise location (P) N times and try to convert it to a more precise location.

My theory is that the more approximate locations I receive for a specific precise location and average them into Avg_A, Avg_A will get closer and closer to the precise location P.

I want to show (through simulations) that to a certain degree (e.g. 95%), the averaged approximate locations (Avg_A) is within a certain margin (e.g. 100m) of the precise location (P) on average after receiving N approximate locations.

My idea is to for a chosen N (1000 for example):

  1. Generate 1 precise location, P
  2. Run the program N times on the precise location to receive N approximate locations
  3. Calculate average of the approximate locations, Avg_A
  4. Calculate distance from Avg_A to P: Dist(Avg_A to P)

After running this X times, calculate the average of the Dist(Avg_A to P), call this Avg(Dist(Avg_A to P)) (average distance from average approximate location to the precise location)

My question is: What should X be to be able to say that the 'real' Avg(Dist(Avg_A to P)) is the calculated number within a certain margin (e.g. 100m) to a certain degree (e.g. 95%).

Thank you, and I am sorry if this was oddly phrased or badly formatted, if so please let me rephrase.