ArticleslgStudy

mathematics

Gower's distance

Gower's distance is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gower's distance rather than just read about it. In short: In statistics, Gower's distance between two mixed-type objects is a similarity measure that can handle different types of data (binary, ordinal, continuous) within the same dataset (unlike Hamming distance or Euclidean distance), by normalizing the differences between each pair of variables and then computing a weighted average of these differences. The distance was defined in 1971 by Gower and it takes values betwe…

Key takeaways

  • Gower's distance belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gower's distance to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gower's distance from memory before moving on to harder problems.

Reference excerpt

In statistics, Gower's distance between two mixed-type objects is a similarity measure that can handle different types of data (binary, ordinal, continuous) within the same dataset (unlike Hamming distance or Euclidean distance), by normalizing the differences between each pair of variables and then computing a weighted average of these differences. The distance was defined in 1971 by Gower and it takes values between 0 and 1. This technique is particularly useful in cluster analysis (such as K-nearest neighbors algorithm) or other multivariate statistical techniques.

Definition For two objects i {\displaystyle i} and j {\displaystyle j} having p {\displaystyle p} descriptors, the similarity S {\displaystyle S} is defined as:

S i j = ∑ k = 1 p w i j k s i j k ∑ k = 1 p w i j k , {\displaystyle S_{ij}={\frac {\sum _{k=1}^{p}w_{ijk}s_{ijk}}{\sum _{k=1}^{p}w_{ijk}}},}

where the w i j k {\displaystyle w_{ijk}} are non-negative weights usually set to 1 {\displaystyle 1} and s i j k {\displaystyle s_{ijk}} is the similarity between the two objects regarding their k {\displaystyle k} -th variable. If the variable is binary or ordinal, the values of s i j k {\displaystyle s_{ijk}} are 0 or 1, with 1 denoting equality. If the variable is continuous, s i j k = 1 − | x i − x j | R k {\displaystyle s_{ijk}=1-{\frac {|x_{i}-x_{j}|}{R_{k}}}} with R k {\displaystyle R_{k}} being the range of k {\displaystyle k} -th variable and thus ensuring 0 ≤ s i j k ≤ 1 {\displaystyle 0\leq s_{ijk}\leq 1} . As a result, the overall similarity S i j {\displaystyle S_{ij}} between two objects is the weighted average of the similarities calculated for all their descriptors. In its original exposition, the distance does not treat ordinal variables in a special manner. In the 1990s, first Kaufman and Rousseeuw and later Podani suggested extensions where the ordering of an ordinal feature is used. For example, Podani obtains relative rank differences as s i j k = 1 − | r i − r j | max { r } − min { r } {\displaystyle s_{ijk}=1-{\frac {|r_{i}-r_{j}|}{\max {\{r\}}-\min {\{r\}}}}} with r {\displaystyle r} being the ranks corresponding to the ordered categories of the k {\displaystyle k} -th variable.

References

Worked examples

Example 1 — a first encounter with Gower's distance

Start with the simplest possible case. Write down what Gower's distance claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gower's distance before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gower's distance ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gower's distance

In research
Gower's distance appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gower's distance in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gower's distance is common in secondary-school and first-year university syllabi. It links to neighbouring topics Similarity measures, Statistical distance, so understanding it makes those chapters shorter.
In everyday life
Look for Gower's distance outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gower's distance” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Gower's distance in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gower's distance means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gower's distance out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gower's distance in simple terms?

In statistics, Gower's distance between two mixed-type objects is a similarity measure that can handle different types of data (binary, ordinal, continuous) within the same dataset (unlike Hamming distance or Euclidean distance), by normalizing the differences between each pair of variables and the…

Why does Gower's distance matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gower's distance?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gower's distance.

Tags

  • Similarity measures
  • Statistical distance

Keep exploring