Showing posts with label finance. Show all posts
Showing posts with label finance. Show all posts

Saturday, March 21, 2020

Fun with numbers for March 21, 2020

Recycling some tweets on the third day of California shelter-in-place. Weather is nice:




I really don't like these "flatten the curve" diagrams posing as science



Maybe it’s just me, but this diagram strikes me as a number of unsupported unquantified statements presented as if it’s some sort of quantitative model based on real data
  1. Axes have labels but no scales… so all we can measure is the relative magnitudes. Is that high peak at (D,A) 1%, 10%, 25%, or 90% of the population? Does it happen in a week, a month, or a year?
  2. A/B = 415/110 so this undefined intervention lowers the peak by 73.5%. How many patients is that? Do these measures really slow down infection rates this much? Assuming that there’s no change to recovery speed, that’s a 4-fold reduction from an unidentified intervention.
  3. E/D = 475/280 so this undefined intervention delays the peak by 70%. So if D is a month, this delays the peak a further three weeks, not long enough for a vaccine; if D is a year, that’s another 8 months, presumably enough. 
  4. B is still greater than C, so what happens when the slowed-down process crosses over the health system capacity? Rationing/triage or does this mean bodies littering the streets? That depends on that (B-C)/C = (110-83)/83 or 33% over capacity, but what happens needs absolute numbers, not relative; since there are no numbers, there’s no real meaning.

All the calculations above are just to show that if we’re to take a chart seriously we need to have real numbers and real details, and the above figure is just a qualitative “let’s hope this works to convince people to wash hands and stay away from others” masquerading as a technical models.

BY ALL MEANS, WASH YOUR HANDS, DON’T TOUCH YOUR FACE, AND STAY AWAY FROM OTHERS, because that makes sense. I've been doing it for as far as I can remember.



The information we're getting is preliminary and we're treating it as dogma


From a study of Italian testing:


The internal consistency of this test is 75% (25% of the time the test doesn’t agree with itself in retesting); this doesn’t mean that the test is 75% accurate, because that’s measured relative to the underlying condition. This is an upper bound on the accuracy of the test, since we know that at least 25% of the time it's inaccurate for sure. (Sample size appears small, but for Medicine this is almost their version of "big data.")


A more general point about COVID19 testing


It's easy to show that missing covariates leads to panic-inducing overestimates. The following numbers are not COVID19 data, just an illustration


Sometimes I despair of what people try to do with small amounts of data, and then the sarcasm comes out:
How can anyone deny this calamity?! In less than two months the entire population of the Earth will test positive. 
In 100 days, over 8 trillion people will test positive. That's 5 times the total number of humans who've ever lived!!!! 



TSLA twitter, always good for a laugh



No matter what the stock does or at what price it's trading, Ross always says "buy." One wonders how he charges 2-and-20 to his clients to give advice of this quality.



Richard "Hamster" Hammond drives a Tesla Model X



And gets very excited at adding one mile every few seconds at a Tesla Supercharger. (We can see in the touchscreen that the Supercharger is delivering 65 kW and Tesla claims 310 Wh/mi,* so that would average out at about 16 seconds per mile of range.) Not to be a spoilsport, but a gas pump adds about 26 miles of range per second (3 l/s in a 35 MPG car).

Then there's a small blur fail that reveals Hammond isn't really driving under the speed limit:


That's okay, Mr. Hammond, no one else is either.

- - - - -
* If you believe that number, you're exactly the kind of investor I'm targeting with a new product structured mostly with 2020 pandemic cat bonds; act now, supplies are limited.**

** CYA statement: this is a facetious offer, expressing derision for Tesla's number, not a proffer of a tradable security structured from out-of-the-money cat bonds.



Some videos to watch while the economy tanks around us



Grant Sanderson of 3blue1brown gave a talk at Berkeley about having people engage with math. The gist is that people want relevance and/or a story. That's good advice, but I think 3B1B's problem is that his audience is self-selected. In other words, that's how you engage an audience that's predisposed to look for and watch math videos. Still, good points.



Experimentboy is back, with thermal cameras. Very fun stuff.



PhysicsGirl suggests fun experiments to keep us from losing our minds while we wait to be moved to FEMA camps or be turned into Soylent Green.


YouTube affords the überdorks amongst us the opportunity to watch talks waaaaay above our expertise, something that in real life would be embarrassing, not to mention logistically difficult. So here are some links to:

Caltech. MIT-West, as some people who went to a technical school in Massachusetts call it.

Stanford Institute for Theoretical Physics. Fair warning: Susskind eats cookies when he talks, so there's spraying in some videos (all Susskind videos, really).

Institute for Advanced Studies at Princeton.

Nasa Jet Propulsion Laboratory.

Art talks at Le LouvreMusée D'Orsay, the British Museum, the Smithsonian Institution, and the Museum of Fine Arts in Boston, a small town in a hard-to-spell state




Live long and prosper.

Friday, March 6, 2020

