Why Plot Pairwise Estimates?
A table of pairwise relatedness estimates can be difficult to interpret once a sample contains many individuals. Plots make broad patterns visible: most pairs may have estimates close to zero, while a smaller group forms a separate cluster; two estimators may usually agree but differ sharply for a few pairs; or a heatmap may show that unusual pairs share the same sample. These patterns help diagnose the data and the estimation process.
A plot is a diagnostic summary, not a pedigree assignment. An estimate can be noisy, affected by allele-frequency inputs or population structure, or based on fewer usable markers for one pair than another. The earlier material on uncertainty, missing genotypes, and population structure is therefore relevant when interpreting unusual values. Visual patterns can identify what deserves investigation, but they do not establish why it occurred.
Plotting the Distribution Across Pairs
A histogram or density plot of pairwise estimates gives a compact view of their overall distribution. A concentration near zero can indicate that most pairs have little estimated relatedness, while a shoulder or second concentration at larger values can signal a subset of pairs with more sharing. Negative estimates can occur for some estimators because of sampling variation or the estimator’s construction; they do not mean that two people have a literal negative biological relationship.
The distribution should be described using its scale, binning or smoothing choices, and the number of pairs included. A histogram can hide small clusters if bins are too wide, or make random variation look like distinct groups if bins are too narrow. It is often useful to inspect more than one bin width and to retain access to the pair identities behind unusually large or small estimates.
Worked Example: Reading a Pairwise Estimate Histogram
Suppose a hypothetical set of five samples has ten estimated pairwise kinship coefficients: \(-0.004,\ 0.002,\ 0.006,\ 0.010,\ 0.018,\ 0.022,\ 0.031,\ 0.118,\ 0.132,\ 0.247\). Construct a simple histogram using the bins \([-0.01,0.05)\), \([0.05,0.10)\), \([0.10,0.15)\), \([0.15,0.20)\), and \([0.20,0.30]\).
The first bin contains seven values: \(-0.004,\ 0.002,\ 0.006,\ 0.010,\ 0.018,\ 0.022,\) and \(0.031\). The second contains none. The third contains \(0.118\) and \(0.132\), the fourth contains none, and the final bin contains \(0.247\). The bin counts are therefore \(7, 0, 2, 0, 1\), which sum to the ten pairs.
The plot would show a large concentration near zero and a smaller group around \(0.12\), plus one estimate near \(0.25\). That pattern suggests reviewing the identities and uncertainty of the corresponding pairs. It does not, by itself, prove that the two estimates near \(0.12\) represent a particular relationship class: marker information, estimator behavior, and relevant population assumptions still matter.
One practical refinement is to show counts and pair labels for the upper tail, or to use a rug plot alongside a density curve. With many pairs, the histogram is useful for the broad distribution, while a labelled list or plot of the largest estimates preserves the sample identities needed for follow-up. Do not treat each bar as a count of independent individuals: each observation is a pair, and a sample can appear in many pairs.
Comparing Alternative Estimators
A scatterplot of two estimates for the same pairs can reveal systematic differences and pair-specific disagreement. Each point represents one pair. If both axes use the same scale and target quantity, the line \(y=x\) marks exact agreement: points above it have larger values from the vertical-axis estimator, and points below it have smaller values. The overall pattern can show a consistent offset, a change in disagreement across the range, or a few isolated departures.
Check the scales before drawing that line. For example, conventional PI_HAT estimates a proportion-of-IBD quantity, whereas kinship coefficients use a different scale. Under standard pedigree expectations, PI_HAT is approximately twice the kinship coefficient for common relationship classes. Dividing PI_HAT by two can be a useful approximate scale alignment for a diagnostic comparison, but it does not make the estimators identical or guarantee agreement for every pair. State any transformation in the axis label and interpretation.
Worked Example: Locating Estimator Disagreement
For eight hypothetical pairs, suppose the horizontal coordinate is a KING-robust kinship estimate and the vertical coordinate is PI_HAT divided by two. These transformed values are on a comparable kinship scale for a diagnostic plot:
| Pair | KING estimate | PI_HAT / 2 |
|---|---|---|
| A–B | 0.002 | 0.002 |
| A–C | 0.010 | 0.006 |
| A–D | 0.118 | 0.125 |
| B–C | 0.132 | 0.129 |
| B–D | 0.247 | 0.251 |
| C–D | 0.251 | 0.244 |
| A–E | 0.031 | 0.082 |
| B–E | 0.006 | 0.052 |
For each point, define the vertical-minus-horizontal difference as \(d=\widehat{PI\_HAT}/2-\hat\phi_{\mathrm{KING}}\). The differences, in table order, are \(0,\ -0.004,\ 0.007,\ -0.003,\ 0.004,\ -0.007,\ 0.051,\) and \(0.046\). Their mean is
Most points lie close to the equality line, but pairs A–E and B–E sit well above it. The mean difference is positive, though the two conspicuous pairs contribute most of that offset. A scatterplot makes this pattern clearer than the mean alone. The appropriate conclusion is that these pairs warrant examination for pair-specific or data-quality explanations—not that either estimate is automatically correct.
If several estimators are available, use separate, clearly labelled comparisons rather than placing differently scaled estimates on one axis without conversion. A useful display can include the equality line and, where appropriate, a smooth trend. The trend helps reveal whether disagreement changes with estimated relatedness, but it should not replace inspection of individual points or an assessment of estimator uncertainty.
Pairwise Heatmaps and Sample Clusters
A pairwise heatmap places samples on both axes and colors each cell according to the estimated relationship for that pair. If the plotted measure is symmetric, the matrix is symmetric: the estimate for row \(i\), column \(j\) is the same pairwise estimate as for row \(j\), column \(i\). The diagonal represents each sample paired with itself; it is usually omitted or masked because a self-comparison is not an ordinary between-sample estimate.
Ordering samples can reveal structure. If samples with larger pairwise estimates are placed next to one another, a group of strongly colored adjacent cells can form a block. Reordering does not change any estimate; it changes only how easily a pattern can be seen. The order should be described, for example as a clustering-based display order, rather than mistaken for evidence that neighboring samples are more related.
Worked Example: Finding a Cluster in a Heatmap
Consider five hypothetical samples, A through E, with the following kinship-scale pairwise estimates. The diagonal is omitted:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | — | 0.49 | 0.24 | 0.01 | 0.00 |
| B | 0.49 | — | 0.23 | 0.00 | 0.01 |
| C | 0.24 | 0.23 | — | 0.02 | -0.01 |
| D | 0.01 | 0.00 | 0.02 | — | 0.25 |
| E | 0.00 | 0.01 | -0.01 | 0.25 | — |
A heatmap in the displayed order would show a high A–B cell and moderate A–C and B–C cells, forming a visible group among A, B, and C. D–E would form another conspicuous pair, while estimates between those groups are close to zero. The matrix is symmetric: for example, the A–B value \(0.49\) appears in both the A row/B column and B row/A column.
The visual pattern identifies a candidate cluster and an unusual pair for review. It does not resolve whether A and B are duplicates, establish a family tree, or explain the D–E estimate. Those conclusions require checking the data, estimator assumptions, uncertainty, and relevant records. The heatmap is valuable because it shows how pairwise patterns connect across samples, not because color alone identifies a relationship.
Why Pairwise Observations Are Dependent
A collection of pairwise estimates is not a collection of independent observations. With \(n\) samples there are \(n(n-1)/2\) distinct unordered pairs, but many pairs share a sample. For instance, A–B and A–C both depend on sample A’s genotypes and can share technical or biological features. Consequently, a histogram with many pairwise values does not imply that the same number of independent units was studied.
This dependence matters when interpreting apparent clusters, computing uncertainty for a summary across pairs, or applying a statistical test to plotted values. A plot remains useful for pattern recognition, but ordinary procedures that assume independent observations should not be applied to pairwise values without a suitable justification.
Common Diagnostic Pitfalls
- Calling a visual cluster a confirmed relationship. A band or block identifies a pattern in estimates, not a verified pedigree. Check uncertainty and possible population or data effects before drawing biological conclusions.
- Comparing unlike scales. A KING kinship estimate and PI_HAT should not be compared against the same numerical reference without accounting for their different definitions. Label axes and transformations explicitly.
- Overinterpreting one striking cell. A single unusual estimate may reflect pair-specific information, missingness, or estimator behavior. Examine the corresponding pair and the broader pattern.
- Treating all plotted pairs as independent. A sample participates in many pairs, so pair counts overstate the number of independent observations.
- Confusing display order with biological structure. An adjacent block is easier to see after reordering, but the order itself does not create or prove the relationships.
Check Your Understanding
Use the ideas in this tutorial to answer the following questions.
- Why can a pairwise kinship estimate be slightly negative without implying a literal negative biological relationship?
- What does a point above the equality line mean when both axes represent estimates on the same scale?
- Why is it important to state how PI_HAT was transformed before comparing it with kinship estimates?
- What does a symmetric heatmap tell you about the pairwise estimates, and why is its diagonal usually not interpreted as an ordinary pair?
- Five samples yield ten distinct pairwise estimates. Why should those ten values not automatically be treated as ten independent observations?