Deep Dive into Optimizing Marriage
For the hard-o's only.
Hello, fellow nerds. Here’s the deep dive into the Optimal Marriage Age Model, so you can know for certain I’m not a lying crackpot, but a well-supported crackpot.
How To Optimize
Remember, our goal is to find the optimal marriage age (the age that produces the highest marriage value), so, let’s first talk about optimization itself. How can we find the maximum (or minimum) of a function? With our dear friend, the derivative. The derivative of a function is its slope at any given point (aka Derivative = Slope). For example, I have the function:
The derivative of this function is:
I’m not going to show you how to do this^^, but you can google it in 30 seconds.
With my derivative, if I plug in x = 0, I get 6. So, when x =0, the slope of the graph is 6. This it looks something like this (the bright green line):
To find the max of a function, all I need to do is find the point (x=?) where the derivative (f’(x)) = 0. That would look like this (the special green line again):
Okay, so the steps to optimize once more:
1. Make a function f(x)
2. Take the derivative of that function
3. Set the derivative equal to 0.
4. Find the x that solves that equation.
And sham wow, I have the x value that produces the max/min y value.
Building A “Marriage Value” Function
The hardest part of this model was, of course, creating the function itself. The Y value I want to maximize is the “Value of the Marriage,” which I decided was equal to an individual’s sexual market value at time of marriage (on a scale of 0 to 1) plus the likelihood of their marriage succeeding. (For guys, I added in the gold digger avoidance piece as well.)
For women:
solution = a * smv_hoes + b * marriage_success_W
For men:
solution = a * smv_simps + b * marriage_success_M - c * gold_diggers
I could have multiplied these variables, divided them or done whatever else I wanted, and the results would change. I decided to just add them together, so I could play with the weights as I explained in the video.
In Python, there’s a really nifty function in the Numpy package called polyfit(). It allows you to read in a dataset, or (x,y) pairs and estimate a best fit function to the data. So, I inputted data and estimated a function for both sexual market value and marriage success, then added those two functions together for my final f(x).
For sexual market value, I used these twitter-famous charts to estimate a person’s relative attractiveness by age.
For marriage success rates, I found a sociology study that said marriage success rates increase by 11% for every year older the couple is (above 18) until the age of 32 where they begin to decrease by 9%. So, for example, two 25 year olds have an 11% higher chance of their marriage succeeding than two 24 year olds. But, a 33 year old couple has a 9% higher chance of their marriage failing than a 32 year old couple.
And then the gold digger data, I just made up with the assumption that as a man ages, he attracts more gold diggers. (Source: My Gigabrain)
Now for the fun part: simulations. I uploaded a file to my Github that you can download and play around with the weights of each variable in the model. Want to prioritize sexual market value by 10-fold? No problem, all you need to do is change what the weights (line 172-174) are set to. I have it blocked off as “#SIMULATION” in the code. You need a way to execute python to do this, so you could either use Jupiter Notebook online, or you could download an interface like Anaconda to your computer.
It will produce different plots so you can see how the marriage values change graphically as you weight different aspects of the model.
And if you still haven’t seen the video yet, it’s linked here:
Thanks so much for reading and watching, and if you haven’t yet, please subscribe so my kids won’t eat the bugs <3, have a good one!
-Commoner :)







For running Jupyter notebooks/python code whit out having to do any local setup, best thing I've found is Google Colab (free to use with any gmail account)
https://twitter.com/BowTiedSwan/status/1437863828625182721?s=20&t=AzWWVJHH9xnd0UqOT4kTcQ