enfascinationhttp://enfascination.com/weblog
science towards nescienceMon, 19 Mar 2018 17:48:38 +0000en-UShourly1https://wordpress.org/?v=4.6.10My most sticky line from Stephenson’s Diamond Agehttp://enfascination.com/weblog/archives/1902
http://enfascination.com/weblog/archives/1902#respondMon, 19 Mar 2018 17:46:55 +0000http://enfascination.com/weblog/?p=1902It’s been years and this never left my head. The line is from a scene with a judge for a far-future transhumanist syndicate based on the teachings of Confucius.

The House of the Venerable and Inscrutable Colonel was what they called it when they were speaking Chinese. Venerable because of his goatee, white as the dogwood blossom, a badge of unimpeachable credibility in Confucian eyes. Inscrutable because he had gone to his grave without divulging the Secret of the Eleven Herbs and Spices. p. 92

]]>http://enfascination.com/weblog/archives/1902/feed0Generous and terrifying: the best late homework policy of all timehttp://enfascination.com/weblog/archives/1896
http://enfascination.com/weblog/archives/1896#respondMon, 19 Mar 2018 17:32:13 +0000http://enfascination.com/weblog/?p=1896I want all of my interactions with students to be about the transmission of wondrous ideas. All the other bullshit should be defined out of my life as an educator.

But life happens, and students can flake on you and on their classmates, and if you don’t discourage it, it gets worse. So now the transmission of wonder is being crowded out by discussion about your late policy. And late policies are a trap.

For a softy like me, any policy that is strong enough to actually discourage tardy work is too harsh to be credible. To say NO LATE WORK WILL BE ACCEPTED is all well and good until you hit the exceptions: personal tragedies you don’t want to know about, the student who thoughtfully gave you three weeks advance notice by email, your own possible mistakes. Suddenly you’re penalizing thoughtfulness, incentivizing students to dishonestly inflate their excuse into an unspeakable tragedy, and setting yourself up to be the stern looker-past-of-quivering-chins. And what’s the alternative? 10% off for each day late? I don’t want to be rooting through month-past late-night emails from stressed students, looking up old deadlines, counting hours since submission, or calculating 10% decrements for this person and 30% for that one, especially not when such soft alternatives actually incentivize students to do the math and decide that 10% is worth another 24 hours. Plus, with all of these schemes, you’re pretending you care about a 10:02 submission on a 10:00 deadline—or even worse, you’re forgetting reality and convincing yourself that you actually do care.

My late policy should be flagrantly generous and utterly fearsome. It should be easy to compute and clear and reasonable. It should most certainly not increase the amount of late work, especially because that increases the work on me. It should be so fair that no one who challenges it has a leg to stand on, and so tough that all students are very strongly incentivized to get their work in on time. It should softly encourage students to be good to themselves, while allowing students flexibility in their lives, while not being so arbitrarily flexible that you’re always being challenged and prodded for more flexibility.

What I wanted was a low effort, utterly fair policy that nevertheless had my students in constant anxiety for every unexcused minute that they were late.

Is that even possible? Meet the Gamble Protocol. It’s based around one idea: because humans are risk averse, you can define systems that students simultaneously experience as rationally generous and emotionally terrifying. All you have to do is create a very friendly policy with small, steadily increasing probabilities of awful outcomes.

The Gamble Protocol is a lot like the well-known “10% off for every day late.” In fact, in the limit of infinite assignments, they’re statistically indistinguishable. Under the Protocol, a student who gets an assignment in before the deadline has a 100% chance of fair assessment of their work. After the deadline, they have a steadily increasing chance of getting 0% credit for all of their hard work. No partial credit: either a fair grade or nothing at all. On average, a student who submits 100 perfect assignments at 90% probability gets an A-, not because all submissions got 90%, but because ten got 0%. A bonus, for my purposes, is that I teach a lot of statistical reasoning, so the Protocol has extra legitimacy as an exercise in experiential learning.

After experimenting a bit, and feeling out my own feelings, I settled on the following: for each assignment, I draw a single number that applies to everyone (rather than recalculating for every late student). I draw it whenever I like, and I always tell students what number got drawn, and how many students got caught. The full details go in the syllabus:

Deadline. If the schedule says something is due for a class, it is due the night before that class at 10:00PM. There is no partial credit for unexcused lateness; late assignments are worth 0%. However, assignments submitted after the deadline will get a backup deadline subject to the Gamble Protocol.The Gamble Protocol. I will randomly generate a backup deadline between 0 and 36 hours after the main deadline, following a specific pattern. Under this scheme:

an assignment that is less than 2 hours late (before midnight), has a 99% chance of earning credit,

