Monday, September 20, 2021

272: The Mathematics of Jackie Mason

 Audio Link

Welcome to Math Mutation, the podcast where we discuss fun, interesting, or weird corners of mathematics that you would not have heard in school.   Recording from our headquarters in the suburbs of Wichita, Kansas, this is Erik Seligman, your host.  And now, on to the math.


To celebrate this month’s Jewish holidays, I thought it might be fun to talk about the legendary Jewish comedian Jackie Mason, who passed away recently at the age of 93.   Now you might be wondering what this topic has to do with math.   This episode was inspired by an intriguing quote that’s shown up in some of his online obituaries:      “The Talmud is the study of logic… Every time I see a contradiction or hypocrisy in somebody’s behavior, I think of the Talmud and build the joke from there.”   You may recall that before becoming a comedian, Mason studied to become a rabbi.   The Talmud, in case you’re not familiar with it, is the ancient book of Jewish law.    Could this book really be viewed as a study of logic?


To test this theory, I picked a joke I remembered from Mason’s show that I saw many years ago, and decided to see if I could relate it to formal logic in the Talmud.   This joke was referencing the battles in Israeli courts at the time, over the legitimacy of conversion to Judaism by various types of rabbis.    Here’s a paraphrase, as I remember it:   “The Israeli Supreme court finally made up its mind on the Jewish conversion laws.   If you were converted by an Orthodox rabbi, you’re a Jew.   If you were converted by a Conservative rabbi, you’re a half Jew.   If you were converted by a reform rabbi, you’re a Puerto Rican.”    In case you didn’t get the joke, it references the tensions among the many ethnic groups in New York City, which in the 20th century often put Jews and Puerto Ricans at odds with each other.   Trust me, it’s funny, though I can’t match Mason’s delivery!


Searching the Talmud for relevant quotes on this topic, I found an interesting one, discussing how to handle a candidate for conversion.   “If he accepts, we circumcise him at once… Two learned men stand nearby, reminding him of some of the easy mitzvot and some of the hard ones. As soon as he emerges and dries himself, he is an Israelite in all respects. “    This would seem to indicate that being Jewish after conversion is a binary value, of 0 or 1— you are or you aren’t.   Thus many proposals that came up in the conversion debate might be considered absurd, attempting to apply different degrees of Jewishness:  as defined by this quote, you’re Jewish as soon as the ritual is done.   So that joke might be said to be mocking the contradiction of attempting to assign fractions to a 0 or 1 value, and thus fall out of the logic of the Talmud.


Now, I’m not claiming to be a Talmudic scholar, so I could be way off here.   I did a bit more Google searching, and found that Mason was not alone:  there are many philosophers and logicians who do believe the Talmud makes extensive use of formal logic, though couched in confusing human-language phrases.   One example is a book by someone named Avi Sion, called “Logic in the Talmud”.    He points out that unlike many other religious books, rather than just pronouncing laws commanded from above, the Talmud often uses formal logical arguments to show why these laws must follow from earlier premises.    One common example is a fortiori arguments, which mainly work as follows:   Suppose we have two subjects, P and Q, which have some attribute R, and we want to find out if P also has a related attribute S.   If we agree that P has more of R than Q,  but Q has enough R to automatically possess S, then P must therefore also possess S.    As my cousin Ben David puts it, “ The humdrum example people are given of the principle is that if person P is stronger than person Q, and if person Q can lift a certain weight, then certainly person P can lift it.”


Now let’s look at one of the examples Sion points out in the Talmud, a debate over how much a woman should be shamed for offending God.   The Talmud says:  “If her father had but spit in her face, should she not hide in shame seven days? Let her be shut up without the camp seven days, and after that she shall be brought in again. ”   We should point out that this spitting in the face was meant to symbolize that the woman had offended her father somehow, though it probably would not be considered very appropriate on the father’s side these days.     Looking at the elements of the logic, in this case, the subjects P and Q are God and one’s father, and R is the amount of offensiveness.   If in a religious framework where you believe God is more important than any one human, certainly the idea of offending P contains more R, offensiveness, than offending Q.   Since offending Q produces punishment S, seven days’ worth of shame, certainly offending P should result in at least that much punishment as well.    So applying the formal logic does seem to produce the result here.


