Category Archives: geek logik

The 37 Percent Solution

Couple sitting on dock viewing calm sea by Fernanda Nuso via Unsplash - https://unsplash.com/photos/9YWwOWZ7LkI

The solution is 37%. But before we get too far ahead of ourselves, we should reveal the question we're answering. That question is "when should you get serious about finding that special someone to settle down with?"

Right now, that answer doesn't make sense, but it soon will. That solution is arrived at through the math of optimal stopping theory, which deals with the problem of finding the right match, whether that be for a new hire, an apartment, a parking spot, the love of your life, or for whatever you have to devote time and effort to learning about what you like most about the supply of available options. What you do is investigate the first 37% of those options without making any commitments, after which, you get serious. As soon as you find the first option that's as good as or better than the best option you previously passed on, you go all in on commitment.

Sounds pretty romantic, right? But how does that work for dating when you have no idea how many people you'll ever date in your lifetime?

Mathematician Hannah Fry suggests using time instead:

Say you start dating when you are 15 years old and would ideally like to settle down by the time you're 40. In the first 37 percent of your dating window (until just after your 24th birthday), you should reject everyone -- use this time to get a feel for the market and a realistic expectation of what you can expect in a life partner. Once the rejection phase has passed, pick the next person who comes along who is better than everyone who you have met before. Following this strategy will definitely give you the best possible chance of finding the number one partner on your imaginary list.

The assumption behind this suggestion is that you expect the first 37% of your prospective maximum dating life before settling down will be similar to what the remaining portion of it would be like. If you dated an average of X people per year in that first portion, you could reasonably expect you'll do the same until you finally find that special someone.

The following tool works out how long that might be for you, based on the ages you enter for when you start dating and the maximum age you intend to reach before meeting your optimal match according to this scheme. If you're reading this article on a site that republishes our RSS news feed, please click through to our site to access a working version of the tool!

Ages for Dating
Input Data Values
Age When You Start Dating
Maximum Age for Still Dating Before Settling Down

When Should You Get Serious?
Calculated Results Values
Cut-off Age for Non-Serious Dating

The tool's default scenario replicates the math for Dr. Fry's example, but you can set the ages to whatever applies for you. That said, you might be surprised at how soon the tool will suggest you need to get serious about finding your potential mate if you set a really low maximum age.

As a bonus, you can also use the tool for those other kinds of examples, such as finding a house, if you set 0 as the starting age and a value like 91 to represent three months worth of house hunting. In that case, you would have 34 days to sort out what your optimal housing solution looks like, but unlike real life dating, you would have the option of going back to one of your "exes". Assuming that optimal solution is still on the market....

Image credit: Photo by Fernanda Nuso on Unsplash.

Previously on Political Calculations

The Groundhog Day Stock Market Anomaly

Should you, as an investor, let a groundhog decide when to buy stocks in the U.S. stock market?

To many rational investors, that sounds completely crazy. But if you believe investors are irrational, and you happened to have seen a recent paper presented in Finance Research Letters, you might just consider it. Here's the conclusion from the paper by Savva Shanaev, Arina Shuraeva, and Svetlana Federova:

This study has discovered a new calendar anomaly on the United States stock market associated with the prognostications of Punxsutawney Phil on the Groundhog Day. Across 1928–2021, the S&P 500 substantially appreciated subsequent to Phil’s “prediction” of an early spring, while the returns were moderately negative after he “predicted” a long winter. The difference in buy-and-hold abnormal returns two weeks after the Groundhog Day is a statistically and economically significant 1.85%, establishing the importance of the Groundhog Day superstition to investor sentiment and market performance. There is a seemingly puzzling positive anticipation effect to an early spring prognostication equalling 1.14% over the two weeks prior to the announcement that implies either informed trading or, more likely, rational investors exploiting their awareness of the superstition and weather forecasts. The results are robust in subsamples, when controlled for a wide range of other calendar anomalies, as well as to time-varying risk premia and conditional heteroskedasticity.

The findings have implications for academics and stock market participants. For individual and institutional investors, this study has identified an exotic yet moderately profitable trading strategy. For empirical finance researchers, it has highlighted the nuanced idiosyncratic nature and persistence of calendar anomalies, showing that country-specific superstitions can have notable market specific effects. While some anomalies can have no explanations consistent with the efficient market hypothesis – like Friday the 13th effect or, indeed, the Groundhog Day effect established in this paper – they seem to exist, hence the market truly is that irrational.

