Friday, April 22, 2016

How hard is it to learn a foreign language?

How hard is it to learn a foreign language?

If you're like me, you grew up speaking a language. Since you're reading this in English, that was either your native tongue, or you've learned it at school. (If you don't understand this then thang nabbit presumably on the slindy intercongruenda, but that's neither here nor there)

But in the current cultural situation, native speakers of English (NSE) are at an intellectual advantage over speakers because it is the preferred language of diplomacy, science, popular culture. I could make a case that this is a disadvantage for NSEs but for the moment let's just assume that an English speaker is about to learn another language.

Learning a language involves a number of separate domains which are somewhat independent. There's:
  • grammar (syntax), how words are ordered and modified to tell you their function with relation to the other words in a sentence
  • vocabulary and sayings, the dictionary of words, what you call that thing or action
  • pronunciation, the accent, those weird sounds that make up the words. 
  • writing and spelling, how the language goes on paper or screen. Though writing is not really language itself (language was spoken first and then individuals created writing after the fact), it is often the easiest entry into language learning and offers higher volume of consumption per unit time. Non-roman alphabets or complicated spelling rules make it difficult to learn how to pronounce things from writing (certainly for beginners).
  • culture, the supporting tools in your environment that ease language learning, books, media, acceptance. Not traditionally thought of as a part of learning a language, but makes a huge difference in learnability. The internet is making a lot of things just universally available: news and movies, ordering books.
Here is my assessment of how difficult it is for NSEs to learn very specific foreign languages, (in misleadingly quantifiable but semi-educated subjective terms: 1 very easy (little to no effort) , 2 easy, 3 medium, 4 hard, 5 hardest) As usual it is easy to disagree after the fact (after you've spent time learning), but these are what I think the effort will be for those who don't know yet, within 1. Also, 'easy' means easy with respect to many languages. You'll probably still struggle with even the cognate words at first. But some languages don't have even that to fall back on. Also, there are two kinds of difficulty. One is that there is a new distinction, a totally new sound that is hard to do or remember, the other is the scale, usually just a number of things to remember. So there might be many new one-off distinctions (a new 'r'), or there might be a single distinction with lots of instances (like gender on nouns), or both (Russian verbs).

So here is a structured list of those issues for each language/language group.



French - pretty easy overall. French (and Latin cognates) form most of the educated language.
  • grammar - 3 conjugation of verbs in a few tenses but very regular, gender of nouns to remember. Word order mostly like English
  • vocabulary - 2 once past the basic words, educated vocabulary is almost identical. Very easy to guess meaning.
  • pronunciation - 2 mostly the same as English, no distinctions but a few strange sounds to get the accent right (u, nasals)
  • writing/spelling - 2 Latin alphabet, spelling very regular, a few accent marks to be aware of, a few unspoken letters at the ends of words. 
  • cultural - 1 taught by default in the US/England. In the US, products (few of them) that have bilingual packaging are in French for Fr Canada). Easy to get French things to read for learning.


Spanish/Romance - pretty much the same as French except slightly easier, because of close cultural connections (in US) and simple grammar
  • grammar - 2.5 conjugation of verbs but very very regular, gender of nouns to remember, verb conjugations but that's it. ser/estar, por/para only difficulties
  • vocabulary - 2 once past the elementary words, educated vocabulary is almost identical, part of the European group, easy to guess meaning.
  • pronunciation - 2 mostly the same as English, no foreign distinctions but a few strange sounds to get the accent right (g, j, h, r)
  • writing/spelling - 2 Latin alphabet, spelling very regular, a few very regular differences. Very wysiwyg
  • cultural - 1 large subpopulation of Spanish speakers. Currently the default foreign lang taught in  in the US. Lots of media that is Sp available.



Latin - The grammar is a lot: conjugations, declensions, gender, agreement. But the vocabulary is very recognizable. Or if it is not recognizable at first, then there will probably be some mdeical, legal, erudite term in English that corresponds.
  • grammar - 5 conjugation of verbs but very very regular, gender of nouns to remember
  • vocabulary - 2 once past the elementary words, educated vocabulary is mostly English looking. Half of English tech vocabulary is Latin or Latin-derived French.
  • pronunciation - 2 since it's mostly used literarily, pronunciation doesn't seem to matter much. But if you have to, it's very organized. When in doubt sort of like modern Italian. 
  • writing/spelling - 1 Roman alphabet (the original), spelling very regular, a few very regular differences.
  • cultural - 2 The source of European culture. English law and medical vocabulary. Lots of erudite literature. Very few children's stories ('Winnie Ille Pu' is about it) and no news. Even though it is not used in the real world as such, makes law, medicine, and all romance languages very easy to learn.



German - you think it is going to be easy because English and German have close historical roots, but it's not that easy.
  • grammar - 3.5 conjugation of verbs sounds like English, gender and 4 cases of nouns to remember, word order/prepositions just slightly different enough to English to be annoying. 
  • vocabulary -  3 a lot of similarity with elementary words, educated vocabulary is loan translations from Latin (that is, not Latinate, but the pieces translated to German pieces) so visually don't look right, but are made up of squashing basic words together. Vacuum cleaner = Staubsauger = dust sucker. Easy to guess.
  • pronunciation - 2 mostly the same as English, no distinctions but a few strange sounds to get the accent right (r, ch, pf, v/w/f)
  • writing/spelling - 1.5 Latin alphabet, spelling very regular
  • cultural - 2 not part of US/English linguistic consciousness. Not taught at schools. Large subpopulation of people with German heritage (both US and England) that is entirely ignored as a heritage. Yiddish, a variant of HG, has a larger cultural heritage (from a much smaller population). But some things are in the fabric of English culture (Grimm's Fairy Tales, general northern European culture)

Russian - for IE, hard to learn basics, hard to master because of so many rules.
  • grammar - 5 conjugation of verbs sounds like English, gender and 7 cases of nouns. And even more exceptions to these. Getting the basics is hard and then it steadily gets worse. 
  • vocabulary - 4 there is a lot of borrowing for educated vocab directly from English, but no where near as much as English from Latin. So most vocab unfamiliar
  • pronunciation - 3 lots of consonant clusters and weirdly placed palatalization, and 
  • writing/spelling - 3 Cyrillic alphabet, spelling mostly regular, except for 'o'
  • cultural - 3 not part of US/English linguistic consciousness. Not taught at schools. Small subpopulation of people with German heritage (both US and England) that is entirely ignored as a heritage.

Irish - This is the most surprisingly exotic. It is definitely Indo-European, but it changes as many parameters as possible within that system to make it just plain weird. Nothing seems to be regular at first sight. Also at second sight. But eventually it is very regular, just there are so many context rules that are hidden or look like they overlap, but actually aren't
  • grammar - 4 if only gender were the only difficulty, but there's so much more. VSO, prepositions that seem to conjugate like verbs, lots of initial sounds changes with exceptions on exceptions. The rules are regular but getting them is hard for a beginner. Oh, and 5 declensions for 2 cases with nouns.
  • vocabulary - 3 not really cognate, except maybe numbers (but to complicate it, two sets of numbers that lenit or elide depending on the number). Plurals and verb roots don't seem regular at all.
  • pronunciation - 3 the sounds aren't strange (except for 'ch' and 'dl' and 'gh' and dh' and slender vs broad and etc etc), it's the sound changes based on grammar that are insane.
  • writing/spelling - 3.5 Latin alphabet, spelling is very regular but in the most misleading way. Lots of letters (vowels and consonants) sound nearby but different enough their English counterparts, if they're sounded at all. Should be 4,  except it really is rule based.
  • cultural - 3 Taught in Ireland, not in US. Very small world community. Huge subpopulation of people with Irish heritage in all former English colonies...where Irish is entirely ignored as a language heritage. Not much out there to read.


Persian - This is the most surprisingly non-exotic. No gender, very little conjugation of verbs straightforward word order.
  • grammar - 2 no gender, little conjugation of verbs
  • vocabulary - 3.5 some cognate words, but educated has a lot of Arabic borrowings. But mostly unfamiliar.
  • pronunciation - 2 a couple of uvular throaty g's (gh and kh) but not the sore-throat of Dutch or Arabic
  • writing/spelling - 3 Arabic alphabet, no vowels. Hard to get pronunciation unless heard before. Also it seems like all typesets of Persian/Arabic are much much smaller for a given fontsize
  • cultural - 4 very little connection with the West. Mostly Islamic. 