an assignment turned in before 2:00AM has a 98% chance of earning credit,

an assignment turned in 12 hours late, by 10AM, has a 90% chance of earning credit,

that jumps suddenly down to 80% between 12–14 hours, getting worse faster,

an assignment turned in 24 hours late, before the next 10:00PM, has a 60% chance of earning credit,

and an assignment turned in more than 36 hours late is guaranteed to earn zero credit.

I will not calculate the backup deadline until well after its assignment was due.

I'm keeping data from classes that did and did not use this policy to see if it reduces late work. I still haven't chugged any of it, but I will if requested. For future classes, I was thinking of extending from 36 hours to a few days, so that it really is directly equivalent to 10% for a day's tardiness.

]]>http://enfascination.com/weblog/archives/1896/feed0How to create a Google For Puppies homepagehttp://enfascination.com/weblog/archives/1888
http://enfascination.com/weblog/archives/1888#respondSat, 10 Feb 2018 13:57:09 +0000http://enfascination.com/weblog/?p=1888Trying to get my students interested in how the Internet works, I ended up getting my family interested as well. We made this:
Here is how to install it:

Download this file, containing the homepage and puppy image in a folder

Move the file where you want it installed and unzip it

Drag the Google.html file to your browser

Copy the address of the file from your location bar, and have it handy

Copy that file name into your browser’s box for replacing or overriding the new tab page. Or, if you are on another browser, wherever in their options where new tab pages get customized.

In addition to changing the new tab page, you can more easily change the default home page to the same address.

If you want to change the appearance of this page in any way, you can edit the Google.html file as you like. The easiest thing to do is search/replace text that you want to be different.

]]>http://enfascination.com/weblog/archives/1888/feed0Quantifying the relative influence of prejudices in scientific bias, for Ioannidishttp://enfascination.com/weblog/archives/1881
http://enfascination.com/weblog/archives/1881#respondSun, 04 Feb 2018 23:28:40 +0000http://enfascination.com/weblog/?p=1881Technology makes it increasingly practical and efficient to quickly deploy experiments, and run large numbers of people through them. The upshot is that, today, a fixed amount of effort produces work of a much higher level of scientific rigor than 100, 50, or even 10 years ago. Some scientists have focused their steely gazes on applying this new better technology to foundational findings of the past, triggering a replication crisis that has made researchers throughout the human sciences question the very ground they walk on. John Ioannidis is a prominent figure in bringing attention to the replication crisis with new methods and a very admirable devotion to the thankless work of replication.

In the provocatively titled “Why Most Published Research Findings Are False”, Ioannidis makes five inferences about scientific practice in the experimental human sciences:

The smaller the stud- ies conducted in a scientific field, the less likely the research find- ings are to be true.

The smaller the effect sizes in a scientific field, the less likely the research findings are to be true.

The greater the num- ber and the lesser the selection of tested relationships in a scientific field, the less likely the research findings are to be true.

The greater the flex- ibility in designs, definitions, out- comes, and analytical modes in a scientific field, the less likely the research findings are to be true.

The greater the financial and other interests and preju- dices in a scientific field, the less likely the research findings are to be true.

The hotter a scientific field (with more scientific teams involved), the less likely the research findings are to be true.

His argument, and arguments like it, has produced a great effort at quantifying the effects of these various forms of bias. Excellent work has already gone into the top three or four. But the most mysterious, damning, dangerous, and intriguing of these is #6. And, if you dig through the major efforts at pinning these various effects down, you’ll find that they all gloss over #6, understandably, because it seems impossible to measure. That said, Ioannidis gives us a little hint about how we’d measure it. He briefly entertains the idea of a whole scientific discipline built on nothing, which nevertheless finds publishable results in 1 out of 2, or 4 or 10 or 20 cases. If such a discipline existed, it would help us estimate the relative impact of preconceived notions on scientific outputs.

Having received much of my training in psychology, I can say that there are quite a few cases of building a discipline on nothing. They’re not at the front of our minds because psychology pedagogy tends to focus more on its successes, but if you peer between the cracks you’ll find scientific, experimental, quantitative, data-driven sub-fields of psychology that persisted for decades before fading with the last of their proponents, that are remembered now as false starts, dead ends, and quack magnets. A systematic review of the published quantitative findings of these areas, combined with a possibly unfair assumption that they were based entirely on noise, could help us estimate the specific frequency at which preconceived bias creates Type I false positive error.

What disciplines am I talking about? Introspection, phrenology, hypnosis, and several others are the first that came to mind mind. More quantitative areas of psychoanalysis, if they exist, and if they’re ridiculous, could also be fruitful. In case I or anyone else wants to head down this path, I collected a bunch of resources for where I’d start digging. My goal would be to find tables of numbers, or ratios of published to unpublished manuscripts, or some way to distinguish true results from true non results from false results from false non results.