In the study, the authors reviewed daily U.S. stock market data extended back to 1928, which includes 18 years in which Punxatawney Phil did not see his shadow, signaling both an early end to winter and an opportune time to invest in the U.S. stock market. That opportune time is defined as the period covering the 11 trading days preceding Groundhog Day (2 February) each year, through the 10 trading days following it.

We wanted to confirm their results for ourselves, so we tapped Yahoo! Finance's historical data for the S&P 500 (Index: SPX). This database contains daily trading data for the index beginning in January 1950, where the period since contains 17 of the 18 Groundhog Days where Punxatawney Phil did not see his shadow to predict an early spring. The following chart suggests Shanaev, Shuraeva, and Federova may be onto something....

The Groundhog Day Stock Market Anomaly, 1950-2021

For all years since 1950 where Punxatawny Phil saw his shadow, forecasting a long winter, the average value of the S&P 500 ten trading days after Groundhog Day was barely changed from its value eleven trading days before it. But in the 17 years where Punxatawny Phil did not see his shadow, predicting an early end to winter, the value of the S&P 500 rose an average 3.0% above its pre-Groundhog Day anomaly value.

So are you ready to start taking investing advice from the world's most famous groundhog? Before you do, you may want to consider the following video:

As with any scientific hypothesis, it takes only one bit of contrary evidence to debunk it. In this case, all we need to do is show that instead of being irrationally influenced by the weather prognostications of a burrowing rodent, investors in any one of the years in which Punxatawney Phil saw no shadow were instead motivated by rational considerations to bid up stock prices.

We chose 2020. The year the coronavirus pandemic would negatively impact the world's economy. The year that saw billions of people deal with the irrational fear of a deadly spreading virus amplified by responses of public officials that were often even more irrational. A year in which irrationality would seem to have abounded like no other in recent history!

The next chart shows how the S&P 500 evolved during 2020's Groundhog Day anomaly window, which covers the trading days from 16 January 2020 through 18 February 2020:

The Groundhog Day Stock Market Anomaly, 2020

So far, it seems to check the boxes for irrational behavior the Groundhog Day anomaly. We see Groundhog Day fell on a Sunday, so we set our Day 0 as Monday, 3 February 2020. We visually confirm that the preceding trading day of Friday, 1 February 2020 saw the S&P 500 bottom at 97.2% of its pre-anomaly window value. It began rising on 3 February 2020, proceeding to end the anomaly window period at 101.6% of its pre-anomaly period value after peaking at 101.9% on the seventh day after Groundhog Day.

But that doesn't consider what other information investors were considering during this period, much less what parts of that information were driving the stock market. For that, we tapped our own archives, where the clues to indicate investors were actually behaving very rationally were built into the headlines of our weekly recaps of the S&P 500's activity:

What we describe as a Lévy flight event corresponds to the decline of the index' value during the early part of the Groundhog Day anomaly window, which then combined with the realization that China's response to the epidemic would negatively affect the outlook for U.S. businesses. On 3 February 2020, U.S. stock prices rebounded slightly from that low based on strong U.S. manufacturing data with a small boost from tech stocks.

But what really caused stock prices to surge came on Tuesday, 4 February 2020, when China's central bank signaled they would initiate major stimulus programs to offset the negative economic impact of the spreading pandemic. The U.S. Federal Reserve also acted to boost liquidity in U.S. money markets at this time, but that was a much smaller act than the stimulus rolling out in China. U.S. stock prices remained elevated through the end of this period as Fed officials sought to boost confidence in the U.S. economy.

Most of that positive response would dissipate as the seriousness of the coronavirus pandemic became more apparent by the end of February 2020, but if you follow the links above to see the contemporary news headlines, there was nothing pointing to the prospects of an early spring that would affect the trajectory of the S&P 500 during the Groundhog Day anomaly window. Unless, of course, the Bank of China's officials took their policy direction from Punxatawney Phil. Whose 2020 weather prediction for an early srping also turned out to be wrong, as indicated by this late April 2020 photo....