Anyway, as you can see, this does get a bit confusing.  It requires understanding both the cultural norms of the time— like the face-spitting— and a lot of previous context, like the established rules about shame for offending one’s family.   Thus we can see there may be some merit to observing that the Talmud actually does follow rules of logic to some degree, but with the need for a lot of human interpretation.    I’m not really into all this complex religious law stuff, but I am happy that Mason was able to successfully convert it into a bunch of great jokes.   


And this has been your math mutation for today.  




References:  





Friday, July 30, 2021

271: Too Much Testing

 Audio Link


Welcome to Math Mutation, the podcast where we discuss fun, interesting, or weird corners of mathematics that you would not have heard in school.   Recording from our new headquarters in Wichita, Kansas, this is Erik Seligman, your host.


Recently the infamous Elizabeth Holmes of Theranos has been in the news again, apparently filing new motions to delay her trial.   As you may recall, Theranos was the company that claimed to have developed powerful blood testing kits, which could run hundreds of standard medical tests at home on a single drop of blood.    It turned out that the invention just didn’t work, and Holmes was eventually charged with fraud as the company collapsed.    But not enough people have noticed that the lies about the science-fiction technology weren’t the only problems in Theranos’s basic concept.  We need to think about the flaws in their fundamental premise to “democratize” your health information.   This is the idea that average consumers should be encouraged to run lots of tests, for rare diseases or issues, on their own blood.    We especially need to pay attention now that numerous non-fraudulent companies, like the well-intentioned Everlywell, have entered this space.  


At first glance, the core concept sounds like an unmitigated benefit.    Why not let everyone run their own blood tests, without worrying about expensive doctors?    And there are good philosophical arguments why this should be allowed, as a matter of individual freedom, regardless of the mathematical issues I’m about to discuss.    (I won’t be getting into those arguments, as that’s beyond the scope of this podcast!)   But there is a key element of the math behind these tests that too many consumers are likely to overlook or be unaware of:   the fact that if a highly accurate test shows positive for an extremely rare disease, you probably DON’T actually suffer from that disease.

 

To make this more concrete, let’s assume there is a blood test which can, with 99% accuracy, determine if you suffer from the deadly virus of Math Madness, or MM; and in the general population, only one person out of every million has this disease.   You run the test, and it shows up positive.   You might intuitively think you are 99% likely to have MM.    However, let’s think about the total numbers here.   Out of every million people tested, only one has MM, due to its frequency in the population.   Yet with a 99% accurate test, 1% of the approximately 1 million healthy people, or 10,000 people, are going to incorrectly test positive.   So a given person who tests positive only has about a 1 in 10000 chance of carrying the disease.


How did our basic intuition fail us here?    The key problem is that we need to realize the conditional probability of A given B is quite different from the probability of B given A.   That 99% represents the probability of a positive test given that we have the disease, and the probability of a negative test given that we don’t have the disease.   But it doesn’t accurately measure the chance we have the disease given a positive test, the converse of what that 99% is about.   When we reverse the terms like that, we need to convert the probability using Bayes’ Theorem:  

P(A|B) = P(B|A)P(A)/P(B)

That P(A) term, or the prior probability of the condition being tested, is the key factor here that drastically cuts down the ultimate chance of having the disease.   For our MM example, that gives us .99 * (1/1000000)/(1/100), or approximately 1/10000.


