What happens when too many retailers want to get marijuana licenses? That’s what occurred in Washington State back in 2014 when more than 2,000 retailers submitted applications for the 334 marijuana licenses that were available.

Since 2014, we’ve seen a lot of marijuana license applicants go to extreme lengths to get their paperwork submitted on time, and we’ve seen the problem of “not enough licenses to go around” again and again. Washington State made a valiant effort to solve this problem when it came up with its marijuana license lottery.

You might be thinking words like “marijuana” and “lottery” don’t go together. You might think a marijuana license lottery can’t possibly end well. But believe it or not, Washington’s marijuana license lottery went far better than anyone could have expected. However, the process was also far from perfect.

The Mathematical Solution

The first problem was figuring out how to make a marijuana license lottery fair. Marijuana licenses were a touchy subject back in 2014. The lottery system had to ensure there was no favoritism or chances to tamper with the results.

Enter Sharif Ibrahim who was a Ph.D. student in mathematics at Washington State University back in 2014. Working alongside of Washington State’s Social and Economic Sciences Research Center, he was tasked with creating a mathematical algorithm that would choose license recipients fairly. Unfortunately, it’s very easy to make a mistake when you’re trying to choose random winners for anything.

The process Ibrahim used to develop a system that would randomly select marijuana license applicants was very complex. Roberta Kwok of The New Yorker goes into great detail in her article, How to Design a Marijuana License Lottery, and I highly recommend that you check it out if you want the nitty gritty. Here’s a non-mathematician recap.

First, Ibrahim created a software program that would reorder the applicants. Next, the software needed to be able to pick applicants randomly. Why reinvent the wheel when others have already done it? Ibrahim used two free online services to generate random numbers from the data.

One of those tools was random.org. If you’ve ever run a contest on your blog or website and had to pick a random winner, then you might already know what random.org is. It’s the go-to tool that bloggers and web marketers use to choose raffle winners. He used a second software program to extract a completely separate random number.

Once Ibrahim had random numbers from these two sources, he fed one from each source into a specific computation to generate yet another random number. That third random number was the one he put into his original algorithm.

Not only did he have safeguards in place to ensure the process truly was random on the technical side, but he did the same thing on the human side. He had different people get the random numbers from his two original sources, and he ran his program on two computers to ensure the results didn’t vary. Of course, he also had his software code closely reviewed to confirm that it not only worked but worked correctly.

Finally, the program was ready and the lottery ran on April 23, 2014. With no major problems, it appeared the first marijuana license lottery worked until the state realized it had disqualified applicants from entering the lottery who should have been included. Ibrahim was asked to add these mistakenly disqualified applicants into the lottery but doing so couldn’t affect the previous results.

Ibrahim created a supplemental lottery that ultimately solved the problem. However, all was not perfect after all. When the final lottery was completed, complaints began rolling in, albeit less than one would have expected. There were problems with completing and submitting applications and as Kwok reports, “some candidates were effectively ballot-box stuffing.” It would seem that all is not fair in marijuana license lotteries after all.

The Law of Supply and Demand at Work

The moral of the story is simple. If demand exceeds supply, some people won’t be happy. Since the 2014 lottery, Washington State has issued additional retail licenses, and currently, 299 retailers have marijuana licenses in the state. However, the number of allowed licenses jumped to 556 earlier this year, so you can bet the number of issued licenses will continue to rise.

But remember, back in 2014, Washington State received over 2,000 applications for marijuana licenses from retailers. There’s still a very big gap between the number of available licenses in the state and the number of people who want to get those licenses. In other words, a marijuana license is still very valuable in Washington.