Fun with numbers (and other geekage) for March 6, 2020

More collected tweeterage and other social media detritus.


MSNBC doesn't care about getting numbers right


And water is wet and fire burns... Okay, this one is particularly egregious. It starts on twitter, with a person who doesn't understand the difference between millions and trillions:


But then, Brian Williams and NYT Editorial Board member Mara Gay put it up in a discussion of Bloomberg's failed presidential bid, and agree with it (video here):


The problem here isn't so much that anchors and producers at MSNBC can't do this basic math, it's that they don't care enough about getting the numbers right to ask a fact-checker to check them. Note that they had the graphic made in advance, and this was a scripted segment, so they didn't just extemporize and made an error. They didn't care enough about the numbers to check them.

And, given their response, they still don't care. This is sad.



A puzzle that's going around, solved correctly


Saw this on Twitter, and a lot of snark with it:


Apparently some people have difficulty with this puzzle, drawing a line in B that's parallel to the bottom of the bottle (perhaps they think the water is frozen?). But many of the people who mock those who draw that parallel line draw a horizontal line that is too low, creating a triangle.

Here's the correct solution:


As with all math problems, even very simple ones like this, the right approach is to do the math, not to try to guess and hand-wave your way to a probably-wrong solution.



In their haste to badmouth Millennials, finance researchers misstate their results


I saw this "Millennials are bad with money" article on Yahoo Finance, got the original report (PDF), and found a glaring problem with their data. (The table notes make it clear they're saying a conjunction, 'AND,' not a 'GIVEN THAT' conditional.)


My guess is that despite the table notes and the 'AND,' what they're measuring is the proportion of people who answered the three questions correctly GIVEN THAT they self-described as having high finance literacy, I.O.W. that's 19% of the 62%, not 19% of the 9041 Millennials. That would make the population in the conjunction 1065, whereas the number of people who got the three right answers is 1447; so about 4% of Millennials are money-smart[ish] but think they aren't.

But if you're going to get snarky about other people's issues with money, maybe write your tables and table notes a bit more carefully…

About the financial literacy of Millennials, these were the three multiple-choice questions:
Suppose you had $\$100$ in a savings account, and the interest rate was 2% per year. After 5 years, how much do you think you would have in the account if you left the money to grow? Answers: a) More than $\$102$; b) Exactly $\$102$; c) Less than $\$102$; d) Do not know; e) Refuse to answer. 
Imagine that the interest rate on your savings account was 1% per year and inflation was 2% per year. After 1 year, how much would you be able to buy with the money in this account? Answers: a) More than today; b) Exactly the same; c) Less than today; d) Do not know; e) Refuse to answer. 
Please tell me whether this statement is true or false. “Buying a single company’s stock usually provides a safer return than a stock mutual fund.” Answers: a) True; b) False; c) Do not know; d) Refuse to answer.
These questions are extremely simple, which makes the low incidence of correct answers troubling.



Science illustration lie factor: 71 million


How bad can science illustrations get? Let's ask the Daily Express from the UK:


We don't need to calculate to see that that meteor is much larger than 4.1 km, but if we do calculate (I did), we realize they exaggerated the volume of that meteor by just a hair under SEVENTY-ONE MILLION-FOLD:


To put that lie factor into perspective, here's the Harvester Mothership from Independence Day: Resurgence, which has only a lie factor of 50 (linear, because that's the dimensionality of the problem here):




Fun with our brains: the Stroop interference test


From a paper on the effect of HIIT and keto on BDNF production and cognitive performance that intermittent fasting and low carb advocate (and responsible for at least 50% of my fat loss) P.D. Mangan shared on twitter, we learn that people with metabolic syndrome show improvement on their cognitive executive function when on a ketogenic diet and even more if interval training is used.

To measure cognitive executive function they use a Stroop interference test, which is a fun example of our brains' limitations, so here's an example:


The test compares the speed with which participants can state the colors of the words in the columns inside the box: on the left the color and the word are congruent (the word is the name of the color of the text for that word), on the right the color and the word are incongruent (the word is the name of a color, but not the color of the text for that word).

Other than color-blind people, almost everyone takes less time and makes fewer mistakes with the congruent than the incongruent column. That's because the brain CEO (executive function) has to stop the reading and process color in the case of incongruent. This is easy to see if one compares the test with the two extras: speed of the incongruent is about the same as that of reading the words in Extra 1 column, while the speed of stating the colors of the Extra 2 column is much faster (and less error-prone) than that of the incongruent column.

