AI Grounds

Open AI Grounds on a desktop

These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.

Guided discovery

Correlation Shape & Outliers Lab

Move one pair; compare straight-line and rank alignment.

Your dataset

Six indigo circles are fixed pairs. The orange diamond is movable Point 7. Drag the diamond or use the X coordinate and Y coordinate controls below. Its leader-linked number label is not its data position.

Pearson r = 1.0000; Spearman rho = 1.0000. Point 7: X = 7.0, Y = 7.0.

00224466881010YX7

Movable Point 7 only. The six fixed circles keep their paired values. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Movable Point 7 only. Equal values share average ranks. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Point 7: X rank = 7; Y rank = 7. Smallest value has rank 1; seven distinct values fill ranks 1 to 7.

Ranks order X and Y separately, then keep each observation’s pair together. Equal values share their average occupied rank. If the diamond coincides with a fixed circle, only Point 7 moves; the table retains both observations.

Pearson r

Straight-line alignment of numeric values.

1.0000

Centered paired products / both value spreads

Spearman rho

Alignment of paired average ranks.

1.0000

Pearson correlation of rank X and rank Y

Monotonic means one direction throughout; a curve can be monotonic without being straight. A U shape turns back. Neither coefficient describes every pattern, proves independence or establishes causation. Spearman is less sensitive to numeric distance, but changed rank order can still influence it. A low score is not an automatic reason to remove a point.

Rank and paired-value table
Seven current pairs. Rank each variable separately; average ties and preserve observation identity.
PointXYX rankY rank
1 · fixed1.01.011
2 · fixed2.02.022
3 · fixed3.03.033
4 · fixed4.04.044
5 · fixed5.05.055
6 · fixed6.06.066
7 · movable7.07.077
Six fixed-point reference

Prepared six-circle reference: Pearson r = 1.0000; Spearman rho = 1.0000. Current seven-pair dataset: Pearson r = 1.0000; Spearman rho = 1.0000.

This controlled toy comparison isolates the diamond’s influence. It is not a recommendation to exclude inconvenient real observations; investigate provenance and scientific context.

Conventions and sources

Pearson r = Σ[(X − mean X)(Y − mean Y)] / √(Σ(X − mean X)² × Σ(Y − mean Y)²). Spearman applies that same formula to average-rank pairs. The simplified no-tie formula is not used because these datasets can tie. If either raw or ranked spread were zero, the corresponding coefficient would be undefined. The six fixed pairs always vary in this editor, so that boundary cannot be reached by moving just Point 7.

Calculations use full precision before four-decimal display. All editable coordinates are half-unit values from 0 to 10; the fixed plot axes use the same bounds. This page compares descriptive scores; no normality assumption, inferential test, causal estimate, outlier-removal rule or claim that either score captures all dependence is supplied.

NIST · Average-rank Spearman formula
Berkeley · Shape, influence and correlation limits