Transcript for We got drunk on margaritas for science

If you want to make the perfect Margarita can you trust the Internet. We heard that's killed so far and beautiful one island city queens New York. And we here with Matty he's been a partner here for 678 years eight years and we pulled seventy different risk. He's from the Internet that's about how many non pomegranate not frozen varieties of Margaret are. We analyze them and we brought them here in this box and one lucky 530 staffers in a taste test and tell us which is the best. That's several B testing 78 margaritas today. We've signed offensive liability insurance boy if its formative really sort of go from 78 margaritas just to name for us. Dowd for it use a technique called clustering. I. It's a method that takes a large amount and data and flipped it into groups or clusters here's a really simple example. Let's candy of 100 recipes with army tequila and lime juice. What the clusters have driven dies as it improves the closeness of all these points or recipes. Sorting organizing and till finally the average distance among recipes and their own cluster is mathematically as close as it can be. Now you can have as many or as few clusters as he wise we decided to make for a feast on different people's Slater preferences. But we should note that Lott needs clustered recipes took into account ten different ingredients. But unfortunately. This would have required more dimensions than our human hunter gatherer for and concurrently. All right so let's make some grants. Our first clusters Margarita is what with picnic on class. Recipes one and a half ounces of Gil. Three quarters and announced on trap and three quarters of an ounce of much use illicit by the way in defense heading. This is the Internet search it. Environment. That's next summer so our next contestant is a tequila forward. Margarita that killed fortress is an ounce and half of tequila cooler announced quantum. Quarter announced that the got to hear three quarters and announced want us. Yes skilled forward. The tart. Losing my Korea again how the silver cam Atkinson. The next Margarita and the one I'm least looking public trying. It's called the sleep uneasy sleep easy Margarita recipe it's a plastic markers only unit accounting after water and limits he sit water. She doesn't really don't feel comfortable with the direction towards a citizenry. Stuff. But it's a lot to process right somehow the flavor so really. Co here together. I was spending a whole afternoon drinking in the sun this might mean what I actually look for him and wondered cocked him reduction in Orange. I sensible alternative minimum me shaking now the next and final contestant is what we call line the entire. So what this is is it's one half ounces tequila. It's a quarter of announce Quan trip. It's one and a quarter ounces wind east and to have announced suppose here. So it's a much sweeter drink that really emphasized the line quite. Did not dead. It's not that it's certainly yeah right here right again and honest and more like Thackeray. Yet few yen it is like markers. Can do. In came. Immediate decision. Last year through the statement Mercury and niece even married it was a fair and the eats meat and he's so sweet and easy justice does prevail here was murdered Elizabeth Edwards bite by our count. Our second second. When is the last. Now with the classic Mercury all I went down big upset they upset here classic was having Vegas favorite. A disappointing third place finish the play the winner was the first marker. That would be the U. Such that you upward of one it's in the can. No line the line number two classic written briefs I think you just in case and a life. The morgue to tip over Q who's your Margaret. It's a coherent where ordering its so. Plus my house. Doesn't turn clear.

This transcript has been automatically generated and may not be 100% accurate.