Introspection:

The archives of Titchener (at Cornell) and Wundt

https://plato.stanford.edu/entries/introspection/

Boring’s paper on the History of Introspection https://pdfs.semanticscholar.org/1191/4d0d6987fa13d7f75c0717441d1457b969f3.pdf

ESP:

Bem’s pilots

https://www.newyorker.com/magazine/2010/12/13/the-truth-wears-off (ironically written by Jonah Lehrer)

Other dead theories:
Dictionary of Theories, Laws, and Concepts in Psychology (https://books.google.com/books?id=6mu3DLkyGfUC&pg=PA49 )

]]>

http://enfascination.com/weblog/archives/1881/feed0Pandas in 2018http://enfascination.com/weblog/archives/1879
http://enfascination.com/weblog/archives/1879#respondTue, 09 Jan 2018 06:22:23 +0000http://enfascination.com/weblog/?p=1879I’m late to the game on data science in Python because I continue to do my data analysis overwhelmingly in R (thank god for data.table and the tidyverse and all the amazing stats packages. To hell with data.frame and factors). But I’m finally picking up Python’s approach as well, mainly because I want my students, if they’re going to learn only one language, to learn Python. So I’m teaching the numpy, pandas, matplotlib, seaborn combination. I got lucky to discover two things about pandas very quickly, and only because I’ve been through the same thing in R. 1) the way you learn to use a package is different i subtle ways from how it is documented and taught, and 2) the way a young data science package is used now is different from how it was first used (and documented) before it was tidied up. That means that StackExchange and other references are going to be irrelevant a lot of the time in ways that are hard to spot until someone holds your hand.

I just got the hand-holding—the straight-to-pandas-in-2018 fast-forward—and I’m sharing it. The pitfalls all come down to Python’s poor distinctions between copying objects and editing them in place. In a nutshell, use .query() and .assign() as much as possible, as well as .loc(), .iloc(), and .copy(). Use [], [[]], and simple df. as little as possible, and, if so, only when reading and never when writing or munging. In more detail, the resources below are up-to-date as of the beginning of 2018. They will spare your ontogeny from having to recapitulate pandas’ phylogeny:

]]>http://enfascination.com/weblog/archives/1879/feed0Good mental hygiene demands constant vigilance, meta-vigilance, and meta-meta-vigilancehttp://enfascination.com/weblog/archives/1877
http://enfascination.com/weblog/archives/1877#respondTue, 09 Jan 2018 00:12:53 +0000http://enfascination.com/weblog/?p=1877I get paid to think. It’s wonderful. It’s also hard. The biggest challenge is the constant risk of fooling yourself into thinking you’re right. The world is complicated, and learning things about it is hard, so being a good thinker demands being careful and skeptical, especially of yourself. One of my favorite tools for protecting myself from my ego is the method of multiple working hypotheses, described in wonderfully old-fashioned language by the geologist Thomas C. Chamberlin in the 1890s. Under this method, investigators protect themselves from getting too attached to their pet theories by developing lots of pet theories for every phenomenon. It’s a trick that help maintain an open mind. I’ve always admired Chamberlin for that article.

Now, with good habits, you might become someone who is always careful to doubt themselves. Once that happens, you’re safe, right? Wrong. I was reading up on Chamberlin and discovered that he ended his career as a dogmatic, authoritarian, and very aggressive critic of those who contradicted him. This attitude put him on the wrong side of history when he become one of the most vocal critics of the theory of continental drift, which he discounted from the start. His efforts likely set the theory’s acceptance back by decades.

The takeaway is that no scientist is exempt from becoming someone who eventually starts doing more harm than good to science. Being wrong isn’t the dangerous thing. What’s dangerous is thinking that being vigilant makes you safe from being wrong, and thinking that not thinking that being dangerous makes you safe from being wrong makes you safe from being wrong. Don’t let your guard down.

Also see my list of brilliant scientists who died as the last holdouts on a theory that was obviously wrong. It has a surprising number of Nobel prize winners.

]]>http://enfascination.com/weblog/archives/1877/feed0List of Google Scholar advanced search operatorshttp://enfascination.com/weblog/archives/1873
http://enfascination.com/weblog/archives/1873#respondFri, 29 Dec 2017 15:37:34 +0000http://enfascination.com/weblog/?p=1873I’m posting this because it was surprisingly hard to find. That is partly because, as far as I can tell, you don’t need it. Everything I could find is already implemented in Scholar’s kind-of-hidden visual interface to Advanced Search. The only possible exception is site:, which Advanced Search doesn’t off, but source: supersedes a bit. Standard things like “”, AND, OR, (), plus, and minus are as-is and well documented.

