Slashdot Mirror


Canada's 'Random' Immigration Lottery Uses Microsoft Excel, Which Isn't Actually Random (gizmodo.com)

An anonymous reader writes: Last year, Canada introduced a new lottery system used to extend permanent-resident status to the parents and grandparents of Canadian citizens. The process was designed to randomly select applicants in order to make the process fairer than the old first-come, first-served system. There's just one problem: the software used to run the lottery isn't actually random. The Globe and Mail reported the Immigration, Refugees and Citizenship Canada (IRCC) uses Microsoft Excel to run the immigration lottery to select 10,000 people for permanent resident status from a field of about 100,000 applications received each year. Experts warned that the random number generating function in Excel isn't actually random and may put some applicants at a disadvantage.

First, it's best to understand just how the lottery system works. An Access to Information request filed by The Globe and Mail shows that IRCC inputs the application number for every person entering the lottery into Excel, then assigns them a random number to each using a variation of the program's RAND command. They then sort the list from smallest to largest based on the random number assigned and take the first 10,000 applications with the lowest numbers. The system puts a lot of faith in Excel's random function, which it might not deserve. According to Universite de Montreal computer science professor Pierre L'Ecuyer, Excel is "very bad" at generating random numbers because it relies on an old generator that is out of date. He also warned that Excel doesn't pass statistical tests and is less random than it appears, which means some people in the lottery may actually have a lower chance of being selected than others.