Now you might point out that a false positive test is OK, as this is just an initial check to see if we should consult the doctor for more accurate testing and followup.   But the problem is that once the “easy” tests are out of the way, often much more intrusive, stressful, and life-altering testing and treatment is required.    This was brought home to me by an interesting poster I saw at my doctor’s office, provided by the US Preventative Services Task Force, on whether people under 70 should get PSA tests for prostate cancer.    Prostate cancer is an interesting case because, while deadly in the worst cases like all cancer, mild versions of it often do little harm and can be ignored.   The poster points out that out of every 1000 men given the PSA test, 1 death from prostate cancer will be prevented.   But:   240 of those men will initially test positive, and have to go through a painful biopsy.   Then 80 of them will, after testing positive at biopsy, go through long, painful (and unnecessary) courses of surgery or radiation treatment, after which 50 will permanently suffer erectile dysfunction, and 15 will suffer from permanent urinary incontinence.      So we’re 65x more likely to have really painful lifetime consequences than we are to save our life by taking the test.   It might still be worth it, but you really have to think hard.


Thus, ultimately, it often makes the most sense to avoid medical testing for rare conditions unless there is some overt symptom that causes your doctor to suspect an issue.    Otherwise the followup resulting from the test can actually provide many types of very negative patient outcomes.  This just naturally falls out of the common fallacy where people fail to apply Bayes’ Theorem, which requires that you factor in the prior probability of an event before you can properly interpret a test’s results.    Can average consumers be expected to understand these issues, and the reasons why running every possible test on your blood might not be the wisest course of action?   At the very least, I think companies entering this space should be very clear about the issue, and put up posters like the one at my doctor’s office, so their customers will approach the topic with their eyes open. 


And this has been your math mutation for today.  




References:  


https://www.uspreventiveservicestaskforce.org/Home/GetFileByID/3795 

https://en.wikipedia.org/wiki/Bayes%27_theorem

https://www.inc.com/christine-lagorio-chafkin/everlywell-democratizing-health-information.html 


Tuesday, June 15, 2021

270: Which Way To Turn

 Audio Link


Welcome to Math Mutation, the podcast where we discuss fun, interesting, or weird corners of mathematics that you would not have heard in school.   Recording from our new headquarters in Wichita, Kansas, this is Erik Seligman, your host.


Apologies for the long gap since the last episode— as you just heard, we have been relocating Math Mutation headquarters across the country.   You can probably guess that this involves lots of details to handle.   We should soon be back on our almost-regular monthly schedule.


Anyway, with all the moving stuff going on, I recalled a topic I had been considering a while back.   It’s a pretty simple geometry question, yet one with a major (if subtle) effect on all our lives:  why are screws generally right-handed?    If you’ve ever had to screw something together, you probably remember the saying “lefty loosey righty tighty’, which reflects the common design of these basic and universal tools.   Screws are typically considered one of the basic six “simple machines”, along with inclined planes, levers, pulleys, wedges, and wheels.   So why are they always designed to rotate in one direction?


With a quick web search, it seems almost unanimous that this convention simply derives from the typical handedness of humans:  if you’re right-handed, then a right-handed screw is easiest to screw in.    It’s just as easy to manufacture screws in either direction, but when they first became standardized (with the Whitworth design in 1841), a single design became ubiquitious.   I guess my poor left-handed daughter will forever be a victim of this society-wide conspiracy.   


But the more surprising fact I discovered when researching this topic is that left-handed screw threads do exist, and are used for a variety of specialized applications.    Perhaps the most obvious is for situations where the natural rotation of an object would tend to loosen a right-handed screw:  for example, the left-side pedals on a bicycle, certain lug nuts on the left side of cars, or connections that secure other machine parts that are rotating the wrong way.      There are also cases where it’s useful to couple a left-handed and a right-handed connection, in a pipe fitting for example, so rotation in a single direction helps connect at both ends.    A less obvious usage is for safety:   in many applications involving flammable gas lines, the connections for the gas line use left-handed rather than right-handed threads, so nobody connects the wrong pipe by accident.   


On the other hand, a few of the uses described just seemed kind of silly, though I suppose they were for valid reasons.    In the early 20th century, many lamps used in subways were specially designed to have bulbs that screw in with left-handed threads, so nobody could steal them and use them at home.   It’s probably a sign of our society’s growing prosperity over the last century that most people don’t steal public light bulbs anymore.    More bafflingly, I found a few references to the use of left-hand threads in early ballpoint pens, to provide a “secret method” of disassembly.   I guess business meetings were a lot less boring back then— given the amount of idle fiddling I’ve typically done with my pens on a normal day at work, I can’t imagine that secret lasting very long.   