Groundhog didn't like the late April snow (she was in the middle of nest building when it hit). by Ralph Katieb via Unsplash - https://unsplash.com/photos/feNoATv6r2M

The following video clip provides better advice for those irrational enough to follow the life advice of groundhogs:

Update: According to Punxatawny Phil, there will be no Groundhog Day-related stock market rally in 2022!

References

Savva Shanaev, Arina Shuraeva, Svetlana Federova. The Groundhog Day stock market anomaly. Finance Research Letters. DOI: 10.1016/j.frl/2021.102641. 22 December 2021.

Yahoo! Finance. S&P 500 Historial Prices. [Online Database]. Accessed 1 February 2022.

Image credit: Photo by Ralph Katieb on Unsplash

How Much Has Being in Lockdown Aged Your Relationship?

A year ago, the world went crazy with the onset of the coronavirus pandemic and the concept of a lockdown.

Covid Couple at Home - Chris Greene via Unsplash

Originally pitched as a 15-day solution to "slow the spread" of SARS-CoV-2 coronavirus infections by "flattening" the epidemic curve, government-imposed lockdowns became an ongoing fact of life for many around the world. Worse, they became the go-to policy for many public officials who used them to cover their inability to adapt to the pandemic's demands, week after week after week. At this writing, parts of the world are still going into COVID lockdowns, some for the third or fourth time since the start of the pandemic.

For couples, these lockdowns has meant spending a lot more time together than would have otherwise happened in a world without the coronavirus pandemic. Having their places of work closed by lockdowns forced many couples to work from home if they could. At the same time, the lockdown stay-at-home orders prevented them from visiting others or having guests. The end result is much more "together time" than anyone would have imagined before the pandemic.

But how much more time is that? And how does that compare to a year of time couples would have spent together in the pre-COVID world?

Questions like these led BBC presenter and Cambridge doctoral maths candidate Bobby Seagull to develop a formula to quantify how much more perceived together time couples have accumulated as a result of the lockdowns.

We've taken the math and built the tool below to do it, using data collected from a survey of 2,000 couples conducted by Groupon earlier this year as the default data. Substitute your own numbers as you might like to see how your relationship has relatively aged!

If you're accessing this tool on a site that republishes our RSS news feed, please click through to our site to access a working version. We'll have more comments below the tool....

Basic Investment Information
Input Data Values
Pre-pandemic average number of hours cohabiting couples spent together per year
Boredom Factor
Hours spent together as a couple during an average week (excluding weekends) during the pandemic
Number of weeks working from home together since the pandemic began
Hours spent together as a couple on an average weekend during the pandemic
Number of weekends since the pandemic began

How Much Has Being in Lockdown Aged Your Relationship?
Calculated Results Values
Lockdown "Dog Years" (How Much Older Your Relationship Seems)

Most of the data input items are very straightforward, but one represents a subjective judgement. The "Boredom Factor" represents how the lack of options for entertainment or away-from-home social gathering contributes to making time spent with your partner seem like more time is passing than is really the case. Which is to say that often being bored 'ages' your relationship.

In the tool, we've opted to make that factor a "Yes" or "No" proposition, where if you feel you've experienced the boredom factor, selecting "Yes" will double the amount of additional time you have spent together outside of what would have been the case before being locked down.

If you select this factor, the final answer then is the 'perceived' amount of time your relationship has aged, as a multiple of the time you would have had together without the pandemic. Not selecting it will give you an estimate of the actual number of equivalent pre-pandemic years the additional time spent together you have accumulated in lockdown.

All in all, the result is a number that, for most, will be the equivalent of multiple years of time together as a couple. A result of one, on the other hand, would mean that your time in lockdown went about the same as it would have in a pre-lockdown world.

Either way, it's an interesting way to approach the question, which is why we took on the project!

Image credit: Photo by Chris Greene on Unsplash

How To Avoid A Tangled Mess

If you've ever had to deal with a pair of earphones after they've become tangled, you know exactly what kind of mess they can make and what kind of pain they can be to untangle. Is there anything you can do about it?

Before we go any further, let's draw some lessons from science for how cords can almost spontaneously become tangled from the following video:

