Ready to begin
No records have been processed. Start with Next step.

Follow one occurrence at a time. Choose another input to test empty lists, repeated IDs and different parameters.
Ready
No records have been processed. Start with Next step.
Predict the next change, then step through the list. The original course records remain unchanged.
Make [ID,Maths] and [ID,Physics] lists, each sorted ascending by its mark. For a student at position i in the Maths list, find the SAME ID in the Physics list at position j. Store [ID,abs(i−j)]. Keeping IDs prevents accidentally comparing different students occupying the same position.
| ID | Maths position | Physics position | Absolute difference |
|---|---|---|---|
| 3 | 1 | 2 | 1 |
| 24 | 2 | 7 | 5 |
| 12 | 3 | 5 | 2 |
| 19 | 4 | 8 | 4 |
| 2 | 5 | 3 | 2 |
| 22 | 6 | 4 | 2 |
| 17 | 7 | 9 | 2 |
| 1 | 8 | 1 | 7 |
| 9 | 9 | 10 | 1 |
| 10 | 10 | 6 | 4 |
These are the lecture’s ten low-Maths students and its displayed tie order. The differences total 30, so their mean is 30/10 = 3. Student #1 has the largest difference in this example, 7. We use one-based ascending list positions, so low marks appear first. These are not automatically standard competition ranks or average tied ranks.
Equal marks need an explicit tie policy. To reproduce the lecture we retain its shown order, including ties. The all-30 option sorts by mark and uses smaller CardNo first when marks tie. Different tie policies can change position differences. Do not present a tie-dependent position number as an intrinsic rank.
The lecture’s subset was chosen for low Maths marks, not randomly sampled. Its mean difference does not establish a population correlation or prove the same relationship across all students. This exercise demonstrates joining two ordered lists by identity and accumulating a descriptive distance.
Why use the absolute difference?
Signed differences can cancel. Absolute differences measure how far apart the positions are regardless of direction.
If the same ID is fourth in both lists, what is its difference?
|4−4| = 0. The ID match is essential; comparing two different students at position 4 is a different task.
Does average distance 3 prove Maths causes Physics performance?
No. It is a descriptive calculation for the chosen data and tie convention, not a causal conclusion.