# User:RiverStyx23/sandbox

• )

## §Math

Please don't get scared by a little mathematics. This appendix is written to be easy to follow, thought provoking, and worthwhile to read. There is nothing involved in the equations other than addition, subtraction, multiplication, and division. All the important stuff is explained using high school English sentences – in logic you can follow.

Locating the center of a population is easy if one is satisfied with some assumptions and mathematics. From the internet one can get the latitude and longitude for each member’s address. Ignoring some minor effects related to the non-flatness of the Earth, the “geometric mean center” of a population is the point defined by the average latitude and longitude. That's the answer. The computation to prove it will be discussed after some other details.

Given the latitudes and longitudes of two points, there are complications involved in calculating their separation in miles. For our purposes we will assume that Ohio is flat, and small enough that miles per degree of latitude, or longitude, are constant statewide. This allows us to use the Pythagorean relation you remember from your high school class in trigonometry – $a^2 + b^2 = c^2$ – to compute theoretical straight line distances between points. The error introduced by these assumptions is negligible inasmuch as we generally travel by roads, and not “as the crow flies.”

At the Equator there area approximately 69.17 miles per degree of either latitude or longitude. Distances between degrees of latitude (from North to South) are constant regardless of how far one is from the Equator. For our calculations, let's round up to an even 69.20 miles per degree of latitude.

Distances between degrees of longitude (from West to East), however, vary with the cosine of the latitude at which the distance is being measured, falling to zero at the poles. Ohio’s latitude, which is to say it's distance from the Equator, is about 38.50° at _____________ and about 41.50° at _____________. In order to calculate the distance between degrees of longitude, we will split the difference and assume 40°. To calculate the distances between degrees of longitude in Ohio, then, we just apply a simple formula: 69.20·cos(40°), which comes to 53 miles per degree of longitude.

The point we want to find is the center of population. If we knew this point (its latitude and longitude), we could compute its distance from each of the member's homes. To be called the center of population, there must be something minimum about these distances. We will choose the point such that the sums of the squares of all these distances is that minimum. The point thus computed is called the geometric mean center. Other “somethings to be minimum” are possible, but this “minimum sum of squares” is not only the most generally accepted definition, but differs only a little from a location computed by other practical choices (and it also simplifies the math.)

Now for the math: Let the home of member $i$ be located at $x_i,y_i$ – that is, at latitude $x_i$ and longitude $y_i$. Let the candidate center point be at $x,y$. (We have let $x$ run East-West and $y$ run North-South, but these are arbitrary choices.)

The distance squared between $x,y$ and $x_i,y_i$ is $z^2_i = (x - x_i)^2 + (y - y_i)^2$. That is, $z_i$ is the diagonal distance between the address of member $i$ and the candidate center. The distance $\left (x - x_i \right )$, and likewise $\left ( y - y_i \right )$, may be either positive or negative – consequently, the direction of the diagonal $z$ can be along any point of the compass.

Given $N$ members, the sum of distances squared for all members is:

 $A = \sum_{i=1}^N z_i^2 = \sum_{i=1}^N [(x - x_i)^2 + (y - y_i)^2]$.

The big $\textstyle \sum$ (the Greek capital letter sigma) is the addition symbol. Together with its subscript and superscript, it tells us to sum all $N$ of the distances squared.

$A$ is just a number – it is the sum of all the distances squared. Our problem is to solve for the unknowns, $x$ and $y$. The equation is true for any $x$ and $y$, and, in fact, any location close enough to Ohio that the Earth can be considered flat. The problem is to compute the $x,y$ pair that gives the smallest value of $A$. This will be done using 1950's high school mathematics.

Before proceeding, note that the $x$ and $y$ variables can be summed separately and then added together:

 $A = \sum_{i=1}^N (x - x_i)^2 + \sum_{i=1}^N (y - y_i)^2$.

That is, the $x$ and $y$ terms can be summed separately and then added together.

Still needs to be proofread below this line

Consider the point $x+\Delta x, y$, close to $x,y$. Think of $\Delta x$ as a tiny distance, although this condition is not important until later. Computing the sum of squares of distances from members homes to this new point, we get:

 $A+\Delta A = \sum_{i=1}^N [(x+\Delta x - x_i)^2 + (y - y_i)^2].$