And this has been your math mutation for today.  




References:  

Sunday, April 25, 2021

269: A Good Use of Downtime

 Audio Link

The recent observation of Holocaust Remembrance Day reminded me of one of the stranger stories to come out of World War II.    John Kerrich was a South African mathematician who made the ill-fated decision to visit some family members in Denmark in 1940 just before the Germans invaded, and soon found himself interned in a prison camp.    We should point out that he was one of the luckier ones, as the Germans allowed the Danes to run their prison camps locally, and thus lived in extremely humane conditions compared to the majority of prisoners in German-occupied territories,   But being imprisoned still left him with many hours of time to fill over the course of the war.     Kerrich decided to fill this time by doing some experiments to demonstrate the laws of probability.


Kerrich’s main experiment was a very simple one:   he and a fellow prisoner, Eric Chirstensen, flipped a coin ten thousand times and recorded the results.    Now you might scratch your head in confusion when first hearing this— why would someone bother with such an experiment, when it’s so easy for anyone to do at home?    We need to keep in mind that back in 1940, the idea that everyone would have a computer at home (or, as we now do, in their pocket) that they could use for seemingly endless numbers of simulated coin flips, would have seemed like a crazy sci-fi fantasy.    Back then, most people had to manually engage in a physical coin flip or roll a die to generate a random number, a very tedious process.      Technically there were some advanced computers under development at the time that could do the simulation if programmed, but these were being run under highly classified conditions by major government entities.   So recording the value of ten thousand coin flips actually did seem like a useful contribution to math and science at the time.


So, what did Kerrich accomplish with his coin flips?    The main purpose was to demonstrate the Law of Large Numbers.  This is the theorem that says that if you perform an experiment a large number of times, the average result will asymptotically approach the expected value.    In other words, if you have a coin that has 50-50 odds of coming up heads or tails, if you perform lots of trials, you will over time get closer and closer to 50% heads and 50% tails.   Kerrich’s coins got precisely 5,067 heads, and over the course of the experiment got closer and closer to the 50-50 ratio, thus providing reasonable evidence for the Law.    (In any 10000 flips, there is about an 18% chance that we will be off by at least this amount from the precise 50-50 ratio, so this result is reasonable for a single trial.)   


Of course, it might make sense to request another trial of 10000 flips to confirm, for improved confidence in the result.   But apparently even in prison you don’t get bored enough for that— in his book, Kerrich wrote, “A way of answering the… question would be for the original experimenter to obtain a second sequence of 10000 spins,   Now it takes a long time to spin a coin 10000 times, and the man who did it objects strenuously to having to take the trouble of preparing further sets.”


Kerrich and Christensen also did some other experiments along similar lines.    By constructing a fake coin with wood and lead, they created a biased coin to flip, and over the course of many flips demonstrated 70/30 odds for the two sides.   This experiment was probably less interesting because, unlike a standard coin, there likely wasn’t a good way to estimate its expected probabilities before the flips.   A more interesting experiment was the demonstration of Bayes’ Theorem using colored ping-pong balls in a box.   This theorem, as you may recall, helps us calculate the probability of an event when you have some knowledge prior conditions that affect the likelihood of each outcome.    The simple coin flip experiment seems to be the one that has resonated the most with reporters on the Internet though, perhaps because it’s the easiest to understand for anyone without much math background.


In 1946, after the end of the war, Kerrich published his book, “An Experimental Introduction to the Theory of Probability.”.    Again, while it may seem silly these days to worry about publishing experimental confirmation of something so easy to simulate, and which has been theoretically proven on paper with very high confidence anyway, this really did seem like a useful contribution in the days before widespread computers.    The book seems intended for college math students seeking an introduction to probability, and in it Kerrich goes over many basics of the field as demonstrated by his simple experiments.    If you’re curious about the details and the graphs of Kerrich’s results, you can read the book online at openlibrary.org, or click the link in our show notes at mathmutation.com .   Overall, we have to give credit to Kerrich for managing to do something mathematically useful during his World War II imprisonment.    


