As I consider some possible major changes to life, this blog is in hiatus (has been for a while).
That's a hiatus for thinking, not a hiatus in thinking.
Non-work posts by Jose Camoes Silva; repurposed in May 2019 as a blog mostly about innumeracy and related matters, though not exclusively.
Saturday, May 6, 2017
Saturday, March 25, 2017
Reality vs nonsensical products (part 688 of Aleph-null)
Via Thunderf00t, I found this Waterseer-wannabe, which is about as feasible as the original Waterseer, that is not at all.
Obviously it's very important that the product is 3D-printed, rather than CNC-machined or heat-molded. 3D-printers, like the Internet Of Things, are magical incantations that can get around the laws of Physics. Or so one would think, given how credulous people become at the sound of these incantations.
Alas, as is usual with engineering, ugly numbers murder beautiful illusions:
Since the battery voltage is 12V, a 12kW Peltier effect cooler will require a 1000A current, which is likely to make Li-ion battery a bit... well, just watch what happens:
Engineering rule: when an electronic device starts outgassing, that's generally not a good thing.
Obviously it's very important that the product is 3D-printed, rather than CNC-machined or heat-molded. 3D-printers, like the Internet Of Things, are magical incantations that can get around the laws of Physics. Or so one would think, given how credulous people become at the sound of these incantations.
Alas, as is usual with engineering, ugly numbers murder beautiful illusions:
Since the battery voltage is 12V, a 12kW Peltier effect cooler will require a 1000A current, which is likely to make Li-ion battery a bit... well, just watch what happens:
Engineering rule: when an electronic device starts outgassing, that's generally not a good thing.
Labels:
Engineering,
Numbers,
science
Wednesday, March 22, 2017
The power of "equations"
If a picture is worth a thousand words, an equation is worth a thousand pages of text.
This was inspired by a livestream about free trade based on criticism of "original texts." (Basically Ricardo and Schumpeter.) The quotes aren't a diss on the texts themselves, but rather a way to emphasize that this is a type of scholarly pursuit in itself, though not the type used in modern economics, STEM, or pragmatic professional fields like business analytics or medicine.
What's the problem with the argumentation from these original texts? Simply put, the texts are long and convoluted, with many unnecessary diversions and some logical problems in the presentation. The valid arguments in these texts can be condensed in about one page of stated assumptions and two results about specialization.
It's not just that math's an efficient way to communicate, math has precise meaning and an inference process. It brings discipline and clarity to the texts and the inference process isn't open to debate. (Checks and corrections, yes; debate, no.)
Unfortunately, without math, the speaker's argument was essentially a sequence of variations on "Schumpeter points out that this assumption of Ricardo doesn't hold true," without the extra step of determining whether those assumptions are important to the final result or not. (We'll come back to this problem.)
Word-thinking about quantitative fields is generally to be avoided.
That was the inspiration, and this post isn't about free trade or the particular mode of thought of that speaker, but rather about the power of mathematical modeling, which I'm calling "equations" in the title.
Here's a reasonably robust statement: when the price of a commodity goes up, people buy less of that commodity. (Sometimes this is put as "demand goes down," which is incorrect, it's the demand quantity that goes down. Changes in demand are movements of an entire function.)
So, quantity is a decreasing function of price (and first-time readers of economics textbooks get confused because the charts have quantity in the $x$ axis and price in the $y$ axis). This has been known for a long time; what's the problem with that formulation, simplified to "when price rises, quantity falls"?
The problem, of course, is that there are many different types of decreasing function. Here are a few, for example (click for bigger):
Functions 1 to 4 represent four common behaviors of decreasing functions: the linear function has similar changes leading to similar effects; the convex function has decreasing effect of similar change (like most natural decay processes); the concave function has increasing effect of similar change (like the accelerating effect of a bank run on bank reserves); and the s-shaped function shows up in many diffusion processes (and is a commonly used price response function in marketing).
Functions 5 to 8 are variations on the convex function, showing increasing curvature. (Function 2 would fit between 5 and 6.) They're here to make the point that even knowing the general shape isn't enough: one must know the parameters of that shape.
That figure does have 2000 data points, since each function has 250 points plotted. (When talking about math, some people use drawing tools to make their "functions," I prefer to plot them from the mathematical formula; it's a habit of mine, not lying to the audience.) To describe them in text would take a long time (unless the text is a description of mathematical formulation), while they can be written simply as formulas; for example, the convex functions are all exponentials:
$\qquad y = 100 \, \exp(-\kappa \, x) $
with different values of $\kappa$. They are the type of exponential decay found in many processes, for example, where $x$ is time and $y(x) = \alpha \, y(x-1)$ with $y(0)>0$ models a process of decay with discrete-time rate $0 < \alpha < 1$. In case it's not obvious, $\kappa = -\log_{e}(\alpha)$.*
So, what does this have to do with reasoning?
Here we go back to the problem with arguments like "Schumpeter showed that Ricardo's assumption X was wrong." When a model is written out in equations, we have a sequence of steps leading to the result, each step tagged with either a know result, rules of math inference (say "$a \times b = a \times c$ simplifies to $b = c$ unless $a = 0$"), or an assumption of the model. This allows a reader to quickly see where a failed assumption will lead to problems and determine whether the assumption can be replaced with something true (or, as is the case with many of the assumptions made by Ricardo, is unnecessary for the result).
The main power, however, is that mathematical notation forces the speaker to be precise, and inferences from mathematical models can be checked independently of subject matter expertise. A mathematician may not understand any of the economics involved, but will merrily check that a decay process of the kind $y(n)= \alpha \, y(n-1)$ can be described by an equation $y(n) = y(0) \, \exp(-\kappa \, n)$ and determine the relationship between $\kappa$ and $\alpha$.
From those precise models, one can make inferences that take into account details hidden by language. Consider the "price rises, quantity falls" text and compare it with the different decreasing functions in the figure above. The shape of the function, its slope and its curvature have different implications for how price changes affect a market, differences that are lost in the "price rises, quantity falls" formulation.
It bears repeating the first mentioned advantage: that hundreds of pages can be condensed in one page of equations. Once one's mind is used to processing equations, this is a very efficient way to learn new things. Stories about Port wineries in Portugal and textile factories in England may be entertaining, but they aren't necessary to understand specialization (which is what comparative advantage really is).
Math. It's a superpower mostly anyone can acquire. Sadly, most opt not to.
- - - - - Addendum - - - - -
No self-respecting economist would use the Ricardo comparative advantage argument for international trade now, particularly because it's so simple it can be understood by anyone. Most likely they'd use some variation of the magic factory example:
"Let's say a new technology that converts corn into cars is discovered and a factory is built in Iowa that can take ~ $\$20,000$ of corn and convert it into a car that costs $\$30,000$ to make in Michigan. Can we agree that this technology makes the US richer?
Now, move the factory to Long Beach, CA. Maybe there's a little more cost in moving the corn there, but we're still making the US richer, right?
Now, someone goes into the magic factory and discovers that it's really a depot: stores grain until it's sent to China on bulk carriers and receives cars made in China from RoRos during the night. The effect is the same as the magic factory, so it makes the US richer, right?"
There are many cons to this example, but it does make one issue clear: trade is in many respects just like a different technology.
- - - - - Footnote - - - - -
* It's obvious to me, because after decades of playing around with mathematical models, I grok most of these simple things. There are some people who mistake this well-developed and highly available knowledge (from practice) for ultra-high intelligence (rather than regular very high intelligence), a mistake I elaborate upon in this post. 😎
This was inspired by a livestream about free trade based on criticism of "original texts." (Basically Ricardo and Schumpeter.) The quotes aren't a diss on the texts themselves, but rather a way to emphasize that this is a type of scholarly pursuit in itself, though not the type used in modern economics, STEM, or pragmatic professional fields like business analytics or medicine.
What's the problem with the argumentation from these original texts? Simply put, the texts are long and convoluted, with many unnecessary diversions and some logical problems in the presentation. The valid arguments in these texts can be condensed in about one page of stated assumptions and two results about specialization.
It's not just that math's an efficient way to communicate, math has precise meaning and an inference process. It brings discipline and clarity to the texts and the inference process isn't open to debate. (Checks and corrections, yes; debate, no.)
Unfortunately, without math, the speaker's argument was essentially a sequence of variations on "Schumpeter points out that this assumption of Ricardo doesn't hold true," without the extra step of determining whether those assumptions are important to the final result or not. (We'll come back to this problem.)
Word-thinking about quantitative fields is generally to be avoided.
That was the inspiration, and this post isn't about free trade or the particular mode of thought of that speaker, but rather about the power of mathematical modeling, which I'm calling "equations" in the title.
Here's a reasonably robust statement: when the price of a commodity goes up, people buy less of that commodity. (Sometimes this is put as "demand goes down," which is incorrect, it's the demand quantity that goes down. Changes in demand are movements of an entire function.)
So, quantity is a decreasing function of price (and first-time readers of economics textbooks get confused because the charts have quantity in the $x$ axis and price in the $y$ axis). This has been known for a long time; what's the problem with that formulation, simplified to "when price rises, quantity falls"?
The problem, of course, is that there are many different types of decreasing function. Here are a few, for example (click for bigger):
Functions 1 to 4 represent four common behaviors of decreasing functions: the linear function has similar changes leading to similar effects; the convex function has decreasing effect of similar change (like most natural decay processes); the concave function has increasing effect of similar change (like the accelerating effect of a bank run on bank reserves); and the s-shaped function shows up in many diffusion processes (and is a commonly used price response function in marketing).
Functions 5 to 8 are variations on the convex function, showing increasing curvature. (Function 2 would fit between 5 and 6.) They're here to make the point that even knowing the general shape isn't enough: one must know the parameters of that shape.
That figure does have 2000 data points, since each function has 250 points plotted. (When talking about math, some people use drawing tools to make their "functions," I prefer to plot them from the mathematical formula; it's a habit of mine, not lying to the audience.) To describe them in text would take a long time (unless the text is a description of mathematical formulation), while they can be written simply as formulas; for example, the convex functions are all exponentials:
$\qquad y = 100 \, \exp(-\kappa \, x) $
with different values of $\kappa$. They are the type of exponential decay found in many processes, for example, where $x$ is time and $y(x) = \alpha \, y(x-1)$ with $y(0)>0$ models a process of decay with discrete-time rate $0 < \alpha < 1$. In case it's not obvious, $\kappa = -\log_{e}(\alpha)$.*
So, what does this have to do with reasoning?
Here we go back to the problem with arguments like "Schumpeter showed that Ricardo's assumption X was wrong." When a model is written out in equations, we have a sequence of steps leading to the result, each step tagged with either a know result, rules of math inference (say "$a \times b = a \times c$ simplifies to $b = c$ unless $a = 0$"), or an assumption of the model. This allows a reader to quickly see where a failed assumption will lead to problems and determine whether the assumption can be replaced with something true (or, as is the case with many of the assumptions made by Ricardo, is unnecessary for the result).
The main power, however, is that mathematical notation forces the speaker to be precise, and inferences from mathematical models can be checked independently of subject matter expertise. A mathematician may not understand any of the economics involved, but will merrily check that a decay process of the kind $y(n)= \alpha \, y(n-1)$ can be described by an equation $y(n) = y(0) \, \exp(-\kappa \, n)$ and determine the relationship between $\kappa$ and $\alpha$.
From those precise models, one can make inferences that take into account details hidden by language. Consider the "price rises, quantity falls" text and compare it with the different decreasing functions in the figure above. The shape of the function, its slope and its curvature have different implications for how price changes affect a market, differences that are lost in the "price rises, quantity falls" formulation.
It bears repeating the first mentioned advantage: that hundreds of pages can be condensed in one page of equations. Once one's mind is used to processing equations, this is a very efficient way to learn new things. Stories about Port wineries in Portugal and textile factories in England may be entertaining, but they aren't necessary to understand specialization (which is what comparative advantage really is).
Math. It's a superpower mostly anyone can acquire. Sadly, most opt not to.
- - - - - Addendum - - - - -
No self-respecting economist would use the Ricardo comparative advantage argument for international trade now, particularly because it's so simple it can be understood by anyone. Most likely they'd use some variation of the magic factory example:
"Let's say a new technology that converts corn into cars is discovered and a factory is built in Iowa that can take ~ $\$20,000$ of corn and convert it into a car that costs $\$30,000$ to make in Michigan. Can we agree that this technology makes the US richer?
Now, move the factory to Long Beach, CA. Maybe there's a little more cost in moving the corn there, but we're still making the US richer, right?
Now, someone goes into the magic factory and discovers that it's really a depot: stores grain until it's sent to China on bulk carriers and receives cars made in China from RoRos during the night. The effect is the same as the magic factory, so it makes the US richer, right?"
There are many cons to this example, but it does make one issue clear: trade is in many respects just like a different technology.
- - - - - Footnote - - - - -
* It's obvious to me, because after decades of playing around with mathematical models, I grok most of these simple things. There are some people who mistake this well-developed and highly available knowledge (from practice) for ultra-high intelligence (rather than regular very high intelligence), a mistake I elaborate upon in this post. 😎
Labels:
economics,
math,
mathematics,
model-building,
models,
thinking
Tuesday, March 7, 2017
Deep understanding and problem solving
There's value in deep understanding.
Nope, I don't mean the difference between word thinkers and quantitative thinkers. Been there, done that. Nor the difference between different levels of expertise on technical matters; again, been there, done that.
No, we're talking the crème de la crème, experts that can adapt to changing situations or comprehend complexity across different fields, by being deep understanders.
Because any opportunity to mock those who purport to educate the masses by passing along material they don't understand, let us talk about Igon Values... ahem, eigenvalues and eigenvectors.
Taught in AP math classes or freshman linear algebra, the eigenvectors $\mathbf{x}_{i}$ and associated eigenvalues $\lambda_{i}$ of a square matrix $\mathbf{A}$ are defined as the solutions to $\mathbf{A} \, \mathbf{x}_{i} = \lambda_{i} \, \mathbf{x}_{i}$.
Undergrads learn that these represent something about the structure of the matrix, learn that the matrix can be diagonalized using them, how they appear in other places (principal components analysis and network centrality, for example).
But those who get to use these and other math concepts on a day-to-day basis, who get to really understand them, develop a deeper understanding of the meaning of the concepts. There's something important about how these objects relate to each other.
After a while, one realizes that there are structures and meta-structures that repeat across different problems, even across different fields. Someone said that after a lot of experience in one engineering (say, electrical), adapting to another (say, mechanical) revealed that while the nouns changed, the verbs were very similar.
This is what deep understanding affords: a quasi-intuitive grokking of a field, based on the regularities of knowledge across different fields.
For example: while many who have taken a linear algebra in college may vaguely recall what an eigenvalue is, those who understand the meaning of eigenvalues and eigenvectors for matrices will have a much easier time understanding the eigenfunctions of linear operators:
The structure [something that operates] [something operated upon] = [constant] [something operated upon] is common, and what it means is that the [something operated upon] is in some sense invariant with the [something that operates], other than the proportionality constant. That suggests that there's a hidden meaning or structure to the [something that operates] that can be elicited by studying the [something operated upon].
And this structure, mathematical as it might be, has a lot of applications outside of mathematics (and not just as a mathematical tool for formalizing technical problems). It's a basic principle of undestanding: what is invariant to a transformation tells us something deep about that transformation. (Again, invariant in "direction," so to speak, possibly a change of size or even sign.)
And this is itself a meta-principle: that the study of what changes and what's invariant in a particular set of problems gives some indications about latent structure to that set of problems. That latent structure may be a good point to start when trying to solve problems from this set.
Yep, really dumbing down this blog, pandering to the public...
Nope, I don't mean the difference between word thinkers and quantitative thinkers. Been there, done that. Nor the difference between different levels of expertise on technical matters; again, been there, done that.
No, we're talking the crème de la crème, experts that can adapt to changing situations or comprehend complexity across different fields, by being deep understanders.
Because any opportunity to mock those who purport to educate the masses by passing along material they don't understand, let us talk about Igon Values... ahem, eigenvalues and eigenvectors.
Taught in AP math classes or freshman linear algebra, the eigenvectors $\mathbf{x}_{i}$ and associated eigenvalues $\lambda_{i}$ of a square matrix $\mathbf{A}$ are defined as the solutions to $\mathbf{A} \, \mathbf{x}_{i} = \lambda_{i} \, \mathbf{x}_{i}$.
Undergrads learn that these represent something about the structure of the matrix, learn that the matrix can be diagonalized using them, how they appear in other places (principal components analysis and network centrality, for example).
But those who get to use these and other math concepts on a day-to-day basis, who get to really understand them, develop a deeper understanding of the meaning of the concepts. There's something important about how these objects relate to each other.
After a while, one realizes that there are structures and meta-structures that repeat across different problems, even across different fields. Someone said that after a lot of experience in one engineering (say, electrical), adapting to another (say, mechanical) revealed that while the nouns changed, the verbs were very similar.
This is what deep understanding affords: a quasi-intuitive grokking of a field, based on the regularities of knowledge across different fields.
For example: while many who have taken a linear algebra in college may vaguely recall what an eigenvalue is, those who understand the meaning of eigenvalues and eigenvectors for matrices will have a much easier time understanding the eigenfunctions of linear operators:
The structure [something that operates] [something operated upon] = [constant] [something operated upon] is common, and what it means is that the [something operated upon] is in some sense invariant with the [something that operates], other than the proportionality constant. That suggests that there's a hidden meaning or structure to the [something that operates] that can be elicited by studying the [something operated upon].
And this structure, mathematical as it might be, has a lot of applications outside of mathematics (and not just as a mathematical tool for formalizing technical problems). It's a basic principle of undestanding: what is invariant to a transformation tells us something deep about that transformation. (Again, invariant in "direction," so to speak, possibly a change of size or even sign.)
And this is itself a meta-principle: that the study of what changes and what's invariant in a particular set of problems gives some indications about latent structure to that set of problems. That latent structure may be a good point to start when trying to solve problems from this set.
Yep, really dumbing down this blog, pandering to the public...
Sunday, February 26, 2017
Deepwater Horizon: Movie not-a-review
- The beginning gives an idea of how much infrastructure supports offshore exploration and the number of different companies and support industries involved. Maybe this will reduce the "nuclear energy needs a lot of additional infrastructure" comments; I'm not optimistic, though, because those comments are born of ignorance and fear.
- Casting is phenomenal and the actors portray accurately the type of worker one finds in dangerous, rough, hard jobs. Props to John Malkovich who plays the quintessential John Malkovich villain, with additional villainy and a southern accent.
- A scene I thought was "too Hollywood," when Wahlberg runs across a burning rig to start the emergency generators and save the day (well, within possible), is actually true. It actually happened, pretty much the way they showed in the movie.
- Kudos for the minimal "character development," a disease that has made many other movies unwatchable. There was some, obviously, but the movie kept to the story and focussed on the main action (first the decisions leading up to the accident, then the evacuation of the rig).
- Instead of "you should really care about this person because they have a family and lost their dog when they were little"-type "character development," we get credible interactions among human beings (which humanize them a lot more than that usual pap) and an accurate depiction of the culture in heavy industry, epitomized by: Wahlberg (about the skipped cement test): "Is that stupid?" Roughneck: "I don't know if that's stupid... but it ain't smart."
- The class demonstration that Wahlberg's daughter is preparing in the kitchen foreshadows the blowout, but it's a bit Hollywood: the complexity of what happened is beyond the movie and in fact the movie has a lot of situations where it's clear the writers decided to move forward without trying to explain what was happening (it's a movie, after all, not a training film for petroleum engineers).
- For all the entertainment value of the movie, and the educational points one may take away from it, there were 11 fatalities, a large number of injuries, and an ecological disaster involved. So, it was nice of the producers to include the final vignettes commemorating the losses.
Now, to the hard nerditude.
I heard of the incident at the Macondo well (that's the correct name for the location, the Deepwater Horizon is the drilling rig) when it happened and for a while the news were, as usual, full of uninformed speculation, name-calling, mentions of Halliburton (always a good villain for certain parts of the population) and greed, and attacks on fossil fuels.
Not being a petroleum engineer, I assumed that (a) everything the media said was either wrong or very wrong; (b) at some point there would be smart and knowledgeable people looking at this; and (c) reports from these smart and knowledgeable people would be put online, as a prelude to the many many many lawsuits to come.
So, when a friend bought the movie (friends with kids are great: they buy movies that I can borrow), I borrowed it and in a moment of extra nerdiness decided to learn something about the Macondo/Deepwater Horizon incident before watching the movie.
I struck gold with Stanford University:
I had a general idea about how drilling works, but the details are quite important. This video was very helpful:
Being an engineer, I went to the reports too. The easiest to read is the report to the President. Having read the report helped situate the movie, since a few of the important events are not in it (some are referred to in passing):
Halliburton simulated a specific cementing plan for the well, but the actual cementing did not follow that plan. In particular, because of the tight window of usable pressures for the cementing, the cementing pipe had to be centered accurately in the hole using more spacers than were actually used. Halliburton isn't mentioned in the movie because (a) they are scary and have lots of lawyers; or (b) they didn't do what they had simulated, on orders from BP, which makes it BP's responsibility.
Schlumberger (Sch-loom-bear-g-heh, which a roustabout calls Schlam-burger to mock Wahlberg's correct pronunciation) was on site to conduct a test of the cement and see if it had set, but as the action on the movie arrives on the rig, the testing team is leaving without running the test (what happened in reality). There's no doubt that the cementing failed, since that's where the oil and gas got into the pipe and eventually the riser to the surface, so in retrospect that test would have saved the rig and well.
Unmentioned in the movie is the large quantity of highly viscous plugging fluid used as a spacer between the cement and the drilling mud, which might have blocked the narrow pipes of the kill line and shown the zero pressure when there was in fact pressure. This is the part in the movie when the writers gave up, decided that giving an impromptu course in deep-water drilling to the audience was not their job, and moved forward into the actual action.
The most unbelievable scene in the movie, when Wahlberg runs across essentially a field of giant exploding flamethrowers (the burning rig) to start the backup diesel generators, is actually true. The rig was all electrically-operated, including the thrusters; without electricity they had no lights, no PA, and lost control of the rig (it moved off-station enough that it pulled the drill string through the blowout preventer and possibly disabled parts of the blowout preventer that would have cut the pipe and sealed the well).
Watching the movie, I found it difficult to believe that Transocean management, especially HR, was okay with 1 woman and 125 men on a 21-day rotation on a drilling rig, but that is apparently accurate (maybe a few more women, but overwhelming majority of people on the rig were men). The potential for lawsuit-inducing behavior just seemed too high.
All in all, I think that the movie was much more fun to watch having read the report and watched the videos beforehand than it would have been otherwise. I would have been thinking about the discrepancy between the drill pipe and kill line pressure and the blowout preventer failure till the end of the movie, so I would have missed the emotional and action-loaded last thirty minutes.
The Wahlberg/Rodriguez jump was all Hollywood, though.
Update April 5, 2017: the problems in the blowout preventer.
Friday, February 24, 2017
If it's a math problem... do the math
Or, The Monty Hall problem: redux.
I recently posted a new video, addressing the Monty Hall problem. The problem is not the puzzle itself, which has been solved ad nauseam by everyone and their vlogbrother.
The video is about what information is. By working through the details of the Monty Hall puzzle, we can learn where information is revealed and how. That is the reason for the video; that and a plea for something so simple and yet so ignored that I'll repeat it again:
If it's a math problem, do the math.
Now, this may seem trivial, but math (and to some extent science, technology, and engineering, to say nothing of business, management, and economics) makes people uncomfortable, even people who say they "love math."
Hence the attempt to solve the problem with anything but computation. By waving hands and verbalizing (very error prone) or by creating similar problems that might be insightful (but mostly convince only those who already know the solution and understand it).
If all you're interested is the computations for the solution, they're here:
The point of the video is not this particular table; it's the insights about information on the path to it: how constraints to actions change probabilities and how those relate to information.
For example, from the viewpoint of the contestant, once she picks door 1 (thus giving Monty Hall a choice of door 2 and door 3 to open), the probability that Monty picks either door 2 or door 3 is precisely 1/2; that's calculated in the video, not assumed and not hand-waved. But, as the video then explains, that 50-50 probability isn't equally distributed across different states:
A final remark, from the video as well, is that by having computations one can avoid many time-wasters, who --- not having done any computations themselves and generally having a limited understanding of the whole state-event difference, which is essential to reasoning with conditional probabilities --- are now required to point out where they disagree with the computation, before moving forward with new "ideas."
If it's a math problem... do the math!
I recently posted a new video, addressing the Monty Hall problem. The problem is not the puzzle itself, which has been solved ad nauseam by everyone and their vlogbrother.
The video is about what information is. By working through the details of the Monty Hall puzzle, we can learn where information is revealed and how. That is the reason for the video; that and a plea for something so simple and yet so ignored that I'll repeat it again:
If it's a math problem, do the math.
Now, this may seem trivial, but math (and to some extent science, technology, and engineering, to say nothing of business, management, and economics) makes people uncomfortable, even people who say they "love math."
Hence the attempt to solve the problem with anything but computation. By waving hands and verbalizing (very error prone) or by creating similar problems that might be insightful (but mostly convince only those who already know the solution and understand it).
If all you're interested is the computations for the solution, they're here:
The point of the video is not this particular table; it's the insights about information on the path to it: how constraints to actions change probabilities and how those relate to information.
For example, from the viewpoint of the contestant, once she picks door 1 (thus giving Monty Hall a choice of door 2 and door 3 to open), the probability that Monty picks either door 2 or door 3 is precisely 1/2; that's calculated in the video, not assumed and not hand-waved. But, as the video then explains, that 50-50 probability isn't equally distributed across different states:
A final remark, from the video as well, is that by having computations one can avoid many time-wasters, who --- not having done any computations themselves and generally having a limited understanding of the whole state-event difference, which is essential to reasoning with conditional probabilities --- are now required to point out where they disagree with the computation, before moving forward with new "ideas."
If it's a math problem... do the math!
Sunday, February 12, 2017
Word Thinkers and the Igon Value Problem
Nassim Nicholas Taleb did it again: "word thinkers," now a synonym for his previous coinage IYI (Intellectuals Yet Idiots).
To not rehash the Heisenberg traffic stop example, here's one from a recent discussion of the putative California secession from the US (and already mentioned in this blog): people discussed California's need for electricity, with the pro-Calexit people assuming that appropriate capacity could be added in a jiffy, while the con-Calexit people assumed the state would instantly be blacked out.
No one thought of actually looking up the numbers and checking out the needs. Using 2015 numbers, California would need to add about 15GW of new dispatchable generation for energy independence, assuming no demand growth. (Computations in this post.) So, that's a lot, but not unsurmountable in, say, a decade with no regulatory interference. Maybe even less time, with newer technologies (yes, all nuclear; call it a French connection).
There was no advanced math in that calculation: literally add and divide. And the data was available online. But the "word thinkers" didn't think about their words as having meaning.
And that's it: the problem is not so much that they think in words, but rather that they don't associate any meaning to the words. They are just words, and all that matters is their aesthetic and signaling value.
Few things exemplify the problem of these words-without-meaning as well as The Igon Value Problem.
In a review of Malcolm Gladwell's collection of essays "What the dog saw and other adventures" for The New York Times, Steven Pinker coined that phrase, picking on a problem of Gladwell that is common to the words-without-meaning thinkers:
Being a purveyor of "generalizations that are banal, obtuse or flat wrong" hasn't harmed Gladwell; in fact, his success has spawned a cottage industry of what Taleb is calling word-thinkers, which apparently are now facing an impending rebellion.
Taleb talks about 'skin in the game,' which is a way to say, having an outside validator: not popularity, not social signaling; money, physical results, a verifiable mathematical proof. All of these come with the one thing word-thinkers avoid:
A clear succeed/fail criterion.
- - - - - - - - - -
Added 2/16/2017: An example of word-thinking over quantitative matters.
From a discussion about Twitter, motivated by their filtering policies:
That's the problem with word thinking about quantitative matters: those who take the extra quant step will always have the advantage. As far as truth and logic are concerned, of course.
I often say that a mathematician thinks in numbers, a lawyer in laws, and an idiot thinks in words. These words don’t amount to anything.A little unfair, though I've often cringed at the use of technical words by people who don't seem to know the meaning of those words. This sometimes leads to never-ending words-only arguments about things that can be determined in minutes with basic arithmetic or with a spreadsheet.
To not rehash the Heisenberg traffic stop example, here's one from a recent discussion of the putative California secession from the US (and already mentioned in this blog): people discussed California's need for electricity, with the pro-Calexit people assuming that appropriate capacity could be added in a jiffy, while the con-Calexit people assumed the state would instantly be blacked out.
No one thought of actually looking up the numbers and checking out the needs. Using 2015 numbers, California would need to add about 15GW of new dispatchable generation for energy independence, assuming no demand growth. (Computations in this post.) So, that's a lot, but not unsurmountable in, say, a decade with no regulatory interference. Maybe even less time, with newer technologies (yes, all nuclear; call it a French connection).
There was no advanced math in that calculation: literally add and divide. And the data was available online. But the "word thinkers" didn't think about their words as having meaning.
And that's it: the problem is not so much that they think in words, but rather that they don't associate any meaning to the words. They are just words, and all that matters is their aesthetic and signaling value.
Few things exemplify the problem of these words-without-meaning as well as The Igon Value Problem.
In a review of Malcolm Gladwell's collection of essays "What the dog saw and other adventures" for The New York Times, Steven Pinker coined that phrase, picking on a problem of Gladwell that is common to the words-without-meaning thinkers:
An eclectic essayist is necessarily a dilettante, which is not in itself a bad thing. But Gladwell frequently holds forth about statistics and psychology, and his lack of technical grounding in these subjects can be jarring. He provides misleading definitions of “homology,” “sagittal plane” and “power law” and quotes an expert speaking about an “igon value” (that’s eigenvalue, a basic concept in linear algebra). In the spirit of Gladwell, who likes to give portentous names to his aperçus, I will call this the Igon Value Problem: when a writer’s education on a topic consists in interviewing an expert, he is apt to offer generalizations that are banal, obtuse or flat wrong. [Emphasis added]Educational interlude:
Eigenvalues of a square $[n\times n]$ matrix $M$ are the constants $\lambda_i$ associated with vectors $x_i$ such that $M \, x_i = \lambda_i \, x_i$. In other words, these vectors, called eigenvectors, are along the directions in $n$-dimensional space that are unchanged when operated upon by $M$; the $\lambda_i$ are proportionality constants that show how the vectors stretch in that direction. Because of this $n$-dimensional geometric interpretation, the $x_i$ are the matrix's "own vectors" (in German, eigenvectors) and by association the $\lambda_i$ are the "own values" (in German, you guessed it, eigenvalues).
Eigenvectors and eigenvalues reveal the deep structure of the information content of whatever the matrix represents. For example: if $M$ is a matrix of covariances among statistical variables, the eigenvectors represent the underlying principal components of the variables; if $M$ is an incidence matrix representing network connections, the eigenvector with the highest eigenvalue ranks the centrality of the nodes in the network.This educational interlude is a demonstration of the use of words (note that there's no actual derivation or computation in it) with deep meaning, in this case mathematical.
Being a purveyor of "generalizations that are banal, obtuse or flat wrong" hasn't harmed Gladwell; in fact, his success has spawned a cottage industry of what Taleb is calling word-thinkers, which apparently are now facing an impending rebellion.
Taleb talks about 'skin in the game,' which is a way to say, having an outside validator: not popularity, not social signaling; money, physical results, a verifiable mathematical proof. All of these come with the one thing word-thinkers avoid:
A clear succeed/fail criterion.
- - - - - - - - - -
Added 2/16/2017: An example of word-thinking over quantitative matters.
From a discussion about Twitter, motivated by their filtering policies:
Person A: "I wonder how long Twitter can burn money, billions/yr. Who is funding this nonsense?"
My response: "Actually, from latest available financials, TWTR had a $\$ 77$ million positive cash flow last year. Even if its revenue were to dry up, the operational cash outflow is only $\$ 220$ million/year; with a $\$ 3.8$ billion cash-in-hand reserve, it can last around 17 years at zero inflow."Numbers are easy to obtain and the only necessary computation is a division. But Person A didn't bother to (a) look up the TWTR financials, (b) search for the appropriate entries, and (c) do a simple computation.
That's the problem with word thinking about quantitative matters: those who take the extra quant step will always have the advantage. As far as truth and logic are concerned, of course.
Tuesday, February 7, 2017
Schrödinger's Cat Litter
"Quantum mechanics means that affirmations change the reality of the universe."Really, there are people who believe in that nonsense. I don't know whether affirmations work as a psychological tool (ex: to deal with depression or addiction), though I've been told that they might have a placebo effect. But I do know that quantum mechanics has nothing to do with this New Age nonsense.
The most misunderstood example: Schrödinger's cat
A common thread of the nonsense uses Schrödinger's cat example and goes something like this:
"There's a cat in a box and it might be alive or dead due to a machine that depends on a radioactive decay. Because of quantum mechanics, the cat is really alive and dead at the same time; it's the observer looking at the cat that makes the cat become dead or alive. The observer creates the reality."No, really, this is a pretty good summary of how the argument goes in most discussions. It's also complete nonsense. The real Schrödinger's cat example is quite the opposite (note the highlighted parts):
(Source: translation of Schrödinger's "Die gegenwärtige Situation in der Quantenmechanik," or "The current situation in quantum mechanics.")
As the excerpt shows, Schrödinger himself described applying quantum uncertainty to macroscopic objects as "ridiculous." In fact, in the original paper, Schrödinger calls it burlesque:
In other words, this New Age nonsense takes Schrödinger's example of misuse of a quantum concept and uses it as the foundation for some complete nonsense, doing precisely the opposite of the point of that example.
Sometimes "nonsense" isn't strong enough a descriptor, and references to bovine effluvium would be more appropriate. In honor of the hypothetical cat, I'll refer to this as Schrödinger's cat litter.
Say his name: Heisenberg (physics, not crystal meth)
Schrödinger isn't the only victim of these cat litter purveyors: the Heisenberg Uncertainty Principle also gets distorted into nonsense like:
"You can't observe the position and the momentum of an object at the same time. If you're observing momentum, you're in the flow. If you're observing position, you're no longer in the flow."As I've mentioned before, when over-analyzing a Heisenberg joke, the uncertainty created by Heisenberg's inequality ($\Delta p \times \Delta x \ge h$) for macroscopic objects is many orders of magnitude smaller than the instruments available to measure it. TL;DR:
Police officer: "Sir, do you realize you were going 67.58 MPH?
Werner Heisenberg: "Oh great. Now I'm lost."
Heisenberg's uncertainty re: his position is of the order of $10^{-38}$ meters, or about 1,000,000,000,000,000,000,000,000,000,000,000,000 times smaller than an inch.And yet, these New Age cat litter purveyors use the Heisenberg uncertainty principle to talk about human actions and decisions, as if it was applicable to that domain.
What are the "defenders of science" doing while this goes on?
Ignorance, masquerading as erudition, sold to rubes who believe they're enlightened. Hey, I'm sure many of the rubes "love science" (as long as they don't have to learn any).
Meanwhile, "science popularizers" spend their time arguing politics. Because that's what science is now, apparently...
Thursday, February 2, 2017
Primal entertainment
Really, totally primal. 😉
Ron Rivest talking about RSA-129 (a product of two prime numbers that was set as a factoring challenge in 1977) and its factorization in 1994 using the internet:
RSA-129 = 114381625 7578888676 6923577997 6146612010 2182967212 4236256256 1842935706 9352457338 9783059712 3563958705 0589890751 4759929002 6879543541
Inspired by that video, here are a couple of fun numbers, for numbers geeks:
😎 70,000,000,000,000,000,000,003 is a prime number. It's an interesting prime number, because the number of zeros in the middle (21) is the product of the 7 and the 3, both of which are, of course, prime numbers themselves. This makes the number very easy to memorize and surprise your friends with. If you want to confuse them, just say it like this: "seventy sextillion and three."
😎 99,999,999,999,999,999,999,977 is also a prime number, the largest prime number under a googol ($10^{100}$) that has the form $p = 10^{n} - n$, with $n = 23$, meaning that if you add 23 to this number you get $10^{23}$ or a 1 followed by 23 zeros. Here's how you say this number: "ninety-nine sextillion, nine hundred ninety-nine quintillion, nine hundred ninety-nine quadrillion, nine hundred ninety-nine trillion, nine hundred ninety-nine billion, nine hundred ninety-nine million, nine hundred ninety-nine thousand, and nine hundred seventy-seven." Hilarious at parties.
Ron Rivest talking about RSA-129 (a product of two prime numbers that was set as a factoring challenge in 1977) and its factorization in 1994 using the internet:
RSA-129 = 114381625 7578888676 6923577997 6146612010 2182967212 4236256256 1842935706 9352457338 9783059712 3563958705 0589890751 4759929002 6879543541
=
3490 5295108476 5094914784 9619903898 1334177646 3849338784 3990820577
$\times$
32769 1329932667 0954996198 8190834461 4131776429 6799294253 9798288533.
Inspired by that video, here are a couple of fun numbers, for numbers geeks:
😎 70,000,000,000,000,000,000,003 is a prime number. It's an interesting prime number, because the number of zeros in the middle (21) is the product of the 7 and the 3, both of which are, of course, prime numbers themselves. This makes the number very easy to memorize and surprise your friends with. If you want to confuse them, just say it like this: "seventy sextillion and three."
😎 99,999,999,999,999,999,999,977 is also a prime number, the largest prime number under a googol ($10^{100}$) that has the form $p = 10^{n} - n$, with $n = 23$, meaning that if you add 23 to this number you get $10^{23}$ or a 1 followed by 23 zeros. Here's how you say this number: "ninety-nine sextillion, nine hundred ninety-nine quintillion, nine hundred ninety-nine quadrillion, nine hundred ninety-nine trillion, nine hundred ninety-nine billion, nine hundred ninety-nine million, nine hundred ninety-nine thousand, and nine hundred seventy-seven." Hilarious at parties.
Labels:
Cryptography,
fun,
math,
Nerds,
STEM
Saturday, January 28, 2017
Learning, MOOCs, and production values
Some observations from binge-watching a Nuclear Engineering 101 course online.
Yes, the first observation is that I am a science geek. Some people binge-watch Kim Cardassian, some people binge-watch Netflix, some people binge-watch sports; I binge-watch college lectures on subjects that excite me.
(This material has no applicability to my work. Learning this material is just a hobby, like hiking, but with expensive books instead of physical activity.)
To be fair, this course isn't a MOOC; these are lectures for a live audience, recorded for students who missed class or want to go over the material again.
The following is the first lecture of the course, and to complicate things, there are several different courses from UC-Stalingrad with the same exact name, which are different years of this course, taught by different people. So kudos for the laziness of not even using a playlist for each course. At least IHTFP does that.
(It starts with a bunch of class administrivia; skip to 7:20.)
Production values in 2013, University of California, Berkeley
To be fair: for this course. There are plenty of other UC-Leningrad courses online with pretty good production values. But they're usually on subjects I already know or have no interest in.
Powerpoint projections of scans of handwritten notes; maybe even acetate transparencies. In 2013, in a STEM department of a major research university. Because teaching is, er…, an annoyance?
Learning = 1% lecture, 9% individual study, 90% practice.
As a former and sometimes educator, I don't believe in the power of lectures without practice, so when the instructor says something like "check at home to make sure that X," I stop the video and check the X.
For example, production of a radioactive species at a production rate $R$ and with radioactive decay with constant $\lambda$ is described by the equation at the top of the highlighted area in the slide above and the instructor presents the solution on the bottom "to be checked at home." So, I did:
Simple calculus, but makes for a better learning experience. (On a side note, using that envelope for calculations is the best value I've received from the United frequent flyer program in years.)
This, doing the work, is the defining difference between being a passive recipient of entertainment and an active participant in an educational experience.
Two tidbits from the early lectures (using materials from the web):
Binding energy per nucleon explains why heavy atoms can be fissioned and light atoms can be fused but not the opposite (because the move is towards higher binding energy per nucleon):
The decay chains of Uranium $^{235}\mathrm{U}$ and Thorium $^{232}\mathrm{Th}$:
Unfair comparison: The Brachistochrone video
It's an unfair comparison because the level of detail is much smaller and the audience is much larger; but the production values are very high.
Or maybe not so unfair: before his shameful (for MIT) retconning out of the MIT MOOC universe, Walter Lewin had entire courses on the basics of Physics with high production values:
(I had the foresight to download all Lewin's courses well before the shameful retconning. Others have posted them to YouTube.)
Speaking of production values in education (particularly in Participant-Centered Learning), the use of physical props and audience movement brings a physicality that most instruction lacks and creates both more immersive experience and longer term retention of the material. From Lewin's lecture above:
Yes, the first observation is that I am a science geek. Some people binge-watch Kim Cardassian, some people binge-watch Netflix, some people binge-watch sports; I binge-watch college lectures on subjects that excite me.
(This material has no applicability to my work. Learning this material is just a hobby, like hiking, but with expensive books instead of physical activity.)
To be fair, this course isn't a MOOC; these are lectures for a live audience, recorded for students who missed class or want to go over the material again.
The following is the first lecture of the course, and to complicate things, there are several different courses from UC-Stalingrad with the same exact name, which are different years of this course, taught by different people. So kudos for the laziness of not even using a playlist for each course. At least IHTFP does that.
(It starts with a bunch of class administrivia; skip to 7:20.)
Production values in 2013, University of California, Berkeley
To be fair: for this course. There are plenty of other UC-Leningrad courses online with pretty good production values. But they're usually on subjects I already know or have no interest in.
Powerpoint projections of scans of handwritten notes; maybe even acetate transparencies. In 2013, in a STEM department of a major research university. Because teaching is, er…, an annoyance?
The professor points out that there's an error in the slide, that the half-life of $^{232}\mathrm{Th}$ is actually $1.141 \times 10^{10}$ years, something that he could have corrected before the class (by editing the slide) but decided to say it in class instead, for reasons...?
The real problem with these slides isn't that handwriting is hard to read or that use of color can clarify things; it's the clear message to the students that preparing the class is a very low priority activity for the instructor.
A second irritating problem is that the video stream is a recording of the projection system, so when something is happening in the classroom there's no visual record.
For example, there was a class experiment measuring the half-life of excited $^{137}\mathrm{Ba}$, with students measuring radioactivity of a sample of $^{137}\mathrm{Cs}$ and doing the calculations needed to get the half-life (very close to the actual number).
For the duration of the experiment (several minutes), this is all the online audience sees:
Learning = 1% lecture, 9% individual study, 90% practice.
As a former and sometimes educator, I don't believe in the power of lectures without practice, so when the instructor says something like "check at home to make sure that X," I stop the video and check the X.
For example, production of a radioactive species at a production rate $R$ and with radioactive decay with constant $\lambda$ is described by the equation at the top of the highlighted area in the slide above and the instructor presents the solution on the bottom "to be checked at home." So, I did:
Simple calculus, but makes for a better learning experience. (On a side note, using that envelope for calculations is the best value I've received from the United frequent flyer program in years.)
This, doing the work, is the defining difference between being a passive recipient of entertainment and an active participant in an educational experience.
Two tidbits from the early lectures (using materials from the web):
Binding energy per nucleon explains why heavy atoms can be fissioned and light atoms can be fused but not the opposite (because the move is towards higher binding energy per nucleon):
The decay chains of Uranium $^{235}\mathrm{U}$ and Thorium $^{232}\mathrm{Th}$:
(Vertical arrows are $\alpha$ decay, diagonals are $\beta$ decay.)
Unfair comparison: The Brachistochrone video
It's an unfair comparison because the level of detail is much smaller and the audience is much larger; but the production values are very high.
Or maybe not so unfair: before his shameful (for MIT) retconning out of the MIT MOOC universe, Walter Lewin had entire courses on the basics of Physics with high production values:
(I had the foresight to download all Lewin's courses well before the shameful retconning. Others have posted them to YouTube.)
Speaking of production values in education (particularly in Participant-Centered Learning), the use of physical props and audience movement brings a physicality that most instruction lacks and creates both more immersive experience and longer term retention of the material. From Lewin's lecture above:
Wednesday, January 25, 2017
Not all people who "love science" are like that
Yes, yet another rant against the "I Effing Love Science" crowd.
Midway through a MOOC lecture on nuclear decay I decided to write a post about production values in MOOCs (in my case not really a MOOC, just University lectures made available online). Then, midway through that post, I started to refine my usual "people who love science" vs "people who learn science" taxonomy; this post, preempting the MOOC post, is the result. Apparently my blogging brain is a LIFO queue (a stack).
Nerd, who, me?
I've posted several criticisms of people who "love science" but never learn any (for example here, here, here, and here; there are many more); but there are several people who do love science and therefore learn it. So here's a diagram of several possibilities, including a few descriptors for the "love science but doesn't learn science" crowd:
The interesting parts are the areas designated by the letters A, B, and C. There's a sliver of area where people who really love science don't learn science to capture the fact that some people don't have the time, resources, or access necessary to learn science, even these days. (In the US and EU, I mean; for the rest of the world that sliver would be the majority of the diagram, as many people who would love science have no access to water, electricity, food, let alone libraries and the internet.)
Area A is that of people who love science and learn it but don't make that a big part of their identity. That would have been the vast majority of people with an interest in science in the past; with the rise of social media, some of us decided to share our excitement with science and technology with the rest of the world, leading to area B.
People in area B aren't the usual "I effing love science" crowd. First, they actually learn science; second, their sharing of the excitement of science is geared towards getting other people to learn science, while the IFLS crowd is virtue signaling.
People in area C are those who learn science for goal-oriented reasons. They want to have a productive education and career, so they choose science (and engineering) in order to have marketable skills. They might have preferred to study art or practice sports, but they pragmatically de-prioritize these true loves in favor of market-valued skills.
As for the rest, the big blob of IFLS people, I've given them enough posts (for now).
- - - - -
Note 1: the reason to follow real scientists and research labs on Twitter and Facebook is that they post about ongoing research (theirs and others'), unlike professional popularizers who post "memes" and self-promotion. Or complete nonsense --- only to be corrected by much smarter and incredibly nice Destin "Smarter Every Day" Sandlin:
Midway through a MOOC lecture on nuclear decay I decided to write a post about production values in MOOCs (in my case not really a MOOC, just University lectures made available online). Then, midway through that post, I started to refine my usual "people who love science" vs "people who learn science" taxonomy; this post, preempting the MOOC post, is the result. Apparently my blogging brain is a LIFO queue (a stack).
Nerd, who, me?
I've posted several criticisms of people who "love science" but never learn any (for example here, here, here, and here; there are many more); but there are several people who do love science and therefore learn it. So here's a diagram of several possibilities, including a few descriptors for the "love science but doesn't learn science" crowd:
The interesting parts are the areas designated by the letters A, B, and C. There's a sliver of area where people who really love science don't learn science to capture the fact that some people don't have the time, resources, or access necessary to learn science, even these days. (In the US and EU, I mean; for the rest of the world that sliver would be the majority of the diagram, as many people who would love science have no access to water, electricity, food, let alone libraries and the internet.)
Area A is that of people who love science and learn it but don't make that a big part of their identity. That would have been the vast majority of people with an interest in science in the past; with the rise of social media, some of us decided to share our excitement with science and technology with the rest of the world, leading to area B.
People in area B aren't the usual "I effing love science" crowd. First, they actually learn science; second, their sharing of the excitement of science is geared towards getting other people to learn science, while the IFLS crowd is virtue signaling.
People in area C are those who learn science for goal-oriented reasons. They want to have a productive education and career, so they choose science (and engineering) in order to have marketable skills. They might have preferred to study art or practice sports, but they pragmatically de-prioritize these true loves in favor of market-valued skills.
As for the rest, the big blob of IFLS people, I've given them enough posts (for now).
- - - - -
Note 1: the reason to follow real scientists and research labs on Twitter and Facebook is that they post about ongoing research (theirs and others'), unlike professional popularizers who post "memes" and self-promotion. Or complete nonsense --- only to be corrected by much smarter and incredibly nice Destin "Smarter Every Day" Sandlin:
Note 2: For people who still think that if one of two children is a boy, then the probability of two boys is 1/3 (it's not, it's 1/2):
and the frequentist answer is in this post. Remember: if you think a math result is incorrect, you need to point out the error in the derivation. (There are no errors.)
This particular math problem is one favorite of the IFLS crowd, as it makes them feel superior to the "rubes" who say 1/2, whereas in fact that is the right answer. The IFLS crowd, in general, cannot follow the rationales above, though some may slog through the frequentist computation.
Labels:
Adventures in science-ing,
education,
science,
STEM
Friday, January 13, 2017
Medical tests and probabilities
You may have heard this one, but bear with me.
Let's say you get tested for a condition that affects ten percent of the population and the test is positive. The doctor says that the test is ninety percent accurate (presumably in both directions). How likely is it that you really have the condition?
[Think, think, think.]
Most people, including most doctors themselves, say something close to $90\%$; they might shade that number down a little, say to $80\%$, because they understand that "the base rate is important."
Yes, it is. That's why one must do computation rather than fall prey to anchor-and-adjustment biases.
Here's the computation for the example above (click for bigger):
In fact, if you, the patient, have access to the raw data (you should be able to, at least in the US where doctors treat patients like humans, not NHS cost units), you can see how far off the threshold you are and look up actual distribution tables on the internet. (Don't argue these with your HMO doctor, though, most of them don't understand statistical arguments.)
For illustration, here are the posterior probabilities for a test that has bias $k$ in favor of false positives, understood as $\Pr(\text{positive}|\text{not sick}) = k \times \Pr(\text{negative}|\text{sick})$, for some different base rates $p$ and probability of accurate positive test $r$ (as above):
So, this is good news: if you get a scary positive test for a dangerous medical condition, that test is probably biased towards false positives (because of the scary part) and therefore the probability that you actually have that scary condition is much lower than you'd think, even if you'd been trained in statistical thinking (because that training, for simplicity, almost always uses symmetric tests). Therefore, be a little more relaxed when getting the follow-up test.
There's a third interesting question that people ask when shown the computation above: the probability of someone getting tested to begin with. It's an interesting question because in all these computational examples we assume that the population that gets tested has the same distribution of sick and health people as the general population. But the decision to be tested is usually a function of some reason (mild symptoms, hypochondria, job requirement), so the population of those tested may have a higher incidence of the condition than the general population.
This can be modeled by adding elements to the computation, which makes the computation more cumbersome and detracts from its value to make the point that base rates are very important. But it's a good elaboration and many models used by doctors over-estimate base rates precisely because they miss this probability of being tested. More good news there!
Probabilities: so important to understand, so thoroughly misunderstood.
- - - - -
Production notes
1. There's nothing new above, but I've had to make this argument dozens of times to people and forum dwellers (particularly difficult when they've just received a positive result for some scary condition), so I decided to write a post that I can point people to.
2. [warning: rant] As someone who has railed against the use of spline drawing and quarter-ellipses in other people's slides, I did the right thing and plotted those normal distributions from the actual normal distribution formula. That's why they don't look like the overly-rounded "normal" distributions in some other people's slides: because these people make their "normals" with free-hand spline drawing and their exponentials with quarter ellipses, That's extremely lazy in an age when any spreadsheet, RStats, Matlab, or Mathematica can easily plot the actual curve. The people I mean know who they are. [end rant]
Let's say you get tested for a condition that affects ten percent of the population and the test is positive. The doctor says that the test is ninety percent accurate (presumably in both directions). How likely is it that you really have the condition?
[Think, think, think.]
Most people, including most doctors themselves, say something close to $90\%$; they might shade that number down a little, say to $80\%$, because they understand that "the base rate is important."
Yes, it is. That's why one must do computation rather than fall prey to anchor-and-adjustment biases.
Here's the computation for the example above (click for bigger):
One-half. That's the probability that you have the condition given the positive test result.
We can get a little more general: if the base rate is $\Pr(\text{sick}) = p$ and the accuracy (assumed symmetric) of the test is $\Pr(\text{positive}|\text{sick}) = \Pr(\text{negative}|\text{not sick}) = r $, then the probability of being sick given a positive test result is
\[ \Pr(\text{sick}|\text{positive}) = \frac{p \times r}{p \times r + (1- p) \times (1-r)}. \]
The following table shows that probability for a variety of base rates and test accuracies (again, assuming that the test is symmetric, that is the probability of a false positive and a false negative are the same; more about that below).
A quick perusal of this table shows some interesting things, such as the really low probabilities, even with very accurate tests, for the very small base rates (so, if you get a positive result for a very rare disease, don't fret too much, do the follow-up).
There are many philosophical objections to all the above, but as a good engineer I'll ignore them all and go straight to the interesting questions that people ask about that table, for example, how the accuracy or precision of the test works.
Let's say you have a test of some sort, cholesterol, blood pressure, etc; it produces some output variable that we'll assume is continuous. Then, there will be a distribution of these values for people who are healthy and, if the test is of any use, a different distribution for people who are sick. The scale is the same, but, for example, healthy people have, let's say, blood pressure values centered around 110 over 80, while sick people have blood pressure values centered around 140 over 100.
So, depending on the variables measured, the type of technology available, the combination of variables, one can have more or less overlap between the distributions of the test variable for healthy and sick people.
Assuming for illustration normal distributions with equal variance, here are two different tests, the second one being more precise than the first one:
Note that these distributions are fixed by the technology, the medical variables, the biochemistry, etc; the two examples above would, for example, be the difference between comparing blood pressures (test 1) and measuring some blood chemical that is more closely associated with the medical condition (test 2), not some statistical magic made on the same variable.
Note that there are other ways that a test A can be more precise than test B, for example if the variances for A are smaller than for B, even if the means are the same; or if the distributions themselves are asymmetric, with longer tails on the appropriate side (so that the overlap becomes much smaller).
(Note that the use of normal distributions with similar variances above was only for example purposes; most actual tests have significant asymmetries and different variances for the healthy versus sick populations. It's something that people who discover and refine testing technologies rely on to come up with their tests. I'll continue to use the same-variance normals in my examples, for simplicity.)
A second question that interested (and interesting) people ask about these numbers is why the tests are symmetric (the probability of a false positive equal to that of a false negative).
They are symmetric in the examples we use to explain them, since it makes the computation simpler. In reality almost all important preliminary tests have a built-in bias towards the most robust outcome.
For example, many tests for dangerous conditions have a built-in positive bias, since the outcome of a positive preliminary test is more testing (usually followed by relief since the positive was a false positive), while the outcome of a negative can be lack of treatment for an existing condition (if it's a false negative).
To change the test from a symmetric error to a positive bias, all that is necessary is to change the threshold between positive and negative towards the side of the negative:
In fact, if you, the patient, have access to the raw data (you should be able to, at least in the US where doctors treat patients like humans, not NHS cost units), you can see how far off the threshold you are and look up actual distribution tables on the internet. (Don't argue these with your HMO doctor, though, most of them don't understand statistical arguments.)
For illustration, here are the posterior probabilities for a test that has bias $k$ in favor of false positives, understood as $\Pr(\text{positive}|\text{not sick}) = k \times \Pr(\text{negative}|\text{sick})$, for some different base rates $p$ and probability of accurate positive test $r$ (as above):
So, this is good news: if you get a scary positive test for a dangerous medical condition, that test is probably biased towards false positives (because of the scary part) and therefore the probability that you actually have that scary condition is much lower than you'd think, even if you'd been trained in statistical thinking (because that training, for simplicity, almost always uses symmetric tests). Therefore, be a little more relaxed when getting the follow-up test.
There's a third interesting question that people ask when shown the computation above: the probability of someone getting tested to begin with. It's an interesting question because in all these computational examples we assume that the population that gets tested has the same distribution of sick and health people as the general population. But the decision to be tested is usually a function of some reason (mild symptoms, hypochondria, job requirement), so the population of those tested may have a higher incidence of the condition than the general population.
This can be modeled by adding elements to the computation, which makes the computation more cumbersome and detracts from its value to make the point that base rates are very important. But it's a good elaboration and many models used by doctors over-estimate base rates precisely because they miss this probability of being tested. More good news there!
Probabilities: so important to understand, so thoroughly misunderstood.
- - - - -
Production notes
1. There's nothing new above, but I've had to make this argument dozens of times to people and forum dwellers (particularly difficult when they've just received a positive result for some scary condition), so I decided to write a post that I can point people to.
2. [warning: rant] As someone who has railed against the use of spline drawing and quarter-ellipses in other people's slides, I did the right thing and plotted those normal distributions from the actual normal distribution formula. That's why they don't look like the overly-rounded "normal" distributions in some other people's slides: because these people make their "normals" with free-hand spline drawing and their exponentials with quarter ellipses, That's extremely lazy in an age when any spreadsheet, RStats, Matlab, or Mathematica can easily plot the actual curve. The people I mean know who they are. [end rant]
Sunday, January 8, 2017
Numerical thinking - A superpower everyone can get
There are significant advantages to being a numerical thinker. So, why isn't everyone one?
Some people can't be numerical thinkers (or won't be numerical thinkers), typically due to one of three causes:
Acalculia: the inability to do calculations; in its pure form a type of brain damage, but more commonly a consequence of bad educational system.
Innumeracy: lack of mathematical and numerical knowledge, again generally as the result of a bad educational system.
Numerophobia: a fear of numbers and numerical (and mathematical) thinking, possibly an attitude brought on by exposure to the educational system.On a side note, a large part of the problem is the educational system, particularly the way logic and math are covered in it. Just in case that wasn't clear.
Numerical thinkers get a different perspective on the world. It's like a superpower, one that can be developed with practice. (Logical thinkers have a related, but different, superpower.)
Take, for example, this list of large power generating plants, from Wikipedia:
Left to themselves, the numbers on the table are just descriptors, and there's very little that can be said about these plants, other than that there's a quick drop in generation capacity from the first few to the rest.
When numerical thinkers see those numbers, they see the numbers as an invitation to compute; as a way to go beyond the data, to get information out of that data. For example, my first thought was to look at the capacity factors of these power plants: how much power do they really generate as a percentage of their nominal (or "nameplate") power.
Sidenote: Before proceeding, there's an interesting observation I should make here, about operational numerophobia (similar to this older post): in social interactions when this type of problem comes up, educated people who can do calculations in their job, or at least could during their formal education, have trouble knowing where to start to convert a yearly production of 98.8 TWh into a power rating (in MW).
Since this is trivial (divide by the number of hours in one year, 8760, and convert TW to MW by multiplying by one million), the only explanation is yet another case of operational numerophobia. End of sidenote.
Capacity (or load) factor is like any other efficiency measure: how much of the potential is realized? Here are the results for the top 15 or so plants (depending on whether you count the off-line Japanese nuclear plant):
Once these additional numbers are computed, more interesting observations can be made; for example:
The nuclear average capacity factor is $87.7\%$, while the hydro average is just $47.2\%$. That might be partly from use of pumped hydro as storage for surplus energy on the grid (it's the only grid-scale storage available at present; explained in the video below).
That is the power of being a numerical thinker: the ability to go beyond simple numbers and have a deeper understanding of reality. It's within most people's reach to become a numerical thinker, all that's necessary is the will to do so and a little practice.
Alas, many people prefer the easier route of being numerical-poseurs...
A lot of people I interact with pepper their discussions with numbers and even charts, but they aren't numerical thinkers. The numbers and the charts are props, mostly, like the raw numbers on the Wikipedia table. It's only when those numbers are combined among themselves and with outside data (none in this example), information (the use of pumped hydro as grid-level storage), and knowledge (nameplate vs effective capacity, capacity factors) that they realize their potential for informativeness.
A numerical thinker can always spot a numerical-poseur. It's in what they don't do.
- - - -
Bonus content: Don Sadoway talking about electricity storage and liquid metal batteries:
Labels:
Innumeracy,
math,
Numbers,
thinking
Subscribe to:
Posts (Atom)