Should I stay or should I go? In every romantic relationship, there is a moment that you ask yourself, “Is it worth it?” Well, Rashied Amini, a NASA engineer with a broken heart, has the answer. He’s created a “Love Life Prediction Algorithm” — comparing your ‘bird in the hand’ with every bird that is still out there. Be warned; you might not like the answer his algorithm gives you.
You can check out Nanaya, the love forecasting app Rashied mentioned in the episode, and take the love prediction test to see what’s in store for your future!
Love numbers, charts, and graphs? Check out Rashied’s blog series on “How Long Will You Stay Single?” that explores how different aspects of your identity, lifestyle, and job will impact your dating outcomes.
Online dating has become one of the hottest trends for our generation. Mashable came up with 10 of the best dating sites for meeting people IRL.
Rashied Amini: Everything that exists, whether it's OkCupid, Match.com, eharmony, what have you, all they do is matchmaking. This is how compatible you are with someone else.
Cara Santa Maria: What they don't tell you is if there's a better option.
Rashied Amini: What I was doing in my algorithm was solving a completely different problem. It's, I am seeing someone, should I keep seeing them?
Cara Santa Maria: Rashied Amini is asking, "Should I stay or should I go?" Welcome to Fixed That For You, an original podcast from Segment about solving problems with data and algorithms. I'm Cara Santa Maria, and in this episode, we go looking for the algorithm of love.
Rashied Amini: These are economic models that I'm using but in the context of human decision-making.
Cara Santa Maria: It's the story of one man's attempt to save his own relationship.
Rashied Amini: I was sort of stumbling into depression.
Cara Santa Maria: And how that desperate effort might help thousands of people.
Rashied Amini: We can actually help decide if the relationship that they're in is going to give them the best outcomes.
Cara Santa Maria: Just a warning, you might not want to listen to this when your other half is in the room. It might get them thinking about something you don't want them to consider.
Rashied Amini: My dating life was, I think, fairly easy.
Cara Santa Maria: A few years ago, Rashied Amini was a single guy in his twenties living in LA.
Rashied Amini: I've had a fairly diverse set of experiences dating. In various long-term relationships, single for a while, so I've had a good set of experiences.
Cara Santa Maria: His career was going pretty well too. Working in mission formulation at NASA's Jet Propulsion Laboratory.
Rashied Amini: I was and still am a systems engineer. Before a mission gets built, before it gets proposed, someone has to think of, "Well, how do we actually get to Jupiter? Once we get there, what do we do?" Costing. So, how much does it cost to build a moon base or a Mars base to send everything there?
Cara Santa Maria: Rashied was busy doing cost-benefit analyses of interplanetary exploration. So busy, he relied on dating sites to meet women.
Rashied Amini: I had met someone off of OkCupid and the first date was amazing. What happened over the next two years, at the time, I thought was this perfect relationship, and mutually so. We both shared a passion for traveling, for art, for cooking. When you share a lot of these lifestyle elements, compatibility looks like it's there.
Cara Santa Maria: But over time, they came to see the relationship differently.
Rashied Amini: I was getting ready to propose actually. It was around that time she came out and said that she wanted to break up with me and she didn't really know why.
Cara Santa Maria: That's rough. So not really together, but also not single. Both trying to decide what to do next. Then Rashied's girlfriend said this.
Rashied Amini: She suggested that she wanted to do a cost-benefit analysis of our relationship.
Cara Santa Maria: That's kind of weird.
Rashied Amini: Well, I mean, my first reaction was to laugh. I could only imagine that a cost-benefit could've been something like, "Let's draw a line down the middle of the page and pros on one side, cons on the other, and let's see how they balance."
Cara Santa Maria: What she was really asking for was a reason to stay or a reason to go, but Rashied worked for NASA, not OkCupid.
Rashied Amini: For me, as the systems engineer, it goes back to first principles. You just have to sit down and sketch out your system and list all the different parameters available.
Cara Santa Maria: In his spare time, he applied this way of doing things to other areas of his life.
Rashied Amini: I'm someone who's always just had this academic interest whether it's in romance or psychology.
Cara Santa Maria: So he used that approach to try and save his relationship.
Rashied Amini: As a joke, I spent a weekend and I developed a prototype in Excel to present to her. Not to change her mind of anything, but to just sort of show in a reductive and absurd sort of way this is what this cost-benefit of romance looks like. Look at these many tabs of Excel and these rows of numbers. Is this love?
Cara Santa Maria: The spreadsheet contained an algorithm that analyzed the answers to a set of questions, a lot of questions, designed to elicit data about your romantic preferences.
Rashied Amini: How do people actually interact within their communities? This gives me an idea of, how many new people are you actually meeting every so often? If I know how many people within your community you're attracted to, I can predict, in time, the odds of finding someone compatible. One of the other things the tool asks is, how do you feel about being single?
Cara Santa Maria: That's important because if you end your relationship there's a chance you might be single for a while, and he had to assign a value to that.
Rashied Amini: I compare the utility of a relationship that you know that you're in with the potential utility of whether it's being in a single or being in a relationship.
Cara Santa Maria: He had stumbled onto something that online dating sites didn't touch.
Rashied Amini: The problem that they solved was matchmaking. How compatible are two people with one another?
Cara Santa Maria: That makes sense because shared values are the key to a lasting relationship, right? Well, Rashied's a little more cynical. Remember, should I stay or should I go?
Rashied Amini: For instance, I could be in a relationship with someone who's super compatible, but maybe I'm super compatible with a lot of people and I'm also happy just to be single. Then my algorithm would give an answer as to say, "Well, maybe you shouldn't be with them." That's very different than just to say, "Oh, you are compatible with your partner."
Cara Santa Maria: It's a logical approach, kind of what you'd expect from a NASA engineer, but really, he was just winging it.
Rashied Amini: Part of the reason that I did this was to give myself a distraction to not have to think about my heartbreak, my depression at the time, and it did its job very well.
Cara Santa Maria: But then it kind of became its own thing.
Rashied Amini: By the time I came up with, just like any other researcher, that became my passion. I want to see, does this idea actually work?
Cara Santa Maria: Rashied is actually tackling a classic math puzzle. These days it's called the stopping rule, but the original 1950s name, which is totally sexist, was the secretary problem. Here's how it works. You need to hire an assistant. You have a large number of candidates to interview one at a time, but as soon as you reject someone they leave and they never come back. The question is, how many people do you interview? At what point do you say, "This is the one"? The analogy to dating's simple. You date someone for a while and then once you reject them you really can't go back. At what point do you lock in your decision and when do you say, "No thanks," and call in the next candidate? To calculate this, Rashied needed to know two things, how valuable is your current relationship? That's the assistant you're interviewing now. And what are you dating prospects if you end this relationship? That's the quantity and quality of the people still waiting to be interviewed.
Rashied Amini: This is a canonical mathematical problem that I'm answering. The first thing I did was to go through the exercise on my own of actually testing the algorithm. As a physicist, we can think of boundary conditions. Instances that are really at the extreme, so put two really incompatible people together. My algorithm should say they shouldn't be together.
Cara Santa Maria: He made up hypothetical characters with extreme personalities and answered the algorithm's questions from their perspectives and it worked.
Rashied Amini: Just that alone surprised me. I expected it to break and for me to wash my hands of it, walk away, get back to research.
Cara Santa Maria: So he took it up a notch.
Rashied Amini: Then I was like, "Okay. Well, how about this? Let me get some friends to play with this." I would ask them questions and they would offer some answers. It was in my interpretation as the one offering this experience to put a number to these answers.
Cara Santa Maria: Rashied manually entered these numeric values into the spreadsheet. The algorithm then ran that data through a series of equations and the results would appear on a graph.
Rashied Amini: Sure enough, it predicted the romantic situation of one of my friends' ongoing romances pretty effectively. Actually, in a very spooky way, it predicted that they should divorce in about the same time they did.
Cara Santa Maria: Feeling pretty good about that, and I mean the predictive accuracy, not the breakup, he went looking for more data.
Rashied Amini: I put up ads on Craigslist. I met with people in coffee shops and they were happy to divulge their past experiences in a relationship.
Cara Santa Maria: He drank a lot of coffee and heard a lot of dating stories, and he kept manually entering the data into what was still an Excel spreadsheet.
Rashied Amini: By the time I finished this round of a couple dozen people that I sort of interviewed for this, it was able to predict all of the right outcomes and it gave me the confidence to go, "Okay. Well, now I should consider making this available to the public."
Cara Santa Maria: He set up a website and called it Nanaya. She's the Mesopotamian goddess of sexuality and warfare. You can make of that whatever you want, but that's what he chose, and then he started to refine his questions.
Rashied Amini: For demographics like, where do you live? I can just ask someone that. For values, so for instance, how do you feel about sex? How do you feel about your partner giving away their food for you to a homeless person? These things I can ask a user.
Cara Santa Maria: That's the easy stuff.
Rashied Amini: But it's very difficult to ask a user in a psychologically valid way, "How extroverted are you?"
Cara Santa Maria: No longer doing face-to-face interviews, Rashied came up against a common challenge for people who administer psychological questionnaires.
Monica O’Neal: There is a bias when it comes to people filing or answering these particular type of questionnaires.
Cara Santa Maria: That's Dr. Monica O’Neal . She's a clinical psychologist who also teaches at Harvard Medical School.
Monica O’Neal: For the most part, because there is this issue of likeability bias, it is hard sometimes for us to get accurate information for a self-report.
Cara Santa Maria: So Rashied re-wrote his questions again.
Rashied Amini: What you end up seeing is that this actually is fairly close to the more standard personality assessment used in academia, which is the Big Five assessment.
Cara Santa Maria: The Big Five are the personality traits with the most research backing. Openness to experience, conscientiousness, extroversion, agreeableness, and neuroticism. OCEAN. Except Rashied was using them to come up with a romantic personality assessment. In just a few months, his website Nanaya got 20,000 respondents to the new questionnaire, but that volume of data brought up a new challenge for Rashied.
Rashied Amini: Can we go from a framework where we're doing user-reported psychological values? Which is not valid, but it works. So will it work when we go to the more big data-driven valid psychological testing approach?
Cara Santa Maria: It was a much more rigorous test of his algorithm.
Rashied Amini: It ended up working pretty effectively. It gave us more confidence to go onto the next phase, which was actually to implement the algorithm into a webpage.
Rashied Amini: I'm the world's worst coder. There's a lot of people who will attest to that. I could barely code myself out of a wet paper bag. I programmed initially in Mathematica, being a good physicist, and once I got things to work in Mathematica then I started writing in Python.
Cara Santa Maria: The new data made his algorithm way more accurate. Initially, he could only assess each person individually, but with 20,000 other entries to consider, he could put their dating prospects in context.
Rashied Amini: Compatibility only tells you about your relationship with an individual, but you could be very compatible with someone but your outcomes could still be better not being with them as well, depending how more compatible you could be with strangers and how you feel about being single.
Cara Santa Maria: Dr. Monica O’Neal , the psychologist, has seen this mindset explode recently.
Monica O’Neal: Tinder, Match, even eharmony, Bumble, Hinge, all of these different things, even though they're touted as online dating services to help people get married, to meet their business model is to keep people on the sites. They want to keep people swiping, so they're not really interested in the business of helping people make really good matches and to grow relationships. They just want to introduce you to a wider pool and, unfortunately, what that does is that also makes people think that they have more options, and so with more options you tend to keep looking for another option.
Cara Santa Maria: The system's rigged so that those options appear more enticing.
Monica O’Neal: Online dating is still something that a person creates for themselves. It's an avatar. You choose the pictures that you want. You answer questions the way that you want. You're really not showing who you are and people are really not ... You're not really able to see who a person is.
Cara Santa Maria: Rashied's trying to cut through those illusions using data. He compares your demographics to qualities people are looking for and then also checks the availability of the qualities you say you're looking for.
Rashied Amini: A lot of this algorithm is actually analytical, meaning there are equations that you can write algebraically and these equations model behavior.
Cara Santa Maria: He borrowed the math from a model for something a bit scarier.
Rashied Amini: If you were to open an epidemiology textbook it'll tell you that infections grow in a population based on this algebraic equation. That'll give you an idea that you can use just an algebraic formula to propagate things in time.
Cara Santa Maria: Apparently, love spreads pretty much the same way as measles.
Rashied Amini: Let's just say you move to a new city like Vancouver. Now, if you move there immediately it may actually take you some amount of time for you to get on your feet and meeting people.
Cara Santa Maria: That's the incubation period of a disease.
Rashied Amini: But once you do you'll be meeting a lot of people.
Cara Santa Maria: And that's the outbreak.
Rashied Amini: But if you give it three years, five years, seven years that number of the new people you meet every few months goes down and goes down and goes down.
Cara Santa Maria: That's the post-pandemic phase. Just meeting lots of people won't make you happy, so the algorithm has to measure the value of all those potential relationships. For that, Rashied uses what mathematicians call a Monte Carlo simulation. Something which requires a lot of processing power.
Rashied Amini: You can have right now 10,000 relationships simultaneously. They all start right now. What is the average quality of your happiness five years into all of these simulated relationships? This gives me an idea of your outcome if you were to be single and starting to date random people throughout this period of being single.
Cara Santa Maria: If your answers to the survey indicate that you don't meet many new people, the utility of leaving your current relationship will be lower, but, and this is where the depth of the dataset comes into play, if you have characteristics that other people have listed as desirable in their surveys then the utility will go up. Better data equals better results, and the data were now flowing in.
Rashied Amini: 300,000 users that have come and tried Nanaya. The results we can offer people are then improving in accuracy in their description of those populations.
Cara Santa Maria: It's also global.
Rashied Amini: As I started getting a lot more data I'm able to simply look at my database and identify, how compatible are you to specific communities? For instance, if you take the distribution of extraversion in Los Angeles it may be very different than that of Washington D.C. or Rio de Janeiro. I'm now able to look at all of my data for entire populations to say that I would stand a much better chance of dating in the state of New York than in, I don't know, Washington state or something.
Cara Santa Maria: Rashied had one last hurdle, how to deliver all this insight to people in a way that would make sense.
Rashied Amini: This is where you have a physicist who is trying to design what everyone wants to read about, their love life mathematically computed. It was probably a lot of overkill. There was six pages of results, but really the heart of it is, what are the odds in time of finding love or a match, someone who's compatible or a perfect match? In the next seven years, how many times are you likely to find love?
Cara Santa Maria: It even has a cool graph that shows your chance of finding love as it trends over time, but for everyone, there's a time where that starts to fall off.
Rashied Amini: That's the point where your utility of being single falls below the utility of any possible relationship you can be in.
Cara Santa Maria: Think of that as your sell-by date. That point on the graph is the solution to the stopping rule. The question of when to stop interviewing and hire the person in front of you. Now, a theoretical mathematician will tell you it's always 37% of the total number of people you could date in your life. If your 20 years old and you want to settle down before you're 30 and you date five people a year, that's 50 possible partners in the next 10 years. 37% of that is 18.5, so you should date and reject about 18 people then continue dating but lock in the first candidate that's better than all those 18 previously rejected candidates. The math says that gives you a little better than a one in three chance of ending up with the best person. But Rashied's solution is based on data specific to your situation, so he hopes his results will improve on that percentage.
Rashied Amini: The only thing I can really promise is just a look into the future. If you act your life out in the way that you expressed it to me, then this is what your future is probably going to look like.
Cara Santa Maria: Nanaya promises to help thousands of people improve their love lives, but remember, its original goal was much simpler.
Rashied Amini: I started this whole process thinking this was just an elaborate joke. I was doing this to show my then girlfriend if you take this to its extreme this is absurd. But in doing this joke I found out that the joke was on me, and actually it worked better than I expected.
Cara Santa Maria: Which brings us back to where we started, Rashied and his girlfriend pondering the utility of their relationship.
Rashied Amini: We actually used it together to give an answer.
Cara Santa Maria: It's a pretty nerdy form of courtship, but he was a desperate man.
Rashied Amini: Based on the results at the time it gave us an answer, which we both felt was correct.
Cara Santa Maria: But, there's always a but.
Rashied Amini: But that wasn't necessarily the answer that we lived with. She was just as deeply in love as I was, but she had this sort of conflict that she wasn't able to emotionally resolve.
Cara Santa Maria: After all that work, Rashied and his girlfriend broke up. Rashied Amini: That devastated me.
Cara Santa Maria: Yeah, relationships are complicated, even for a NASA engineer with an algorithm for love.
Cara Santa Maria: Okay, that's it for this episode of Fixed That For You, a podcast by Segment about big problems solved with data and algorithms. If you want to find out more about Rashied's story, check out the show notes. Try his algorithm at nanaya.co and you can find us at segment.com/podcast. Plus, subscribe at Apple Podcasts, Google Podcasts, Spotify, or wherever you do that sort of thing. We drop a new episode every two weeks. I'm Cara Santa Maria. Thanks for listening.