And this has been your math mutation for today.




References:  


Saturday, March 20, 2021

268: The Right Way to Gamble

Audio Link

At some point, you’ve probably heard an urban legend like this:   someone walks into a Las Vegas casino with his life savings, converts it into chips, and bets it all on one spin of the roulette wheel.    In the version where he wins, he walks out very wealthy.   But, in the more likely scenario where he loses, he leaves totally ruined.    This isn’t just an urban legend, by the way, but it has actually happened numerous times— for example, in 2004, someone named Ashley Revell did this with $135,000, and ended up doubling his money in one spin at roulette.    I most recently read about this incident in a book called “Chancing it:  The Laws of Chance and How They Can Work for You”, by Robert Matthews.   And Matthews makes the intriguing point that if you are desperate to significantly increase your wealth ASAP, and want to maximize the chance of this happening, what Revell did might not be entirely irrational.


Now, before we get into the details, I want to make it clear that I’m not recommending casinos or condoning gambling.    Occasionally while on vacation my wife & I will visit a casino, and here’s my foolproof winning strategy.    First you walk in, let yourself take in the dazzling atmosphere of the flashing lights, sounds, and excitement.    Then walk over to the bar, plop down ten bucks or so, and buy yourself a tasty drink.   Sit down at the counter, take out your smartphone, start up the Kindle app, and read a good book.   (The Matthews book might be a nice choice, linked in the show notes at mathmutation.com.)    Then relax in the comfortable knowledge that you’re ahead of the casino by one pina colada, which you probably value more than the ten dollars at that particular time.   Don’t waste time attempting any of the actual casino games, which always have odds that fundamentally are designed to make you you lose your money.


Anyway, getting back to the Revell story, let’s think for a minute about those rigged odds in a casino.   Basically, the expected value of your winnings, or the probability of winning each value times the amount of money, is always negative.   So, for example, let’s look at betting red or black in roulette.  This might seem like a low-risk bet, since there are two colors, and the payout is 1:1.   When you look closely at the wheel, though, you’ll see that in addition to the 36 red or black numbers, there are 2 others, a green 0 and 00.   Thus, if you bet on red, your chances of winning aren’t 18/36, but 18/38, or about 47.37%.   That’s the sneaky way the casinos get their edge in this case.   As a result, your expected winnings for each dollar you bet are around negative 5.26 cents.  This means that if you play for a large number of games, you will probably suffer a net loss of a little over 5% of your money.


So let’s assume that Revell desperately needed to double his money in one day— perhaps his stockbroker had told him that if he didn’t have $200,000 by midnight, he would lose the chance to invest in the Math Mutation IPO, and he couldn’t bear the thought of missing out on such a cultural milestone.   Would it make more sense for him to divide his money into small bets, say $1000, and play roulette 135 times, or gamble it all at once?   Well, we know that betting it all at once gave about a 47% chance of doubling it— pretty good, almost 50-50 odds, even though the casino still has its slight edge.   But if he had bet it slowly over 100+ games, then the chances would be very high that his overall net winnings would be close to the expected value— so he would expect to lose about 5% of his money, even if he put his winnings in a separate pocket rather than gambling them away.    In other words, in order to quickly double his money in a casino, Revell’s single bold bet really was the most rational way to do it.


And this has been your math mutation for today.




References:  

https://www.amazon.com/dp/B014RT1M1U/








Sunday, February 7, 2021

267: Free Will Isn't Free

 Audio Link