Arabic/Hebrew - exotic grammar and writing, but at least it has an alphabet.
  • grammar - 4 conjugation of verbs and nouns similar not by endings but by vowel changes within the root, gender different enough to English to be annoying. 
  • vocabulary - 4 entirely different. some direct English borrowings but not enough to make a difference.
  • pronunciation - 3.5 a few extra throaty sounds and s/t/th's that they distinguish but don't exist in English
  • writing/spelling - 3 Semitic alphabet (no vowels) (Arabic and Hebrew are similar like Roman and Greek), so you have to know things first to read properly (makes learning difficult)
  • cultural - 3 Hebrew has a lot of cultural connections (Christian and Judaic vocab). Arabic has the difficulty that MSA (Modern Standard Arabic) is not really used in the street or at home, and each country has its own dialect (which two countries over may not be intelligible). Why Arabic and Hebrew together? Salaam/Shalom should be enough to convince you


Chinese - exotic, learning writing takes as much work as an additional language. I'm referring to Mandarin, not Cantonese or Shanghainese, which are unintelligible foreign languages (very similar but unintelligible as English is to German). But just as hard (or harder if you think having many more tones is harder. which it is).
  • grammar - 2 no gender, no conjugating, no declining, no nothing. Straightforward order (slightly different from English), few exceptions. 
  • vocabulary - 4 entirely different. But like German, new words are created from pieces of smaller words. Semantically it's not always obvious how though. Words and phrases made from these short simple VC words have this otherworldly feeling that you can't get a hold of them, maybe because they're shorter or all sound a like.
  • pronunciation - 3 tones are exotic, and distinguishing some palatals is exotic. but that's it. lots of near homophones (see pronunciation) so lots of room for misunderstanding or puns. Not as bad as it seems. 4 for tones and palatals but 2 for everything else. Cantonese has like 12 tones, so count yourself lucky.
  • writing/spelling - 5 Ideographs, every syllable has a picture. Like learning an entirely additional language. It's not as terrible as that; most characters actually have two distinguishable parts, one as a hint to pronunciation and one. Supposedly only 2000 characters needed to read a newspaper. Only?
  • cultural - 4 very different cultural history so interpersonal expectations can be very different

Japanese - exotic, shares ideographs with Chinese but the spoken language is entirely different
  • grammar - 4 (my vague impression)
  • vocabulary - 5 entirely different. (my vague impression)
  • pronunciation - 4  (my vague impression)
  • writing/spelling - 5+ Chinese borrowed ideographs, plus two syllabaries (hiragana, katakana), and oh plus maybe another alphabet. So like Chinese but worse.
  • cultural - 5 very different cultural history (my vague impression)