Now, let's get to the practical matter of finding out how likely your cords will become tangled. In the following tool, we've adapted the math developed by Dorian M. Raymer and Douglas E. Smith in their 2007 paper to calculate the probability that your cord/string/rope will become tangled, assuming that it is made of a medium-stiffness material, based upon its length. If you're reading this article on a site that republishes our RSS news feed, click here to access a working version of this tool!

Cord Length and Measurement Units
Input Data Values
Will You Be Entering the Cord Length in Centimeters Or Inches?
How Long Is The Cord?

What Are The Odds Your Cord Will Become Tangled?
Calculated Results Values
Probability of Tangles

If your cord has a relatively low probability of becoming knotted or tangled, say below 5 or 10%, you might not need to worry much about taking any special measures to keep it that way.

But, if you want to avoid the hassles that come from your cords becoming tangled, you might consider the suggestions from the video, using shorter, stiffer cords (if feasible) or getting smaller containers to store your longer cords (if not).

Meanwhile, if you're looking to learn more about knot theory, and yes, there is such a thing in maths, here's a quick introduction:

References

Raymer, Dorian M. and Smith, Douglas E. Spontaneous knotting of an agitated string. PNAS. October 16, 2007 104 (42) 16432-16437; https://doi.org/10.1073/pnas.0611320104. Note: For our tool, we corrected the L₀ parameter to be 1.025 after replicating the other parts of the authors' logistic function regression using the data presented in Figure 2, where our L₀ correction allowed us to replicate their reported probabilities for various cord lengths.



How Much Underwear Should You Pack on Vacation?

Public Domain Photo by Arnel Hasanovic on Unsplash - https://unsplash.com/photos/Nl-SXO4FAHw?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText

From time to time, Political Calculations takes on the challenge of answering questions that other blogs avoid. Whether that's due to fear on their part, where a sensitive topic may be too far out of their comfort zone, or just because they cannot, we see such challenges as an opportunity.

So let's talk about how much underwear you need to pack while you're traveling away from home. Not long ago, Ashley McIntosh of Brisbane, Australia's 97.3 FM radio posted the solution to a problem that we ourselves never appreciated existed. We'll let her explain....

Are you guilty of packing three times as many pairs of underwear as you could possibly need when travelling.

*Raises hand*

Or even worse... Not packing enough!?

Well never fear, this nifty new math equation is here to the rescue ladies.

And it seems pretty thorough.

Vacation Underwear Math

Karina Judd recently shared on Facebook group Meme Queens her saving grace.

Not just that, but she has also created a public Google doc excel spreadsheet so the math is all done for you!

That's all well and good, but what if you're packing in a rush right before leaving on your trip because you've procrastinated too long and you can no longer afford to take the time to fire up your personal computer to run Karina Judd's spreadsheet to calculate how many pairs of underwear you should pack?

That's the kind of niche market that we seek to serve here at Political Calculations, where we've brought Karina Judd's undie math into the world of online ready reckoners you can run on your mobile! Just enter the indicated data below, and we'll sort out how much underwear you should pack for your travel. [If you're accessing this article on a site that republishes our RSS news feed, please click through to our site to access a working version.]

Underwear Quantity Factors
Input Data Values
What is the minimum quantity of clean underwear that you wear per day?
How many days will you be traveling?
Do you have any gut concerns, such as Irritable Bowel Syndrome (IBS) or lactose intolerance?
If you expect it during your trip, what is the average heaviness of your period?
Have you had, or are you about to have a baby?

How Much Underwear You Should Pack
Calculated Results Values
Quantity

For the sake of simplicity, we've limited the tool to consider no more than a week-long vacation, where we've assumed you will not have access to clean underwear outside of what you pack (if you're traveling for longer than that, or have limited packing space, you might consider taking advantage of local options for doing laundry during your trip).

We've also generalized the math a bit, to make it more universally applicable. The original math in Karina Judd's spreadsheet was developed by Jess Evans, who considered a number of additional factors that could affect your underwear packing needs, such as the temperature of your destination, whether the drinking water is "dodgy", and whether you will be able to do laundry while traveling, where the spreadsheet can handle a much longer trip.

Previously on Political Calculations

Underwear math is far from the strangest problem we've built tools to solve! Here's a sampling of some of the other quirky problems we've tackled over time....