Subtracting $A$ gives:

 $\Delta A = \sum_{i=1}^N (x+\Delta x - x_i)^2 - \sum_{i=1}^N (x - x_i)^2$

 _________ $= \sum_{i=1}^N [(x+\Delta x - x_i)^2 - (x - x_i)^2].$

Now we square the terms in parentheses. Squaring the triple term will not be too hard, will it?

Also note that $\Delta x$ is a distance, so $\Delta x^2$ is the same as $(\Delta x)^2$. We get:

 $\Delta A =\sum_{i=1}^N [(x^2+\Delta x^2 + x_i^2 + 2 x \Delta x - 2 x x_i - 2 x_i \Delta x) - (x^2 + x_i^2 - 2 x x_i)].$

The next three steps use basic high school algebra. Combining like terms, we are left with:

 $\Delta A =\sum_{i=1}^N (2 x \Delta x - 2 x_i \Delta x + \Delta x^2).$

Summing the terms separately gives:

 $\Delta A = 2 \Delta x \sum_{i=1}^N x - 2 \Delta x \sum_{i=1}^N x_i + \sum_{i=1}^N \Delta x^2.$

In the first term $x$ is added to itself $N$ times, so this term simplifies to $2Nx\Delta x$. Similarly, the third term is $N \Delta x^2$. The second term involves the sum of all $x_i$, which is simply $N$ times the average $x_i$. Average is commonly denoted by an overbar, so the middle term simplifies to $2 N \bar{x_i} \Delta x$. ($\bar x_i$ is pronounced "$x$ sub $i$ bar").

Next, we factor $N \Delta x$ from each term, and get:

 $\Delta A = N \Delta x \big [ 2 x - 2 \bar x_i + \Delta x \big ].$

Now its time for some straight thinking. Suppose we had considered a point $x, y + \Delta y$, instead of $x + \Delta x, y$: The end result would have been an identical equation, and the same concluding logic, but with $y$ instead of $x$. If the point was offset in both directions, we would have:

 $\Delta A = N \Delta x \big [ 2 x - 2 \bar x_i + \Delta x \big ] + N \Delta y \big [ 2 y - 2 \bar y_i + \Delta y \big ].$

Recall that the $x,y$ point is the population center point that we are solving for. If this point is at the average coordinate values, the terms in braces are $\Delta x$ and $\Delta y$. Either $\Delta x$ or $\Delta y$, may be negative, but $\Delta A = N \Delta x^2 + N \Delta y^2$ must be either zero or positive.

Proofreading of following has been done

Thus, if $x = \bar x_i$ and $y = \bar y_i$ and if $\Delta x$ and $\Delta y$ each equal one mile, then the sum of distances squared from $x + \Delta x ,y + \Delta y$ to all members' homes is $\Delta A = 2 N$ square miles. If the $\Delta$'s are each one foot, then the sum of distances squared is $\Delta A = 2 N$ square feet. Likewise for inches, millimeters, etc.

Now for the punchline: Any candidate center point, different than $x = \bar x_i$ and $y = \bar y_i$ has a larger sum of squared distances to the members homes.

Now, remember: We said $\Delta x$ is to be tiny. That was an understatement – we really want it to be infinitesimal. OK, you've got to think a little harder now about what that means. But if you've read this far you must be having fun. Since $\Delta x$ is infinitesimal, what's in the parentheses is just $2 x - 2 x_i$. Finally, summing the $x$ and $x_i$ terms separately, we get the change in $A$ due to a very tiny $\Delta x$:

 $\Delta A = 2 \Delta x \Big[ Nx - \sum_{i=1}^N x_i \Big ].$

Surely, there was no problem noting that $\sum_{i=1}^N x = Nx$.

For defining population centers, one may wish to favor locations closer to certain members' addresses, e.g., officers, ritual team members, etc. Such favoring is arbitrary but is easily accomplished in the math. For example, if one wants to favor a point nearer the Worthy Chief's address, one can weight the distance to his address as more important than the distances of other members. The computation with weighted distances is essentially the same as without.