16 of 224 comments (clear)

  1. So... by Train0987 · · Score: 2, Insightful

    Why not just accept all the immigrants who show up? That's what they tell the US to do, right?

    1. Re:So... by Anonymous Coward · · Score: 2, Insightful

      Who is the "they" you speak of? I can think offhand of anybody who says "accept all the immigrants who show up."

      This is technically the libertarian position, true (libertarians consider borders to be government red tape restricting people's natural freedom to go wherever they want), but most libertarians are smart enough to mostly work on less hot-button issues, like freedom of guns and drugs, instead of freedom of borders.)

    2. Re:So... by Anonymous Coward · · Score: 2, Insightful
      These days the main libertarian issue is to get rid of Obamacare and let people simply die when they get sick.

      "Think of it as evolution in action," that's their catch-phrase.

      --say, we may need those immigrants after all!

    3. Re:So... by Midnight+Thunder · · Score: 3, Insightful

      These days the main libertarian issue is to get rid of Obamacare and let people simply die when they get sick.

      "Think of it as evolution in action," that's their catch-phrase.

      --say, we may need those immigrants after all!

      It worse than that "I am okay, so nobody needs it", until things are not so rosey and then it is "what happened to the free market that was meant down health care prices?"

      --
      Jumpstart the tartan drive.
    4. Re: So... by Anonymous Coward · · Score: 2, Insightful

      Are you counting yourself too, or are you Native American?

      "Native" Americans weren't native. They didn't pop up out of the ground in the Americas. They migrated here as well. Stop being a pedant.

    5. Re: So... by liquid_schwartz · · Score: 3, Insightful

      Must be nice to be ignorant of history. Mexico had alot of problems that were never replicated in the US. Spanish and English colonization was very different. Your remarks remind me of the times my Mother used to tell me that Israel turned desert into farmland. Remarkably ignorant of history.

      Everyone has their cross to bear but at some point they have to move on. I'm aware of history but I neither use it as an excuse nor an accusation. All countries have behaved badly in some ways at some times, are we all victims or do we move on and try and make things better?

  2. Irrelevant by XXongo · · Score: 5, Insightful
    The story is about an issue that is completely irrelevant.

    It doesn't matter whether the "RND" function is ideally random in a mathematical sense. It only matters whether the "random" number generated is independent of the identities of the people applying to be admitted.

    1. Re:Irrelevant by geschbacher79 · · Score: 5, Insightful

      Exactly. And if the order in which the data is inserted into Excel is essentially random, that's good enough. There is no fair or unfair if the number of applicants exceeds the quota and there is no opportunity to game the system (such as naming yourself Aaron A Aaronson to appear first, or something)

    2. Re:Irrelevant by JourneymanMereel · · Score: 4, Insightful

      That's kind of my thoughts on it, too. And who is at a disadvantage in this scheme? Is it the person entered in row 13,428? Or anybody who was entered on July 16th? The chances of ending up at an advantage or a disadvantage are themselves probably pretty random.

      --
      Life has many choices. Eternity has two. What's yours?
    3. Re:Irrelevant by Solandri · · Score: 3, Insightful

      While that's true, if Excel's RNG results in a pattern (e.g. cell A2534 is always assigned a low number and thus selected), it could result in immigration employees who know of this gaming the system, to do an immigrant friend a favor or even auctioning the spot to the highest bidder.

      The bigger question to me is why are they using Excel for this? Spreadsheets are for calculating things. They are absolutely the wrong tool if you need the data you're working on to remain consistent or auditable. An immigration employee could take the spreadsheet after the random numbers were assigned, and copy-paste names or random numbers around to move people to/from the selected and denied categories, and there'd be no way to detect they'd done this.

    4. Re:Irrelevant by Obfuscant · · Score: 5, Insightful

      While that's true, if Excel's RNG results in a pattern (e.g. cell A2534 is always assigned a low number and thus selected),

      If you had bothered to read the finr article, you'd have learned that the tempest in the teapot is that Excel uses a pseudorandom generator. That's just like what a lot of systems use. It costs time and money to do real random generation, and it requires some hardware. PGP, IIRC, requires someone to type at the keyboard and it times the characters to generate a random number. There are radiative decay RNGs. There's even a lava lamp based RNG.

      But MOST of the "random" for most software is pseudo. And the algorithms are published.

      The fine article talks about how bad some RNG is because you could "reverse engineer" the algorithm. In 1980 I tested the RNG in DEC RSX-11, and I simply looked up the algorithm in the manual to see if the results from testing matched theory. In a manual. "This is how the RAND function works..." As I recall, it was based on doing a simple calculation on a double precision number and pulling the middle 32 bits out of the number as the random output. You could actually write the code to do this yourself.

      it could result in immigration employees who know of this gaming the system, to do an immigrant friend a favor or even auctioning the spot to the highest bidder.

      Oh for pete's sake. If an immigration employee has this much access to determining who wins and who loses, then even if the RNG is a true, completely unpredictable, physical random process based number, all he'd have to do is run the random generation process over again until his chosen winner "won".

      The bigger question to me is why are they using Excel for this? Spreadsheets are for calculating things.

      Yeah, calculating things. Like random numbers. They're using Excel because it works for this and didn't cost them $1 million to pay a consultant to write something in python to do the same thing.

      An immigration employee could take the spreadsheet after the random numbers were assigned, and copy-paste names or random numbers around to move people to/from the selected and denied categories,

      They could do this even if the RNG is truly random, so the RNG has nothing to do with the problem.

    5. Re:Irrelevant by Anonymous Coward · · Score: 3, Insightful

      They're using Excel because it works for this and didn't cost them $1 million to pay a consultant to write something in python to do the same thing.

      A million dollars?

      $ od -d /dev/urandom | less

      I'm in the wrong job.

  3. even weaker by goombah99 · · Score: 5, Insightful

    The story is about an issue that is completely irrelevant.

    It doesn't matter whether the "RND" function is ideally random in a mathematical sense. It only matters whether the "random" number generated is independent of the identities of the people applying to be admitted.

    It isn't even that. Just because the distribution of random numbers isn't random it doesn't mean the sort order based on that isn't random. For example, suppose my random number generator only put out numbers divisible by 1/(2^16) which is what a finite precision binary based system is going to do. This distribution isn't random because it's zero density at many possible floating point values. Yet the sort order might be perfectly random.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  4. List is already random by hawguy · · Score: 4, Insightful

    Unless they let entrants pick where they are in the list, it doesn't matter if the random number generator is not completely fair.

    Maybe it's biased such that entrants 50,000 - 51,000 are much more likely to end up sorted to the top, but unless the entrants can choose where they are in the list, I don't see why that really matters. Sure, someone that controls the list could move their friends to that range to make them more likely to end up at the top, but they could also move their friends to whatever random numbers and up at the top.

  5. Dems vs Repubs [Re:So...] by XXongo · · Score: 4, Insightful

    Actually, I've seen exactly the opposite analysis.

    Democratic politicians want more legal immigration but less illegal immigration. Legal immigrants vote and pay taxes, illegals don't.

    Republican politicians want less legal immigration, but more illegal immigration. Illegal immigration depresses wages, meaning more profits for corporations. (Even if the corporations don't hire illegals, the illegals have a downward pressure on all unskilled-labor wages).

  6. Fake News by Jodka · · Score: 3, Insightful

    The story is about an issue that is completely irrelevant.

    It doesn't matter whether the "RND" function is ideally random in a mathematical sense. It only matters whether the "random" number generated is independent of the identities of the people applying to be admitted.

    With no intention of diminishing the importance of your statement; that is blindingly obvious. There are two other excellent points raised by others in the comments here: that imperfect randomness does not make the process manipulable by immigration candidates and that sort order of assigned imperfect random numbers can itself be perfectly random.

    The story is mis-reported as a scandal; there is in fact no scandal whatsoever. So who made up the fake news? Tom Cordoso is the author of the original story at the Globe and Mail which the Gizmodo article linked in the Slashdot summary cites. Cordoso quotes Université de Montréal computer-science professor Pierre L’Ecuyer as saying “Anything would be better” [Than the Excel random number generator] but, crucially, Cordoso omits the context of that comment. Was L’Ecuyer referring to its suitability for this particular method and application, or was he commenting on its suitability for general use, including, for example cryptography? In neither the Gizmodo nor Globe and Mail articles can I find any mention of an expert unambiguously expressing judgment on the immigration randomization method specifically. A close reading suggests that the criticism originates with the journalist, and that he deceptively implies it to be the opinion of experts.

    Some enterprising citizen journalist should contact the cited experts and ask them 1) Did their comments refer to general usage of the Excel random number generator or specifically to the immigration randomization methodology. 2) What is their opinion of the immigration randomization methodology 3) Do they agree with the points made here about it being a nothingburger 4) Have they read the Globe and Mail article, if so do they believe that their comments were wrongly contextualized.

    If anyone does that, it would be nice to see a followup article here on Slashdot.

    --
    Ceci n'est pas une signature.