Beyond that, I didn’t find much:

allintitle: — conduct the whole search over paper titles

allintext: — conduct the whole search over paper texts

author: — search within a specific author.

source: — search within a specific journal

site: — search within a specific site

There are no operators for years that I could find, you have to use the sidebar or as_ylo and as_yhi parameters in the url (e.g.&as_ylo=1990&as_yhi=2022).

]]>http://enfascination.com/weblog/archives/1873/feed0typographically heavy handed web designhttp://enfascination.com/weblog/archives/1868
http://enfascination.com/weblog/archives/1868#respondWed, 29 Nov 2017 04:31:26 +0000http://enfascination.com/weblog/?p=1868Typography is fun. Recent developments in HTML are v. underexplored, especially in what they let you do with type and transparency. I came up with a concept for a navigation bar that would have no backgrounds or borders. It uses noise to direct attention, and gets structure from how things emerge from noise. All in CSS and HTML: no Javascript needed.

]]>http://enfascination.com/weblog/archives/1868/feed0Words with doubles give me troubleshttp://enfascination.com/weblog/archives/123
http://enfascination.com/weblog/archives/123#respondTue, 21 Nov 2017 01:32:59 +0000http://127.0.0.1/~sfrey/wordpress/?p=123Heterophenomenological dispatch. Here is a list I’ve been maintaining for myself for a few years now:

You’ll notice that most of these have a double. This says something (to me) about how we (I) encode words. I seem to be sensitive to whether a words has double letters or not, but I’m paying attention to the number of pairs, so that words with one (“beginning”) and words with two (“accommodate”) are in the same category.

]]>http://enfascination.com/weblog/archives/123/feed0A simple way to drive to get more efficiency out of cruise controlhttp://enfascination.com/weblog/archives/1861
http://enfascination.com/weblog/archives/1861#respondTue, 24 Oct 2017 14:43:32 +0000http://enfascination.com/weblog/?p=1861Out of the box, consumer cruise control interfaces favor simplicity over efficiency. Even though it can be efficient to maintain constant speed, cruise control wastes a lot of energy downhill by braking to not go more than 1 MPH over the target speed. If cruise control systems allowed more variation around the target speed, softer and more spread out upper and lower bounds, they would build efficiency by letting cars build momentum and store energy downhill that they can use uphill.

I developed a brainless way of implementing this without having to overthink anything. This method is much simpler than driving without cruise control, and it only takes a little more attention than using cruise control normally. Using it on a 3 hour hilly drive, a round trip from Hanover, NH to Burlington, VT, I increased my MPG by almost 10, from high 38 to low 46. I got there in about the same amount of time, but with much more variation in speed. The control trip had cruise control at 72 in a 65. I didn’t deviate from that except for the occasional car. The temp both days was around 70°. Car is a 2008 Prius.

For the method, instead of deciding on a desired speed, you decide a desired MPG and minimum and maximum speeds. That’s three numbers to think up instead of one, but you can do it in a way that’s still brainless. Set your cruise control to the minimum, fix your foot on the throttle so that you’re usually above that speed driving at the target MPG, and only hit the breaks when you expect to hit your maximum. For this trip, my target MPG was 50, and my minimum and maximum speeds were 64 and 80 (so cruise control was at 64). For the most part, my foot is setting the pace and the cruise control is doing nothing. As I go uphill, the car decides that I’m not hitting the gas hard enough and it takes over. As we round the hill it eases off and I feel my foot get back in control (even though it hasn’t moved at all). Then, using momentum built downhill, I’m usually most of the way up the next hill before the engine kicks in. Momentum goes along way, especially in a hybrid. Hybrids are heavy because of their batteries. Over three hours, I was at 46 MPG and spent most of the trip around 70MPH.

This method probably doesn’t make a difference in flat areas, but it contributes a lot in hilly ones. I don’t expect to ever hit my target MPG, but by minimizing the time spent below that, I can count on approaching it asymptotically. A hypermiler would recommend driving a lot more slowly than 70, but they’d also recommend stripping out your spare tire and back seats, so take it and leave it.

Peak fuel efficiency on a Prius is crazy low, like in the 30s I think: a pretty unrealistic target for highway driving. But if there was no traffic, and if I was never in a hurry, I’d try it again with cruise control 45 MPH, a target at 60MPG, and a max speed of 90MPH, to see if I could hit 50MPG. I haven’t stayed above 50 on that drive before, but I still think I can do it and still keep my back seat.