One take away is this, that because of extensive borrowing from nearby or imperial cultures, languages that are different grammatically may have learning eased by having some vocabulary overlap. So European languages tend to be easy to learn among each other for pronunciation and vocabulary (and if one Romance is your native language then all but Latin are all 1's), Arabic and Persian with vocab, and Chinese and Japanese with respect to writing.

Of course this is an entire oversimplification.  There are much more refined metrics on language learning: a scales of language proficiency like ILR (0 to 5), CEFR (A1 to C2), or ACTFL (novice to distinguished). And each level has published expected hours of instruction to reach it. So these are admittedly very subjective assessments on my part.

The best way to learn a language is to be born into it. If you can't do that, have relatives in your household who speak it and nothing else so you can't rely on the one you already know. As those strategies are not always at hand, immersion is the next best thing (but also where you can't fall back on the crutch of your native language). As that often poses a chicken and egg problem, your most realistic first attack is study habits, lots of listening and reading. And the latter is what I think I am 'scoring' for English speakers.

It's only fair to go the other direction. One might think that it is a simple inverse of the above (or really since difficulty is a distance, exactly the same numbers as above. But that's not exactly the case. There are language to language difficulties (or simplicities) and universal ones. I will oversimplify considerably and talk about all languages trying to learn English.
  • grammar - 2 basic grammar as simple as can be. No gender, little inflection or irregularity. prepositions and phrasal verbs have lots of exceptions and ambiguity. I'd give it a 1, but I'm trying to account for familiarity bias.
  • vocabulary - 2 easy for Europeans, not so much for outside of Europe. 
  • pronunciation - 3 should be given 5 for 'th' alone which hardly any other language in the world has. Short i and diphthongs are weird but you'll get over it.
  • writing/spelling - 4 For a logical roman alphabet, its spelling is atrocious. There seem to be more exceptions to exceptions than the rules themselves. Almost like ideographs, you feel like every word has to be learned by itself.
  • cultural - 1 Because of English colonialism, American economic strength, entertainment media, and commercialization, English is everywhere. Movies, music, TV, the internet, everything you buy, something about it is going to be English. Everything is available everywhere in English. Even if it is exotic to you, it is so in your face you can't help but know about it. People elsewhere know more about English speakers (mainly Americans) more than they do themselves. There's so much opportunity for learning English.
If it weren't for the spelling part, English would be ideal for learning (only Chinese and Japanese are more difficult to learn in orthography). Grammar, vocab, pronunciation are easy for everybody.

Sorry if I left yours out. I'd like to add in other representatives, Slavic (Czech), sub-saharan African (Swahili), Indian subcontinent (Hindi and Mayalayam) and southeast Asia (Thai and Indonesian), to get a better world coverage.


Handy table to compare (and more easily see where you disagree with me)




LanguageGrammarVocabularyPronunciationWriting/SpellingCulture
French32221
Spanish2.52221
Latin52212
German3.53222
Russian54333
Irish43333
Persian23234
Hebrew/Arabic44334
Chinese25455
Japanese4545.55
English22341

Wednesday, April 20, 2016

Weird pronunciations in medicine

- pathology - obviously pronounced puh-thology (in IPA /pə 'θɑ lə dʒij/) But all I ever hear when docs say it is path-ology (IPA /'pæθ 'ɑ lə dʒij/), the first syllable not unstressed sounding like 'path'. Since everything in life must have a reason, I wonder what it is. Is it an attempt to differentiate it from something that sounds similar? Do they just want to emphasize it somehow?

- patent - obviously pronounced pa-tent (in IPA /'pæ tent/). Like patent attorney, patent leather shoes, patently false. But docs use it to refer to, say, a vessel or duct or that is not collapsed, that is full of liquid or air keeping it mostly cylindrical-ish, never mushed or squeezed down (blocked or occluded or limp). And when they do so, they say pay-tent (IPA /'pej tent/)

There are others. Doctors are weird.

Foundations of Math: Sets vs Categories vs HoTT

There's been a controversy lately about the foundations of mathematics. It was controversial when it first was discovered in the late 19th/early 20th century when the foundations were being developed, controversial mostly because most mathematicians didn't feel its necessity and also because as a young field things just hadn't been resolved. But some of the greats (Hilbert, logicians) thought foundations were needed.

The development of foundations started almost entirely with logicians and philosophers (Boole, Cantor, Peirce, Frege, Zermelo, Russell) creating the axioms of set theory all based on the concept of set membership. This was not particularly in the center of mathematical development. It was essentially completed in the 1920's, then controversialized by Gödel in the 1930's, but was refined by him and other logicians (Church, Tarski, Putnam,) and set theorists over the next 30 years.

Then in the 60s, an alternative foundations was proposed and that was category theory all based non the concept of maps betwen objects (morphisms) representing similarity. It felt like category theory could model most any mathematical field that way, even if objects and morphisms were not central, and the diagrams it created seemed to show similarities among the disparate fields of math. Category theory itself was created in the 40s by MacLane and Eilenberg but Lawvere began in the 60s to think of it additionally as an alternative foundations.

More recently, the 2000's, higher order type theory (HoTT) has been proposed and developed as an alternative foundations (mostly by Voevodsky). I don't know much about HoTT other than it seems like a subset of Category Theory.

Without going into the details of each of these foundations, it seems to me, as a semi-educated outside who knows these fields very superficially, that the word 'foundations' means something different to these different alternatives.

For set theory, it is a foundation for reasoning, for specifying proofs, for how you can justify things. For the others, the foundation is for content and similarity among branches of mathematics, what is known in mathematics. That is, these aren't really exclusive foundations, they both have their purposes and they are non-conflicting they're just different kinds of formalisms rather than competing for the same ideas. It is also an intra-mathematical result that they are interpretable in each other; the concepts in one are translatable to concepts in the other. You can do HoTT with set theory as the underlying basis and similarly you can do set theory with elements defined in terms of HoTT.

My preference is for set theory. Another reflection on this is that set theory and axiomatics is easy to explain early (to those with less mathematical maturity) using very basic mathematical analogies, and category theory and HoTT is more difficult needing lots of higher math to understand and use as non-trivial examples. Also, set theory includes logic (somehow, I'm not sure if is as additional machinery or if it is considered a consequence of set theory), and I don't know what kind of inference mechanism is allowed with HoTT or category theory.

Of course this is entirely biased of me because I think that Turing Machines form the best foundation because it is very simple to understand and is entirely operational, and is a metaphor for all computation which is all that mathematics is good for anyway!

Tuesday, March 29, 2016

Can Deep Learning be applied to Automated Deduction?

Deep learning is just a deeply layered neural network, and by deep they mean more than one internal layer. It has recently gained much attention because of its successes with images and go and speech and all sorts of things plain old NNs weren't doing so well at.

But what about automated deduction? That's not rhetorical, this is entirely speculative and answer free. I am wondering if DL (or any ML technique) could be thrown at AD (or ATP (automated theorem Proving) whatever you'd like to call it).

First the optimism: wow wouldn't that be cool, a method that would prove really hard mathematical theorems (the ATP community has to work hard and do a lot by hand to do things like flyspeck) or even . But desiring the outcome doesn't say anything about the implementation.

Next the pessimism. By analogy, images and speech/text are iffy optimization problems. Lots of perturbations get you the same thing. But logic (and similar combinatorial problems) are all or nothing. It is either true/proven or false/wrong. how could an approximation optimization method translate to logical combinatorial problems? Where do you get the scads of supervised instances required by DL? Millions of tagged images from MNIST but from TPTP literally only thousands.

So, I don't know. But just because I don't know how to do it doesn't mean it can't be done.

Monday, March 28, 2016

A small nitpick about a small p-value problem trope


Lately the p-value has been getting a lot of press, almost entirely bad (tip of the iceberg). Whatever it is and means has been up for discussion as it hasn't had since NPHT was created (the Bayesians have been fighting against it, or rather fighting for alternatives, since the 60's).

Hidden in the middle of this storm, or a small tornado on the side, is the issue of data fishing or p-hacking. Since only a p-value of less than .05 is considered 'statistically significant, only such values are considered publishable leading to the problems of: selective publishing (ignoring significant non-results), and p-hacking (if one p-value isn't good enough, change you hypothesis and testing little by little until you get a p-value below the threshold). The problematic trope is stated in roughly the following manner:

At p-level threshold set at 5% (or .05 or 1/20), all you need is 20 studied hypotheses to get one hypothesis that is significant by chance.

It's so obvious!  With 1/20th probability, you need 20 tries to guarantee a hit! The intention is that you shouldn't make many hypothesis tests at a time, otherwise you'll get some false hypothesis stated as true.

But you may notice with that wording that it is a classic gambler's misinterpretation, 'the run has to end!'. Each hypothesis test is independent, and so the probability of the next test will not change if all the previous tests are all hits or all not or whatever.

Whatever you think of p-values, and whatever you think they mean, they are probabilities. Probabilities of what is complicated and nuanced and misleadingly stated and problematic and the firm basis for statistical inference for the past hundred years. But still, they are probabilities of something and a strict threshold of 5% of accepting a hypothesis over rej... forget that verbiage. it's a 1/20 probability event.


So now we're in the realm of basic probability (and its own difficulties) but they should be shared by Bayesians, Frequentists, Kolmogorov..ans, Keynesians (he had his own!). So any hypothesis has a probability of .05 of being positive, a hit. What's the probability of a hit in 1 trial? 5%. What's the probability of a hit (at least one hit) in 2 trials? 3? n trials? Those are harder but only a tiny bit, basic probability/combinatorics. What's the probability of at least one hit? One minus the probability of no hits at all. What's the probability of no hits in n trials? (probability of no hit in one trial)^n. They are independent events so you multiply. Final answer:


\[
P({\rm hit\ in\ n\ trials}) = 1-P({\rm no\ hit})^n = 1- 0.95^n
\]

Well, not final exactly, it's just a formula. We don't yet have a good picture of what it means in realation to our intuition about 'it'll take 20 to make sure we have a hit'.

So then a picture:



It starts at 0, rises in exponential decay asymptotically to 1, but is a little slower than you'd expect for an exponential because the base is so close to 1.


The usual way to present such probabilities is, like the birthday paradox, to say how many trials it takes to get %50 chance. Multiplying .95 a few times we see that it takes 14 trials for there to be more than 50/50 chance that at least one item is a hit. To get to 95% chance, it takes 59 trials. There's no guarantee that there'll be a hit, just the probability gets smaller and smaller.


I make this point to... well, to pick a nit. You do more experiments, the more likely there will be one that is 'statistically significant' totally by chance. Intuition and logic lead to that immediately. But the logic is never done and one step of it doesn't lead to correct two steps. I do realize it is a bit of a mouthful and difficult to digest to say 'after 14 trials there will be a fifty-fifty for a false positive'? 50/50? It's not obvious how that relates to 5%, but the erroneous 20*.05 = 100% does obviously relate.


In the end, to say '5% means 20 experiments', which seems so directly and intuitively obvious, is wrong. In the right direction, but wrong.








Sunday, March 27, 2016

A serious proposal about Daylight Saving Time

People everywhere hate the spring change in clocks for Daylight Saving Time.

First, it's annoyingly tiring having to get up one hour earlier. And feeling like you can stay up a whole hour later. And this leading to wanting to stay in bed that much longer even more. Annoying.

Second, the average effect of this annoyance on the population. This leads to, statistically, 'studies have been done', of reduced physical performance leading to accidents (lower light levels from sun than in the previous week), and an increase in heart attacks and strokes (not exactly excuses to lie in bed a bit longer).

DST changes things twice a year. In a preindustrial society, without fast travel and communication, time zones are not useful. DST is useful for... for what I'm not sure. More daylight in the evening? That's not for work, that's for ... I don't know, kids to stay outside and play longer?

But if that is desired, but also we'd like the feature of no changing of wakeup time, I have a radical new idea, which though it sounds strange, is not entirely a crackpot idea. My proposal:

Have clock time pegged to sunrise.

And call that time 6am. No matter where you are on Earth.

First there is the practical consideration, then there is the implementation. Practically, it fulfills the feature of never changing. You always get to wakeup at the same time. Nowadays we all choose to go to bed pretty much irrelevant to sunset anyways. And the farmers don't have their delivery schedules screwed up when the milking cows don't care about these crazy human practices.

Implementation may be the most difficult, and here is where some of the subtleties come out. However, this is the 21st century. The point is that sunrise is equivalent to longitude, and this is determinable now by any variety of methods but also by pure calculation (whose coefficients were determined by those methods or in the end skywatching).

We all have at our disposal computation devices that are minute in bulk (phones, watches, RFID chips) with GPS positioning (via satellites), that can determine longitude within a few meters (2?). So sunrise will be a few seconds off from someone 10 miles west (15 degrees = 1 hour sunrise difference, 1 degree ~= 60 miles ... 10 miles ~= 24 seconds). This continuous difference sounds like it is insurmountable... except by computation, which is currently trivially executable. You're having a phone meeting with someone at 9:30am, you're in downtown Chicago and they're in Kansas City, MO (~415 miles west). That's around 7 degrees or 28 minutes. If the appointment is at 9:30AM Chicago Loop time, in Kansas City it is ~9AM. The appointment making software would calculate the time for the recipient based on their address. For coordination there can still be a UTC which is the time at one particular longitude.

There are some very minor difficulties that are barely in the realm of practical considerations. Depending on your latitude, noon (or six hours after sunrise) may not correspond to the highest point of the sun in the sky, but that's the case now anyway (just not as much). Also for higher latitudes, sunset will change drastically in the spring in fall (sunset coming later one day to the next by up to 10 minutes, making the feel of the evening change within the week.

There's cultural precedence for this. Many ancient calendars count the change of day (but not when to rise or go to bed) to sunset, so why not sunrise. Our mental perception of the 'next day starting', despite the European style (derived from Roman) changeover at the sun point opposite to sun's zenith (yes, I'm avoiding 'midday' and 'noon' for the moment),  is truly when we wake up around dawn or more naturally at dawn.

So that's it. Free idea. Go forth and implement. Just give me credit. If there are problems, I'd like to blame the future implementation.

Of course, this doesn't fix the problems of Jews and Muslims north of the Arctic Circle with practices on cooking or fasting concerning sundown.

Tuesday, March 15, 2016

Review: Ready Player One

"Ready Player One" by Ernest Cline, is a sci-fi novel about a kid, living in an impoverished near future, escapes like most of the population into a super-powered virtual world invented by a Steve Jobs style nerd. The plot of the novel is following this kid trying to find an 'easter egg' planted by this eccentric inventor bajillionaire, all by playing different video games or by using pop cultural references from nerd culture () most of these from the 70's and 80's (the dawn of blockbuster movies, and PCs and video games (arcade games, PC games, and pre-Mario Bros game controllers).

I don't know. The nerd-pop-cultural references were all there. Star Wars, Star Trek, Blade Runner, Monty Python, War Games. Joust, Defender, Dig Dug, D&D, all well referenced, lines of dialog. All well suited to my personal memory of teen years. Lots of excitement and virtual explosions and real explosions and plot twists and I'm sure hidden easter eggs in the novel itself.

But I'm an old dude. I don't see how kids these days (2011) would appreciate the references.

The tone is very much 'young adult novel'. It should be advertised as such, because it's not Philip K Dick if you're expecting that. The concerns are all of a cliché 18 year old (does that girl like me? I will obviously win this game having played it literally hundreds of times or literally never! I hate my welfare aunt who I live with since my parents died.)

The writing is like Asimov. I don't mean that as a compliment. Despite its obvious attempts at being modern and PC, they all come across as clunky white-male-teenager-privileged like a nice mormon dad coming to terms with a child caught drinking coffee. The main character's best friend on-line, a dude like himself but cooler, turns out in real life to, wait for it, it's shocking, are you sure you won't be shocked, a shy black overweight lesbian. Oh and the girl I like in the virtual world whose avatar is totally hot, in real life, she's also hot except she has a port wine stain on her face. The horror. The shame. The forced lesson of understanding of others without being other.

And the plot should be considered simply a string of the most unmotivated deus ex machina's and Mary Sue. And this is two levels deep, both in the engineered MMORG world and in the simulated games within that world. Oh did I mention this one hidden rule that you get 40 lives if you die the right may in this video game? Convenient that the best friend of the inventor comes to help out the gang at the last minute. Oh no, the opponents destroyed absolutely everything (virtual) with a  pixel bomb (sorry, that's not in the book but it's the shortest way to give the same idea), but the one tiny thing needed to complete this one magic task left happens to have survived? I'll win a bajillion dollars, I think I'll share it with my friends even though I won the game at the end, I'm a great guy!

The book is a lot of fun (moreso if you recognize the references). But it's mostly processed sugar and wish-fulfillment. Should be a fun movie, which should be able to avoid most of these clunkers.

Monday, March 7, 2016

An annoying argument/information trope

You know what really bugs me? When you're reading an article and it says:

"Last year, 350 bajillion Americans stabbed themselves in the face with a fork"

Yes, that's tragic. But the additional thing that annoys me is that nowhere in the article does it say how many people are using forks when they don't stab themselves in the face or at all, how often did people do it last year or in the world, or what the data source is, or if this was a meal accident vs kitchen clean up accidents, or what about people stabbing others like that, or if this is counting repeat offenders or stabby motions or what.

But the biggest annoyance of all is the bigness of the number. How big is that number really? Why that number (which usually sounds like it is quite a bit more than the number of forks or people with the capacity to do such a thing). It's like magical thinking, saying a big exact number invokes some mystical 'wow'. It's a very specific thing for a very fuzzy idea. Self stabbing bad. A lot bad. Wow, lots of bad things is bad. Wow.

Oh, so you want me to be specific? OK, specifically any article anywhere that mentions a number. Mostly science popularization articles.

Sure, the main problem is the base rate fallacy, but it's so much further down the scale than that. It's the 'Wow, a number' fallacy.

Monday, February 1, 2016

Chomsky vs Google, Structuralism vs Behaviorism

It's 2015. Google has been in business almost 20 years (since 1998). Their primary tech model for web page search is (still) to split all findable web pages by words, make a word/concept vector for each page using the entire corpus of words and rank a word search using links to other web pages (the PageRank algorithm). It is primarily a data driven process rather than an expert driven process. Of course there are lots of add ons, hand-tweaking, special cases, but at the center is an automated process of using what words people have used and what they've linked to.

It's 2015. Almost 60 years ago, Chomsky revolutionized linguistics (assuredly pursuing already existing trends in structuralism). Though the revolution started in substance with 'Syntactic Structures', he also put in a a mortal wound to (already dying) behaviorism with his critique of Skinner's Verbal Behavior. Skinner's thesis was that people learned language by example, by mimicking the thousands of utterances, assimilating the patterns heard. Chomsky's critique was that, in so many ways, this was wrong. The variety of known languages had a narrow set of commonalities not explainable by the broad possibilities allowed by reaction conditioning (fixed action patterns, operant conditioning, stimulus response). People seemed to learn from negative information. Chomsky's criticisms were so incisive and convincing

So behaviorism went out of favor, and Chomsky's linguistics is still like Newtonian mechanics; even if there's a linguistic Einstein, it will only be a slight correction to the very accurate approximation that is Chomskian language theory.

But Google. It is so obviously successful (sure as a company, but their search capability). More relevantly, Google Translate is essentially an ngram analysis. It is really good! Surely it makes many groaning mistakes on uncommon languages, but as time goes by it is more and more successful. It is a poster child for behaviorism. It is behaviorism embodied in a machine. And it works so well.

The point is that Chomsky won 60 years ago with, not exactly rationalism but more like introspection (which had lost earlier). And now Google is winning with pure un-introspected descriptivism.

But why? Why is statistical NLP so (currently) successful (when based on single words or short sequences of words, not constituent phrases) and syntactical NLP (POS, parse trees) is, well, not exactly wrong, just not terribly useful?

Maybe it's machine performance and having lots of data.
Maybe the words themselves have a lot of meaning and just being in the same sentence is enough.
Maybe understanding parse trees is very informative but only under toy conditions; the bag of words has the bulk of the information.

Google is killing Chomksy. It's like saying that Popper killed Logical Positivism. He did, sort of, but along with others, and anyway it's not really dead, just a basis for what comes afterwards.

Friday, January 22, 2016

Metaphor is a Metaphor. A Leaky Abstraction is a Leaky Abstraction

Bear with me.

Metaphor is a metaphor. A metaphor is a transfer is a carrying over (meta- (GR) = trans- (L) = over, across, -phor (G) = -fer (L) = carry, bear). A metaphor is a transfer of meaning from one literal sense to a figurative one where, hopefully, the transfer to the new domain keeps things one-to-one.

Imperfect metaphors are called leaky abstractions (at least in software). And 'leaky abstraction' is a leaky abstraction. They leak because the literal source of the abstraction leaks through to the abstraction layer. An abstraction or a metaphor is metaphorically used as a container of fluid some of which leaks out (but onto what? which is the source and which is the target (in another metaphor of metaphor)). You can't take the abstraction layer literally, you have to know something about the underlying source.

Also, 'figurative' is figurative or metaphorical; I often take metaphor as a synecdoche (or metonymy; synecdoche is a metonymy of metonymy) of figure of speech, in that it, figure of speech, is not literal. A figure is a picture, which is a good metaphor for metaphors... or figures of speech. 'Literal', on the other hand, happens to be somewhat non-literal because it is about writing, which is a metaphor for verbatim, that is the primary surface definition. 'Literally' has been used non-literally (that is as a general intensifier) literally for ages, but universally (that's hyperbole which is a figure of speech which is just a lie that we all agree to and not metonymy) recognized as wrong.

Borges said (in This Craft of Verse) that Lugones said (in Lunario sentimental) that "all words are dead metaphors", which is a dead metaphor because nothing has really died. Or rather the original meaning died or faded away very slowly, but you could resurrect it a little if you tried. So it's a little leaky.

We're swimming in metaphors!

Also 'Metaphors We Live By', by Lakoff and Johnson

Thursday, January 21, 2016

Technical Debt is a Leaky Abstraction, but so what

Technical debt is a recent term in software engineering used to describe potential later problems that may be caused by known decisions now. For example, suppose a customer asks for a feature that can be implemented cheaply and quickly, but it will introduce security holes or be very difficult to generalize if done quickly, or will prevent another rare feature from working without lots of rework. You're making things work now for some pain later. You would have much less total pain overall if you 'do it right' today, but cheaply and quickly are more important.


(from collab.net)

Saying 'we have a lot of technical debt in our software' is very loose talk for 'we have either a lot of bugs that no one is complaining about' or 'we don't do code review so I bet there's a lot of crap that gets deployed'.

A leaky abstraction is another metaphor in software engineering. When one creates a new layer intended to hide all the details of a lower layer, For example, floating point numbers are leaky because they try to hide all the gross details of finite bits per number approximating perfect precision of the desired  numbers, but sometimes you end up having to be aware of the underlying implementation because they leak through the abstraction (eg a+b usually equals b+a except when b is much smaller than a, and to deal with that you need to know some details of how the floating point ops really work under the hood).

Technical debt is a leaky abstraction in that the metaphor cannot be taken too literally; if you try to follow implications of the words, it breaks. Debt is a balance in a ledger, you can owe or be owed a value. Technical debt, being very qualitative, is hard to put into numbers, you just have a vague sense of 'this is bad' vs 'this is really bad' vs 'this is tolerable'. The debt isn't really about the features themselves but about the time and mental effort needed to implement things.

The first picture is a terrible explanation, the following is much better:


(from commadot.com)

All I'm saying is that technical debt is a leaky abstraction, a faulty metaphor. There's no paying back, it's just cleanup.

Using the term is great because it is more politic than saying 'The code is a mess and needs some cleanup. Features are really hard to add'.

Tuesday, January 19, 2016

Names make theories make names

Richard Feynman, the Nobel Prize winning physicist and Challenger disaster O-ring explainer, has a couple of anecdotes about naming. 

One is about the 'map of the cat', where Feynman had to give a talk to his graduate zoology class. In preparation, he went to the library and asked for a map of the cat, to which the librarian responded "You mean a zoological chart!"  (I'm guessing 'what a funny thing to say') Then later when he presents this, his fellow bio students say "We know all that!". Feynman says that they "had wasted all their time memorizing stuff like that, when it could be looked up in fifteen minutes."

The other story is much earlier in his life. All the (nerdy) kids on the playground try to one up each other on what their dad's taught them. "What do you call that bird? What about that bird?". But Feynman's dad said  something like it's called X in language Y, Z in language W.


You can know the name of that bird in all the languages of the world, but when you’re finished, you’ll know absolutely nothing whatever about the bird. You’ll only know about humans in different places, and what they call the bird. So let’s look at the bird and see what it’s doing—that’s what counts.” (I learned very early the difference between knowing the name of something and knowing something.)

What is the point about these parables? He goes on to explain that names don't explain anything. He explains that these technical terms for anatomy or for bird varieties or for whatever science are just terms, they're not explanation themselves. There is a tendency even for these technical terms to be magical invocations, the totems of a closed guild, supplications to the gods, when these terms are barely paratactic gestures of pointing, a superficial 'behold', an inarticulate label with no explanation of the depth of the experience. "What kind of bird is that?" "It's a sparrow" "Why does it do that?" "It's a sparrow." as though emphasis is explanation enough.

Except... what do you expect? Is naming so terrible? Do you want to do away with naming and simple move on to the much more interesting explanation? Is naming so simpleminded?

Where did the names come from? Without this being an explanation of historical linguistics, presuming terms like gastrocnemus, sparrow, and inertia are somewhat random and distinct, these labels are hooks for the concepts. A lot of thought, using other labels or conceptual manipulation, led one to label this object or concept one thing, that another. If our thoughts are not necessarily tied to language, communicating them certainly is (though a gesture or picture can go a long way, like a shrinking ring in ice water). 

Names and words are little theories in themselves. We learn most of them superficially, but eventually we acquire their nuances. A new word, like inertia, is opaque to the newcomer, but at some point in time, the scientist or experimenter was playing with a number of concepts, and eventually some concepts coalesced out of that thinking and one of them was given the label 'inertia'.

Yes, knowing a name doesn't explain anything. Or rather, it explains very little. Knowing how to use a name is nontrivial, but has little explanation to it. Answering why requires being able to manipulate a number of names, but having those names is necessary. 'Black hole' is the culmination of a lot of thought. That it is a thing is the consequence of lots of thinking. And the start of a lot of thinking. Once you get to that concept, a lot of thought has gone on and not having that term would be a great loss, leaving us to swim around a number of concepts of relativity but don't quite say what they really mean. Feynman is saying that it is dumb to stop at the names of things. Sure, don't stop. But don't let that stop you from naming things because it'll be that much harder to continue without the name.

A name is itself the end product of a theory, and it makes further theories possible. 

Wednesday, January 13, 2016

Prescriptivism vs Descriptivism: which is worse?

Prescriptivism vs Descriptivism: which is worse?

These two words are used to describe one's attitude towards language usage; at its very simplest do you prescribe or describe how you speak, what are people supposed to do vs what people actually do, 'should' vs 'is'. When these terms are thrown around (and I do mean thrown, like mud pies) it's almost always meant to sting.

Objectively, prescriptivism is usually understood to mean keeping strictly to the formal rules of a language and descriptivism is more about discovering and recording the rules of language however people say things (whether they match the formal version or not). Newspaper editors and school teachers are often the supposed standards of prescriptivism and linguists as that of descriptivism. Your secondary teachers are teaching you the rules of good grammar, and the linguists are being scientific about what the rules actually are.

M-W's third edition dictionary (1961) is often cited as a classic of the descriptivist abyss, putting in words of dubious provenance, all the good profanity (which at least got some kids to crack it open at least once). The dictionary was decried by many as the nadir of pandering to idiocy, the last gasps in the decline of western civilization.

Informally, from the prescriptive point of view, descriptivists are 'anything goes'; whatever people say is what is allowed, nothing and no one is wrong, there are no mistakes, 'ain't' and 'between you and I' are now OK and that is just wrong and descriptivists are avatars of the decline nay the destruction of western civilization, regression towards the mean, the twilight of the idols, the idiotocracy, the worst are full of passionate intensity.

From the descriptive point of view, prescriptivists are stuck up old school marms, who make up arbitrary style rules, say 'you can't do this-you can't do that', split infinitives, prepositions at the end of a word, singular they, when people have been saying it that way forever and you just made that rule up because you are warped, frustrated old man. P's try to enforce their made up rules, when it's just their own repetition of some one else's peevish peeving on personal style. Descriptivists say that prescriptivists single way of speaking is reprehensible elitism and that they think they're are morally superior to others, and any other patterns are slack jawed, uneducated, lower class.

But that's just the tendentious version.

From the prescriptive point of view, there really are mistakes that people make, infer for imply is just wrong, 'literally' for not literal things is just wrong and native speakers just do not say it that way. A common error is not necessarily a common alternative.

From the descriptive point of view, there are many patterns out there for the same thing. Different contexts have different rules. People will say different things in different situations, one way speaking at the press conference and another in the bar, and neither is wrong (or the differences show up in different contexts).

People may very well avoid a split infinitive and prepositions at the end of a sentence in writing for stylistic or esthetic reasons, but in speech there's hardly getting around it what with all the phrasal verbs in English. The double negative ain't no (= "isn't a") problem as a perfectly everyday way of speaking for some varieties of English (that are, as the linguists say, not highly socially respectable (= redneck or AAVE)) or grammatically and logically appropriate either, two negatives making a positive or a form of understatement (that was not an uncomplicated sentence).

And this is where it comes down to the real difference.

Descriptivists are really prescriptivists at heart. Descriptivists just recognize many more varieties than prescriptivists, and those varieties tend to be much more informal or used by socially non-pinnacle subpopulations. People who are called by others prescriptivists do seem a little judgy, and people who are called descriptivists do seem a little too accepting of things that are  (i.e. errors). But if you just label large groups of patterns as varieties, Prescriptivists are just talking about (mostly) a single variety, the newspaper/college paper variety, and descriptivists allow for a wider range of varieties, informal or regional or inarticulate (well, maybe not the last one). There are still mistakes. It just depends on the context or variety you're in.

Sunday, January 10, 2016

Bayes Theorem != Bayesianism



Words are slippery. They have many meanings. Change an ending and you change everything. Not exactly everything, but enough to confuse everybody.

Bayes theorem is not the same as Bayesianism.

Bayes theorem is an elementary mathematical truth of elementary probability.

Bayesianism is a big trend in statistics for creating and interpreting new statistical tests.

So it is fairly obvious now that they are different. They are certainly related, but they are still different things altogether.

Some details are in order.

Thomas Bayes was a man who the famous Bayes Theorem (of elementary probability) was named after.

Also, the direction of Bayesian statistics was similarly named after him. Because of how the theorem thinks of probabilities.

Sure, all three, the man, the theorem, and the statistics philosophy, are related. But not as closely as you would imagine.

First, Bayes was an eighteenth Presbyterian minister in Kent, England. I'm sure he was quite important to the people around him, but the theorem named after him, was never published by Bayes himself. The theorem was stated de facto by someone else in passing, and also in passing mentioned that Bayes had discovered it. This someone else was Richard Price who was also probably important to the people around him but never had anything like a theorem named after him.

Now to the theorem.

Symbolically, Bayes theorem is, at its simplest,

$$
P(A|B) = \frac{P(B|A) P(A) }{P(B)}
$$

Simple enough, if you know elementary probability. Translated to English this means that the probability of an event $A$ having occurred, given that you know $B$ has occurred, can be computed from the probability of $A$ divided by the probability of $B$ times the probability of $B$ given $A$.

Big deal right? So what, right? The clever twist to this is that it is allows you to reverse the direction of causality, to use the past history of A's and B's together to determine the probability of something you don't know about $A$ from something you do know (the other three things on the right hand side). The calculation is elementary, you just count all your events (where $A$, $B$, both $A$ and $B$, and neither have occurred). $P(x)$ is the fraction that is the number of events where $x$ happened divided by the total number of events. $P(x|y)$ is the (note all fractions are between 0 and 1).

The proof is also elementary. From the explanation, we can see that $P(x|y)$ is the fraction the number of events where both $x$ and $y$ occur divided by all the $y$ events (whether $x$ occurred or not). That is

$$
P(x|y) = \frac{P(x) {\rm \ and\ } P(y)}{P(y)}
$$

Since $x and y$ is no different than $y and x$ this means that

$$
P(A|B) P(B) = P(A) {\rm \ and\ } P(B) = P(B|A)P(A)
$$

Divide the two ends by $P(B)$ and you're done.

This is a very short set of inferences, almost purely arithmetic. Thinking of the Venn diagram, a division is really the proportion of the subset in another larger set. A little more complicated, but giving even more insight, is to note that if you look at a 2x2 contingency table, A given B is the proportion in a row, and B given A is in a column, the theorem allows you to move between row and column.

To use it, tabulate a number of events where both $A$ and $B$ may have occurred. This allows you to calculate

It might seem at this point that the theorem is a lot of extra thought work when, if you have the contingency table already, just compute anything you want right there $A$ given $B$, $B$ given $A$, whatever. The idea of using the theorem is that often you are not presented with the contingency table, but have some good idea of the different values. The theorem allows you to update $A$ given $B$, if $B$ given $A$ is somehow magically known to you already. Actually often you don't know $B$ either.

To make this more concrete (a common example), let $A$ be 'patient has toenail cancer', $B$ 'new test on toenail is positive for cancer'. And as you may suspect, tests are not perfect. Sometimes they raise a false alarm, they are positive when there really is no cancer, and sometimes they miss the cancer, it is negative when there really is cancer.  And usually there is a huge cost in discovering if the patient really truly has cancer (like the patient dies and you do an autopsy, or you do a biopsy and discover the cancer too late to do anything). So you totally know $P(B)$, when your tests are positive, at least for your lab because you just count. You may have a good idea of $P(A)$ because of national statistics, but your much smaller set of patients may be unusually prone to the disease or unusually healthy. And you may have a good idea of $P(B|A)$ because you know of your patients already who has cancer and who of them had a positive test. And what you want to know is the probability that this one new patient really has cancer, given that the new test turned out positive.

So this says for a given positive test, you can calculate the probability of cancer (there are lots of class examples showing how this is not trivial, that lots of tests are made, to ensure that you don't miss a cancer, the test is very sensitive and may include a lot of false positives. Then if your test is positive, there is still a low chance of having cancer just more than if the test was negative.

But the point is you don't always have the full contingency table at hand. That's what makes Bayes theorem so useful.

To give some perspective, Bayes theorem is very useful theorem but it is very simple. It is one of the simplest theorems ever. It's mostly just a convenience of calculation. It is simple on the order of the theorem that multiplication distributes over addition. It is almost trivial in proof, and its application is mostly just a simplification of calculation. Calling it a theorem is on the order of calling Monaco a country: it is certainly a country but in practice is  more like a small but popular and overpopulated district in an overpopulated area of a much larger popular country.


Now to Bayesian Statistics. Statistics in general as a discipline is only a couple centuries old (and that is stretching it). Its mathematical foundations with axiomatic probability and statistical distributions based on the central limit theorem and the normal curve and special functions and practice centered on p-values really started taking off in the early 1900's with Pearson, Fisher and others. This manner of doing statistics was eventually named 'frequentist' statistics in distinction to the newer trend called Bayesian statistics. The trendy new field was called that, not because frequentists did not use or believe in Bayes theorem, but because in its manipulation of distributions relied on computing new distributions based on prior ones, analogous to how Bayes theorem computes new probabilities.

The point is that Bayesian statistics is not some super exploded hypergeneralization of Bayes theorem but rather a large set of mathematical machinery that allows one to compute in many different ways how well different hypotheses are supported by data. Instead of the frequentist procedures t-test and ANOVA, that have very strict assumptions on the distributions of the data, these new procedures allow a parameter of the hypothesis of the existing distribution which then gets updated by the procedure (or if you don't have an idea of the distribution, you can always assume the uniform prior).

You'll note I can say quite a bit more about Bayesianism, but I have spent more about Bayes theorem. Volumes could be written (and have) about Bayesianism and the religious wars between Bayesianism and Frequentism (one could have a meta-religious war whether that war is religious or substantive). There are extremely specific things about Bayes theorem I can write, but about Bayesianism it is easy to stop early without going into lots of complicated math.

So Bayes theorem does not mean the same thing as Bayesianism. Bayes theorem is a tiny almost trivial calculation in elementary probability, with a lot of uses. There is no controversy about the theorem. Bayesianism (or Bayesian statistics) is a forceful trend in statistical practice with a large set of alternative theoretical and practical procedures. It is a controversial trend among statisticians, or rather it was controversial in the 70's snd 80's and is mostly mainstream among them now right along side traditional frequentism.

So don't let the similarity of the names lead you to think they are the same. They are similar and related, but not that much.

  • If you are thinking of a calculation of a probability of $A$ given $B$ using the probability of $B$ given $A$ (a very very specific usage), then you're using Bayes theorem.
  • If you're thinking of a trend in statistics that avoids distribution assumptions, or rather allows you to specify your arbitrary distribution assumption, then you're talking about Bayesianism.
In short, Bayes was a guy who is famous for a theorem he may not even have stated, much less proven, Bayes Theorem is an elementary probability calculation, and Bayesianism is a broad trend in statistical practice.


Tuesday, January 5, 2016

In defense of astrology

Astrology is the study of personality and personal events with respect to celestial objects and ones birthdate and location. It is often used in prediction of events of a person's life and their personality. In the European tradition, astrology is mostly based on the position of the sun in the sky, which constellation of the zodiac it is in, on a person's birthdate.

Most people are aware of astrology through the idea of a daily horoscope (often printed in newspapers on the comics page next to the word jumble or chess column) (these days with the increasing marginalization of newspapers, I don't know where people experience it).

Many people view it, and dismiss it, as entertainment, on par with palm reading or Tarot cards, not something to be taken literally. Those with a scientific or practical bent might dismiss it outright as an empty myth or BS because it is, to use the jargon, not falsifiable. There are a some who still believe that it may work.

But the general consensus is that it is BS. All I want to do is pedantically (but not to contradict this consensus which I share) show that Astrology is indeed scientific in the technical sense, just one that is not supported by the data. A science that has been falsified is still scientific, just disproven.

There are two common applications of astrology. One, based on your birth sign one out of twelve, to predict, is very vaguely the events of the day. For example (taken from a random horoscope site; it is very exemplary of the kinds of writing):
Today you urgently need to understand and master the art of balancing the physical reality with your vision. While your plans are ambitious, you have to understand the actual obstacles top these plans. Otherwise, you are headed for a collision course in spite of all your good intentions. You also need to understand that your plans may be conflicting with those of someone else who is as determined and ambitious as you.
(source (no link to the specific text for a day, just generic for the sign))

These tend to be the greatest source of disbelief: how can everybody having the same birth sign have all those things happen? These read like fortune cookies that could be true of anyone whatever their birth sign. Accidentally read the fortune of another sign and that is just as likely to happen or not. Astrological predictions like the above are a great example of confirmation bias in action; all you need to happen is for one thing to match what happened that day (if you read the horoscope after the day), or you just may make one of things happen, and you'll come to 'believe' that horoscopes work.

The other common application is a prediction of your distinct personality. A natal chart, the position of major celestial bodies with respect to the constellations and each other at the the time and place of birth, is used to predict personality. The position of the sun is the most important, telling you your 'sign', but the moon and planets and their relations are important. This facts lead to statements of the form like 'The moon is on the cusp of Libra and Virgo, and Mars is in opposition to Venus but square with Saturn meaning that...' followed by some explanation involving the personalities of those celestial bodies, inspired by their mythological stories.


(image from wikipedia)

My defense is that all these things make astrology not simply a myth but an actual scientific theory, scientific in the sense that it could be the case, and that we can test whether predictions by it or its parts hold or not and there is a postulated mechanism for these effects that holds up. Of course, none of it holds at all. My defense is simply that astrology is legitimately falsifiable.

Counter to most opinions, I consider astrology to be falsifiable because one can make a study of daily horoscopes or a study of star charts and individual's life events or personalities. There is very scientific measurement of celestial body positions. There can be predictive personality tests (but many currently personality tests are currently not considered particularly good at prediction, for example Meyers-Briggs personality test (MBTI), the somewhat similar Big Five test is supposedly somewhat more predictive).

St. Augustine's dismissal of astrology because twins don't have identical outcomes is motivating to me but scientifically could be problematic. Twins do share quite bit of personality. This thought experiment this could be modified only the slightest to be more supportable; compare the lives of two children born the same day in the same hospital. The general predictions of 'astrological theory' can barely be supported. Some lifestyle and class similarities will predict most of the similarity between the two children.

The horoscopes in newspapers or your astrological sign ("You must be a Libra!") are, I agree, not scientific because they are so vague as to be barely even functional much less predictive (meaning that the pronouncements they make can barely be mapped coherently to life events or personality.

But an astrology based on actual measurement could be falsified and therefore is a scientific theory. Its effects just have never been established.

By the way, the Middle-eastern-based astronomical astrology (the greco-roman constellations-sun-moon-planets and mythically associated personalities) may have exact predictive power but there's one huge glaring plain old mistake in execution. The constellation the sun is in, one's sun-sign, as usually given today, is mismatched with the prescribed dates.  The twelve ranges of dates are set on the sun based along the ecliptic and the positions of the constellations. The constellation labels were set 2000 years ago. Because of the (astronomically measured) precession of the equinoxes, the position of the sun during the year has shifted a little more than the space of one constellation.



(source: wikipedia)
That is, on March 21st (the spring equinox, that start of the zodiacal year), when tradition states that the sign of Aries begins, in the year 2000 the sun is actually as measured in the sky against the backdrop of the constellations, already part way through the next constellation of Taurus.

So this is not an error of interpretation or logic, it is an even more elementary error of data recording/reporting.

Monday, January 4, 2016

'Thing Explainer' review

'Thing Explainer" is a picture book by the engineer-cartooner Randall Monroe (who does xkcd). This has so much stuffed into it, not just information but also manner. It is two major things that are at odds, so I don't which one to present first. So I'll just do it: it's a book that 1) uses only the first 1000 most frequent words in English (so it has to use some cleverness for technical concepts) and 2) presents technical concepts.

- How it's made and How it works. If you like 'Cathedrals', Lego, science, whatever, this is 'How it's made' but for more sciency things.
- At the same time, it is Oulipo-style constrained writing. The author took an arbitrary restriction (not exactly arbitrary) and, for all the labels of the hugely entertaining drawings of scientific concepts and engineering artifacts, made them entirely using the 1000 most common words in English.

The note at the end of the book states what his Oulipo rule really is (and gives the words he allows himself:
Note: in this set I count different word forms as one word
I could have said ship but I stuck to boat because space boat makes me laugh.

And he doesn't feel like he has to use every word in the list (this isn't serial music); he doesn't use a couple extremely common but profane words. The funny thing is is that he doesn't force himself to absolutely strictly adhere to the rules.

But the point he intended comes across. He wanted to explain abstruse scientific comments in a manner understandable by those early in the language (and thought) learning process. Language is not thought, so those who understand the concepts already can find the technical terms that match up what the author translated into slightly more verbose 'simple' sentences and similarly, the accessible vocabulary is used to get across the same concepts seemingly necessarily captured in abstruse technical vocabulary.

There's another side to using 'basic' English. The bad side of this is that it is deliberately dumbing down science. Simplify the language removes true things. It is intentionally anti-intellectual.

Or rather, it is nominally anti-intellectual, it could be anti-intellectual, but it is not. It is not the diametrical opposite of anti-intellectual, which I take to be obscurantism, because the whole point of the exercise is to be intellectual, present knowledge, and it is intentionally not obscurantist, because it is intentionally trying to present knowledge in a digestible form.

One exercise is to attempt to translate back to technical language. What is the scientific terminology that was the source of the circumlocution. What exactly is a 'fear water'? Oh, it's the adrenal gland, or at least adrenaline. When you translate technical terms, which are mostly stipulated and have their single technical definition, into multiple non-technical terms, there is the likelihood that the new term will be using high frequency words commonly used for lots of things already. So the new term requires some more frequent use to make sure it applies to that original singular technical concept. For example, 'power box' is used for electric battery but surely could be used for other boxes associated with power. But it is easy to see that with repetition, we could get used to just using 'power box' for just those items we currently call electric batteries.

Highlights:
- Includes descriptions of: a nuclear bomb, the ISS, the periodic table, a smartphone, the LHC, a jet engine, cell anatomy. Look, I could just list every page. It's both science and technology.
- 'thousand' isn't in the top 1000, so discussing itself is already constrained (it's 'ten hundred').
- 'Nine' isn't in the top 1000, so it is given as 'one more than eight', 'almost ten'.
- 'Gold' is the only element name that remains on the periodic table.
- the tree of life. Most animal names are fairly uncommon nowadays, now that few of us live on farms or the wilderness. So lots of liberties taken here. But a lot of the descriptives work. For example, 'gray tree jumper' for squirrel, 'sea dog' for seal, 'pocket babies' for marsupials, 'sweet thing' for fruit are all excellent. But there are some clunkers like 'food often in cans' (I have no idea), 'small dog' (is that a fox?). Here, with so many examples, it's nice to see how one can be paratactic and perceptual and that's often what one finds in other languages (because it is so hard to see the many times it already is the case in your own). Nice inclusion of 'water bear' for water bear/tardigrade/moss piglet/slowstepper.

I want to see the translation to Chinese. Well, the translation back to English. So I wonder if there'd be a difference if the Chinese were created from scratch (thousand most common characters or thousand most common terms) (presumably translating the given text directly would, or should, be dumb.

Also, I'd like to see Euclid's Elements done the same way.

One negative. If you're like me, you're getting older. I mean that with respect to the book. Meaning with respect to how it is printed. Meaning... ugh. My eyesight isn't terrible, but the font size is so small that it is a chore to read. I'm sure it wouldn't be so bad if my eyes were younger.

Sorry, two negatives. I am disappointed it is so short, only 60 pages but some fold outs.

Holy crap, a skyscraper!


Thursday, December 31, 2015

What's with dictionary definitions for metaphorical usage?

Like a Jeopardy contestant giving an anecdote about their life changing experience when a pet dog tore up a favorite slipper, I have something I am terribly upset about.

I have noticed some online dictionaries giving metaphorical definitions. By this I mean that for a word, giving a meaning entry that is metaphorical, not its literal meaning.

For example, 'to devour'. Without checking, this means to eat ravenously. But it's easy to see that, say, a paper shredder could be said to devour some documents,

You may well note that many words, rather most words, really almost all words have multiple meanings (except for highly stipulated technical terms, and even then things can get loose). Our perception is usually that a word has one meaning and that's that. But then we notice that, well, that same spelling can be used for more than one distinct concept, usually nearby.

You may then well note that for many words, there really is a primary meaning: its meaning out of context that everyone thinks of first, and then secondary meanings, ones that appear in different contexts, that are slight extensions of the primary meaning, or used in analogous situations, not literally.

Here is the example for 'devour' from google:

de·vour
  • eat (food or prey) hungrily or quickly.
  • (of fire, disease, or other forces) consume (someone or something) destructively.
  • read (something) quickly and eagerly.
The first is the primary definition, the second a metaphorical one, the third... huh? That is definitely not what 'devour' means. Sure, one can easily use it in 'I devoured the sequel' meaning that I read the sequel quickly and eagerly. But that's not the meaning of 'devour'. That's not what 'mean' means. It's too specific. Does the omission mean you can't watch a movie voraciously? How come 'reading' is more devour-like than other metaphorical uses? This isn't right! If you include read, you should include every other possible metaphorical usage. But of course that is too laborious to imagine.

The difficulty I'm having is the demarcation line. When does a reasonable metaphorical usage of a word become dictionary-entry-worthy?

Taking the title word 'incensed', which was not deliberate, its primary and only definition is around 'angry', and no mention of the ostensible literal meaning which might have been 'burned like incense'. It already is a metaphor. The only definition is non-literal. So putting in metaphorical usages is necessary. At what point of semantic drift, at what point of leaving the original does a dying metaphor become dead, and at what point does the altered meaning move from quantitative difference to qualitatively requiring a new entry?

A close analogy is with suffixes. You can take any word in the dictionary and find some suffix that applies that will create a perfectly good word. 'Neologistically' is my favorite. 'Neologism' to 'neologistical' to 'neologistically'. Probably not in any dictionary, but perfectly understandable, sounds like a word, and is (arguably) undeniable as a word. Does it need to be in a dictionary? At what point do lexicographers decide not to include a possible variant?

There are a number of possibilities. Checking multiple dictionaries, most don't have the strange 'read' entry, only Google and Macmillan. What I suspect is that there is a tendency to require definitive alternate usage for an additional entry to be made when the entries are edited by humans. And that Google and/or Macmillan introduce metaphorical entries mechanically and its easier to be lenient. The latter two dictionaries certainly need human oversight; that is, the 'read' entry isn't a mistake but a lower threshold.

This will require looking into the editing policies of the various dictionaries.

Monday, December 28, 2015

Fix it now! Necessary minimal examples for change in English

The problems (two of them) are pronouncing can vs can't and fifteen vs fifty (or really more generally -n vs -n't and -ty vs -teen).

Well, it's not global warming, but there are a couple problems with English, specifically pronunciation, that are problems in information exchange. It's not some style thing, like the inarticulation of textspeak or emojis, or plain semantic errors like 'literally' for when it's not literal.

It's about pronunciation where the actual information being transferred is at it's most distinct. And the distinctions are being softened to almost disappearing but the information is as substantive as you can get. This screams out for language change, but...I just don't see any that people are unconsciously doing. The details are:

- can vs can't - In American English, standing alone, these two are identical except for the addition of the 't', which stands out in only the most labored of articulate speech. Word final 't' is unreleased in AmE, meaning that though 't' is usually aspirated elsewhere, but at the end of a word it is not.  This results in a difficulty for foreign language learners for hearing the distinction and for producing the distinction, what little there is.

But what's hard for foreigners can be hard for natives and even an area for language change (see the cot-caught merger).


  • I can do that
  • I can't do that


The intonation/timing for these is different (easy to see for native speakers but difficult for non-natives). But in high noise areas, these will be impossible to differentiate. "Can you move this 400 lb sofa off my chest?". "I can do that" vs "I can't do that". The answer is kind of important.

The same situation holds for a few other contractions involving 'not': could/couldn't.

My proposed solution: I can't think of a good natural one other than encouraging people to not contract when there is a 'not'. But for the positive version, the most natural way would by to shorten it considerably as '/kn/' or for both emphasize the sentence into nation "I cn do that" vs "I can't do that" (where the intonation would be terribly weird for the version of opposite polarity).

- -ty vs -teen:  The teens and the tens, thirteen/thirty and above, are similarly rooted but dictionary-pronounced distinctly. thir-TEEN vs THIR-tee. Different stress, different last syllable.

Except in regular speech these are about as close as you can get in pronunciation, and differently from most other close pronunciations (or eevn homophones), context rarely distinguishes them. "How far is it from the last to the next gas station?" "Oh about  thirt.. miles." "What? Is that thirty or thirteen miles?" "Thir-Teen" "What? THIR-ti or thir-TEEEE-nuh?" "The first one." "Oh. Then we're going to run out of gas."

The context doesn't say which one is more likely, and pronunciation has to be very articulate to tell the difference. The stress isn't pointed enough to tell. This is a perfect time for native speakers to unconsciously do something (make a slight change) to encourage better understanding (to avoid the waste of energy).

My suggestion? It's gonna sound bad but... for 'thirteen' say 'thir-TANE' or 'thir-TEEN-uh, and for 'thirty' say 'THIR-tuh'. To me these are the least unnatural and closest to natural pronunciation. Spelled out they look awful. But this is my prediction/suggestion.

I know. It sounds terrible.  But I don't want to run out of gas.


NB This is entirely about General American English... I can't expect to speak for other varieties of English. Also, I speak authoritatively about my own variety...but I may be biased and there may be free variation and some people may speak with more articulation than I can. So in one sense I am saying 'I am right' (which may be annoyingly authoritarian) but in another I am saying 'here is what I think I see, some others with great authority see it too, you can check now too now that you're aware of the possibility'.

Docs don't want to see your FitBit records, but ...

Docs don't want to see your FitBit records, but they do want your Holter monitor.

Docs do want you to exercise, or rather keep an active life and intense exercise is a good part of that but also make sure you don't sit down all the time, just walking and standing up and moving around calmly is probably a better thing to shoot for.

Having a FitBit or other exercise tracker, they consider that great, of course, because it means you are thinking about your fitness and trying to keep active.

But your PCP (your family doctor) does not want to see your FitBit records. They don't care how many steps you make a day. They don't care that you missed a few days last week (OK all last week. but the week before I made it every day!). They don't care about the fine detail of every second of every hour. They just want to know that you're using it. Or that you're making progress. Or that you're unable to hit the targets (knee surgery?).

Yes, the FitBit data is 'big data', and big data is useful...in general, but your PCP can't do anything with all those numbers. Your PCP isn't a big data consumer. Your PCP just wants to know (for the most part) Yes or No (or better than last year). Yes, totally get a FitBit, and totally because you think it'll please your PCP, and totally tell your PCP that you have one, and they'll totally be genuine proud of you. But don't think they can do anything with your data.

Maybe, just maybe, your cardiologist wants to know some of these details. Wait, no, your cardiologist doesn't want to know your FitBit data. What FitBit is tracking is not useful for them. Steps per day? Heart rate pattern over a time period? Oh...maybe a cardiologist does want to see a continuous EKG, like what you get from a Holter monitor. That is a specialist who can understand that data under a very prescribed situation. And with intensive study of that data as a specialist.

If say these fitness trackers somehow morph into a full body tricorder, measuring all possible metrics continuously, then maybe just maybe, it will become useful as a big continuous stream.

I'm sure the FitBit company data scientists could tell something interesting about behavior and fitness by working with sports physicians, epidemiologists, internal medicine in general, to discover interesting patterns of use of the product and specific health metrics.

But for you? Right now? Are you using a fitness tracker? Your doc does want to know that. Are you meeting your fitness goals everyday? Yes, your doc want to know that. Does your doc want to see your heart rate for the past month continuously by minute? No, your doc does not want to see that.

Wednesday, November 25, 2015

"Big ideas in mathematics"

My answers to the survey What do you consider to be the main "Big Ideas" in mathematics?

It's all about proofs:
- truth != proof (Goedel's Incompleteness theorems and what follow)
- logic and math still support each other (Reverse Mathematics)
- proofs are not just algebraic manipulation. They give meaning (Combinatorial proofs)
- automation in proof assistants will accelerate mathematical progress by humans (automated deduction)
- the most abstract of abstract nonsense (Category theory, no this not particularly about proofs)

These are all the biggest of big ideas in mathematics. All the others that are specific to an area are what I would consider too... contingent. Topology, algebraic geometry, algebraic K-theory, as important as they are, don't have any far reaching ideas. OK, number three above, combinatorial proofs, I just like a lot and is somewhat like those three I just disparaged.