title: Compute a measure of "near multiplicity" from a list of noisy values
body: <h1>Question</h1>
  <p>Let us say I've got a list of values which have a common multiple greater than 1. For example, let us take the multiple to be 3 and form a collection of multiples of this value:</p>
  <pre><code>harmonicList = [3,6,6,3,3,9,27,3,15,18,9]
  </code></pre>
  <p>Now I add some noise:</p>
  <pre><code>harmonicList = [ v + (random() * 2 - 1 ) * 0.1 for v in harmonicList]
  </code></pre>
  <p>I'm searching for an algorithm that will return a number near 1.0 when the items in the list are near to being multiples of a common value but near 0.0 when the numbers are not near to being multiples -- such as, for example when the list is a collection of prime numbers.</p>
  <p>Is there such a measure of &quot;near multiplicity&quot;?</p>
  <h1>Why I want to solve this problem</h1>
  <p>I'm currently trying to detect Chessboard in a screenshot using Hough Transform. Sometimes the case is ideal, and it works very well :</p>
  <p><a href="https://i.stack.imgur.com/L7bQT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L7bQT.png" alt="enter image description here" /></a></p>
  <p>But sometimes not :
  <a href="https://i.stack.imgur.com/F8L1Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F8L1Q.png" alt="enter image description here" /></a></p>
  <p>I would like to detect the cases where there is a lot of aberrations. Thus, my idea is to compute the intersections of the lines detected, and create a collection of length  (only if the lines where horizontal or vertical). If the detection was good, I know that there will be a great &quot;harmonicity&quot; inside this collection I can then use that algorithm and a threshold.</p>
  <p>I know there is probably a better method to detect a chessboard. Maybe that this one is even stupid but that how comes the problem and I find it interesting.</p>