I've been using Mathematica to explore historical records. I have two long lists (one is 69k, the second 17k) of unequal length. They are like so (FWIW, the first list is the first 40 entries from the surnames of First World War attestation papers; the second list is the first 30 entries from the surnames of First World War war grave surnames - I have created percentage lists, to get a sense of how frequent their names were amongst all names):
atts={{"SMITH", 0.10031}, {"BROWN", 0.0555427}, {"WILSON",
0.0451438}, {"MCDONALD", 0.0411175}, {"JONES",
0.0375836}, {"TAYLOR", 0.0356139}, {"CAMPBELL",
0.033398}, {"JOHNSON", 0.0320656}, {"ANDERSON",
0.0303276}, {"WILLIAMS", 0.0298352}, {"THOMPSON",
0.0289952}, {"MARTIN", 0.0279669}, {"SCOTT", 0.0257944}, {"WHITE",
0.0250413}, {"STEWART", 0.0243606}, {"MILLER", 0.0240854}, {"CLARK",
0.0237088}, {"MACDONALD", 0.0224054}, {"WALKER",
0.0216233}, {"JOHNSTON", 0.0212322}, {"MOORE", 0.0212177}, {"YOUNG",
0.0211888}, {"ROBINSON", 0.0209426}, {"ROSS",
0.0196391}, {"WRIGHT", 0.018437}, {"MURRAY",
0.0182053}, {"ROBERTSON", 0.0181763}, {"MITCHELL",
0.0177273}, {"MCLEOD", 0.0176839}, {"JACKSON", 0.0175825}};
kia={{"SMITH", 0.0452787}, {"BROWN", 0.0260468}, {"WILSON",
0.0195784}, {"JONES", 0.0174415}, {"TAYLOR",
0.0169217}, {"CAMPBELL", 0.0166907}, {"McDONALD",
0.0146694}, {"ANDERSON", 0.0127057}, {"JOHNSON",
0.012417}, {"STEWART", 0.0123592}, {"SCOTT", 0.0120705}, {"WHITE",
0.0118394}, {"WILLIAMS", 0.0116662}, {"THOMPSON",
0.0115507}, {"MARTIN", 0.0107421}, {"WALKER", 0.0106844}, {"MOORE",
0.0103956}, {"CLARK", 0.0102224}, {"YOUNG", 0.0101646}, {"MILLER",
0.0101646}, {"ROSS", 0.00987583}, {"ROBERTSON",
0.00981808}, {"REID", 0.00958706}, {"WRIGHT", 0.00918279}, {"KING",
0.00912504}, {"MURRAY", 0.00895178}, {"MITCHELL",
0.008432}, {"JOHNSTON", 0.00825874}, {"HALL",
0.00820098}, {"MORRISON", 0.00814323}};
Does Mathematica have a function that could help compare these two lists? I'm trying to think of a systematic way to establish that McDonald, for example, is under-represented in the war graves (4% of enlistees had the last name McDonald, whereas only 1.4% of dead did so). But since our lists are so long, would there be any way to do this systematically?


Sorting andTallying, like so:Sort[Sort[Tally[names[[All, 1]]]], #1[[2]] > #2[[2]] &]. So they should be unique? – ian.milligan Oct 25 '12 at 14:53MCDONALDwhile the second list containsMcDONALD(note the case difference of thec). Given that otherwise everything is in uppercase, I guess that's an error. – celtschk Oct 25 '12 at 14:56ToUpperCasein my code that generated these lists. Thanks! – ian.milligan Oct 25 '12 at 14:58