(The paper also measures BDNF, the chemical usually associated with better executive function, directly, by drawing blood and doing an ELISA test; but it's interesting to know that diet and exercise may make you a more disciplined thinker and to see that in the numbers for an actual executive function test, not just the serum levels.)




Technically, Target isn't lying, it's 4 dollars off



But I've never seen that $\$$11.99 'regular' price for this coffee, which would make it the only coffee in the entire aisle not to have a regular price of $\$$9.99. All the other sale signs say 'Save $\$$2,' for what it's worth…



Destin 'Smarter Every Day' Sandlin visits a ULA rocket factory



And, on twitter, ULA CEO Tory Bruno gets a dig into SpaceX's Texas operations:




Live long and prosper!

Friday, October 4, 2019

Fun with numbers for October 4, 2019

It's flu season, let's talk product diffusion


One of the classic marketing models people learn in innovation classes is basically a SIR(1) model without the R part: the Bass model of product diffusion.

The idea is that some fraction $a$ of the consumers are "innovators" who adopt a product without social pressure, while another fraction $b$ are "imitators" who adopt a product when they see others with it. The fraction $x$ of the market that has adopted the product at a given time is given by the following differential equation

$\dot x = (a  + b x)(1-x)$, 

and the behavior looks like a traditional product life-cycle curve (an S-shaped curve):




The process for a viral infection is similar: some people get the virus from the environment (those would be the $a$ fraction), some get it from contact with other people (those would be the $b$); the infection process has a third element, recovery, which we ignored here.



Growth confusion and punditry, part 1


Pundits throwing around growth numbers seem to be unaware that there are significant differences even with very small growth numbers.




Growth confusion and punditry, part 2


A pundit: "it's important to get the economics high-growth first, so that the slower growth starts from a higher number." (Paraphrased.)

Me: Gah! Multiplication is transitive. The order doesn't matter, what matters is that the high-growth period be the longer period.

Consider two periods, with $t_1$ and $t_2$, with associated growth rates $r_1$ and $r_2$. Starting from some value $x_0$, the result of period 1 before period 2 is:

$\left( x_0 \, e^{r_1 t_1} \right) \, e^{r_2 t_2}$,

and the result of period 2 before period 1 is

$\left( x_0 \, e^{r_2 t_2} \right) \, e^{r_1 t_1}$,

in other words, the same result.

These pundits get paid to go on television and say these things and to write them in Op-Eds. And influential people take them seriously. The innumeracy is staggering.



Having some fun with Tesla data


Downloaded some historical data from Yahoo Finance (yes, I have other better sources, but this one is public and can be shared) and played around with smoothing. Here's a nice view of the TSLA closing price for the last year using the same triangular smoothing I did for my bodyweight (in other words, a second-order moving average of (5,5)):



Throughout the first half of 2019 Tesla boosters on Twitter were fully convinced that this would be the year that heralded the end of the internal combustion engine car. In reality, this seems to be the year in which Tesla's financial shenanigans are likely to bring its valuation to a more appropriate level.

CYA statement: I have no personal position on Tesla and will not initiate one in the next 72 hours. This is not intended as financial advice and represents my personal views (of making fun of Tesla boosters) not those of my employer or our clients.

Also:

(Yes, it's sarcastic.Very, very sarcastic.)



Yet another infrastructure photo



Sunday, May 22, 2011

Selection effects, Buffett's rebuttal, and the causality question

Some thoughts on causality based on a story I recall from Alice Schroeder's  The Snowball, Warren Buffett's biography. (I read the book over two years ago, and it was a library copy, so I can't be sure of the details, but I'm sure of the logic.)

Warren Buffett attended a conference on money management where he made a big splash against a group of efficient market advocates. Efficient financial markets imply that, in the long term, it's impossible to have returns above market average, something that Buffett had been doing for several years by then.

The efficient markets hypothesis advocates present at this conference made the predictable argument against reading too much in the outsized returns of a few money managers: if there's a lot of people trading securities, then some will do better than the median, while others will do worse than the median, just as an artifact of the randomness. To over-interpret this is to imagine clusters where none exists.

Buffett then told a parable along the following lines: "Imagine that you look at all the money managers in the market last year, say 20,000, and see that there are 24 that did much better than the rest of the 20,000. So far it could be the case of a random cluster, yes. Then you find those 24 traders, and discover that 23 came from a very small town, [Buffett gave it the name of a mentor, but I can't recall it] Buffettville. Now, most people would think that there's something in Buffettville that makes for good managers; but you are telling us that it's all a coincidence."

Buffett's argument carries some weight in the sense that the second variable (i.e. being from Buffettville) is not a-priori related to having higher returns, so it must be related by a hitherto unknown causality relationship.

But there's a problem here. Even if a large proportion of the successful managers are from Buffetville, that doesn't mean that being from Buffettville makes people better managers; it might be the case that there were many other Buffettville managers in the 20,000 and those were at the very bottom. That would mean that managers from Bufettville have a much higher variance in returns than the market, and that the results, once again were the result of randomness.

My argument here is that the story as I recall it being told in Schroeder's book is an incomplete rebuttal of the efficient markets hypothesis, not a defense of that hypothesis. I'm not a finance theorist; I'm in marketing, where we do believe that some marketers are much better than others, so I have no bone to pick either with the theory or its critics.

I'm just a big fan of clear thinking in matters managerial or business.