If you’ve browsed the web sometime in the last three decades, especially if you visit any New Age or philosophy websites, you’ve probably come across the argument that quantum mechanics proves the existence of free will.   Superficially, this seems somewhat plausible, in that quantum mechanics blows away our traditional idea that we can fully understand the future behavior of the universe based on observable properties of its particles and forces.   Free will seems like a nice way to fill in the gap.   But when you think about it in slightly more detail, there seems to be a fatal flaw in this argument.   So let’s take a closer look.


To start with, what is so special about quantum mechanics?   This is the area of physics, developed in the 20th century, that tries to explain the behaviors we observe in subatomic particles.   What’s bizarre about it is that according to its calculations, as Einstein stated, God is playing dice with the universe:  we can calculate probabilities of the position and momentum of particles, but not the exact values until we observe them.     For example, suppose I am throwing a toy mouse for my cat to catch.  Since this is a macroscopic object, classical physics works fine:  my cat can take out a calculator, and based on the force I throw with, the mass of the mouse, and the effects of gravity, he will be able to figure out exactly where to pounce.     But now suppose I am throwing a photon for him to catch.   Even if he knows everything that is theoretically knowable about my throw, he will not be able to calculate exactly where it will land— he can only calculate a set of probabilities, and then figure out where the photon went by observing it.    Of course, my cat uses the observation technique even with macroscopic mice, so no doubt he has read a few books on quantum physics and is trying to use the most generally applicable hunting method.


But how does this lead to free will?   The most common argument is that since things happen in the universe that cannot be precisely calculated from all the known properties of its particles and energies, there must be another factor that determines what is happening.   Many physicists seem to believe that a hidden physical factor has been largely ruled out.   That means the missing piece, according to the free will argument, is likely to be human consciousness.    When the activities of the particles in our brain could determine multiple possible outcomes, it is our consciousness that chooses which one will actually happen.    The quantum events in my brain, for instance, could lead with equal probability to me recording a podcast this afternoon, or playing video games.   My free will is needed to make the final choice.


Now time for the fundamental flaw in this argument.    Suppose the quantum activities in my brain do ultimately give me a 50% chance of recording a podcast this afternoon, and a 50% chance of playing videogames.   The implicit assumption in the free will argument is that if the properties of my brain determined completely that I would make a podcast this afternoon, then I would not have free will.   Since there are two alternatives and I have to choose one, there is free will.    However, remember that the quantum calculations provided an exact probability for each event, not just a vague uncertainty, and these probabilities have been well-confirmed in the lab.   If I’m required to roll a 6-sided die, and record the podcast if numbers 1-3 come up, or play videogames if 4-6 comes up, aren’t I just as constrained as if I were only allowed one of those options?   I still don’t get any freedom here.    Either way, it’s not a question of my consciousness, it’s just another calculation, though one whose result cannot be predicted.   If I’m forced to do certain things with known probabilities, that’s the opposite of free will.


There is one more wrinkle here though, which may rescue the free will argument.   Suppose we interpret the quantum calculation slightly differently.   Yes, there is a 50% chance of me recording the podcast, and 50% of playing a videogame.   But maybe this isn’t the universe rolling a die— maybe it’s a measure of the type of personality created by the sum total of quantum interactions in my brain.   So rather than being forced to roll a virtual die and decide, the universe has just built me into the kind of guy who, given a choice, would have a 50-50 chance of podcasting or gaming this afternoon.    All the quantum calculations about my brain activity are just figuring out the type of personality that has been created by its construction.   That argument rescues free will in the presence of quantum probabilities.   Though it does put us in the odd position of wanting to ascribe some kind of conscious will to subatomic particles observed in a physics lab, or to assume some hidden spirits in the room are making decisions for them.


So what’s the answer here?    Well, I’m afraid that as often happens with these types of questions, we will not resolve it in a 5-minute podcast.    You can also find some more subtle arguments that incorporate other aspects of quantum physics, though those don’t look too convincing to me either.   If humanity truly doesn’t have free will, I’ll look forward to the day when someone writes a treatise on how a large Big Bang of hydrogen atoms fundamentally leads to Math Mutation podcasts a few billion years later.


And this has been your math mutation for today.




References: