Saturday, February 9, 2013

Toy DNA Analysis Part I

Last time I visited the 5-7 graders at Peregrine School, I introduced
the idea of computer programming languages (specifically, Python) as a
way of automatic repetitive tasks.  That sounds boring, but I made it
interesting by building the activity around an inherently interesting
challenge---cracking a code---which happens to have a repetitive
aspect---translating each letter of a long message after you've
figured out the substitution pattern.  At the end, we had a little
time to discuss how DNA is a code, which is the connection I really
wanted to make to what they had already learned in biology.  This
week, we were poised to take it much further with three data analysis
challenges, two of them requiring Python programming.  As a result,
I'm going to split the morning's activities into three separate blog
entries.

The first challenge was to rescue a baby.  Some babies are born with a
genetic defect which does not allow their body to process the amino
acid phenylalanine.  If they don't follow a strict low-phenylalanine
diet, it builds up in their body and causes brain damage (mental
retardation) within the first year of life.  So there is a very strong
motivation to find out if the baby has this condition very soon after
it is born!  In practice, there is a blood test which does not involve
analyzing the DNA itself, but I framed the problem as one of DNA
analysis.  I made up long DNA sequences for about 15 babies, and asked
them to write a program which would look at a certain location within
each sequence, and print an alert if the sequence was not normal.  To
keep things simple, I just made up a simple condition for "normal":
the three letters starting at position 399 should be "GAT".

They had forgotten a lot in the two weeks since my first visit.  I
would normally recommend much more frequent visits for teaching
programming, but I was sick last week.  Still, they were very into it.
They wracked their brains trying to remember things, but I had to give
a refresher tutorial on for loops and if statements.  It took almost
an hour for everyone to finish completely, and there was again a
friendly competition to see who could finish (identify the sick baby)
first. 

The evolution of their programs was fascinating.  One group thought
they were done when they had something like:

dna = open('jane.txt').read()
print dna[398:401]

Even this simple program has a lot of ideas in it.  For example, doing
the subscripting correctly requires thinking about: (1) position 398
is actually the 399th position because Python starts counting at
position 0 rather than position 1; (2) 398:401 means up to but not
including 401; (3) you can't write dna[398-401] because the arithmetic
operation 398-401 yields -3, and Python will interpret this as 3
positions before the end of the sequence.  There was a lot of
interaction between me and the kids on each of these points.

In any case, when the first group had gotten this far, they thought
they were done.  They would just change jane.txt to john.txt, rerun it
to see if John was sick, repeat for Joan, etc, and just read off the
screen whether it said 'GAT' for that baby.  This would work ok for
the 15 examples I brought, but PKU (the aforementioned disease) is
present in only about 1 in 15,000 babies, so they really needed to
automate a loop over all the babies.  They initially thought I was
moving the goalposts, but the other groups agreed that this first
group was not really done.  So they started working on a loop:
names = ('jane.txt','john.txt','joe.txt')
for name in names:
    dna = open(name).read()
    print dna[398:401]
I had to repeat many times the importance of proper indentation so that it's clear
(to the computer and to a human reading the code) which actions get
repeated for each name, and which actions only get done once.  A
common mistake is
names = ('jane.txt','john.txt','joe.txt')
for name in names:
    dna = open(name).read()
print dna[398:401]
which prints only the last one, after cycling through all the names. Notice that I typed in only three names to make sure my loop would work, before bothering to type in all 15 names. In fact, I taught them how to avoid typing in any names by grabbing all names that fit a certain pattern:
import glob
names = glob.glob('j*.txt')
for name in names:
    dna = open(name).read()
    print dna[398:401]
I briefly discussed how it can be incredibly time-saving to import some functionality that someone else has already written. But back to the main point, the fastest group now thought that they were really done: this program would print "GAT" for each healthy person, and they just had to scan the output for something other than GAT. But, I asked them, how would they know which person had that abnormal sequence? They tried adding to the end of their program:
import glob
names = glob.glob('j*.txt')
for name in names:
    dna = open(name).read()
    print dna[398:401]
    print name
But this gives output like:
GAT
jane.txt
GAT
john.txt
GCT
joe.txt
GAT
jim.txt
GAT
...
and they incorrectly interpreted this as John having GCT, because they hadn't paid attention to the fact that they asked the computer to print the DNA first, and then the name. An important rule of programming is to make your output clear. Things which belong together should be printed together. A much better print statement is:
print dna[398:401], name
which keeps it to one line per baby:
GAT jane.txt
GAT john.txt
GCT joe.txt
GAT jim.txt
...
Now they really thought they were done, but I pointed out that they were looking for 1 in 15,000 babies, and they couldn't count on a human to scan a list of 15,000 lines which say 'GAT' and not miss an abnormal one. They really need to print out just the sick ones with a very clear warning:
import glob
names = glob.glob('j*.txt')
for name in names:
    dna = open(name).read()
    if dna[398:401] != 'GAT':
       print name, "is sick"
Now they were done: the output is simply
joe.txt is sick
I took a few minutes to talk about the subtleties of combining if's, for example the difference between
if dna[398] != 'G' and dna[399] != 'A' and dna[400] != 'T'
vs
if dna[398] != 'G' or dna[399] != 'A' or dna[400] != 'T'
Surprisingly (to me at least), they found this last point very easy. As I said, this whole activity took very nearly an hour. (I had saved a bit of time by preloading their computers with the data files.) It was highly interactive, and if there had been much more than three groups having another knowledgeable adult in the room probably would have been a good idea. I'm not going to pretend that as a result of this activity the kids have actually mastered even the very basics of programming, but it was good practice in logical thinking, and it's clear that with continued practice I will eventually get them doing some real data analysis. One good sign: one of the girls continued programming throughout the recess break following this activity!

Friday, January 25, 2013

DNA is Code


Today I started Friday morning sessions with the upper (5-7) graders
at Peregrine School.  I'll have about ten of these weeks before I
switch to astronomy with the 3-4 graders.  My main job with the upper
graders is to cover the geology standards which didn't get covered in
the lead-up to the Yosemite trip, but I'm going to take a few weeks
first to build on some of the ideas they learned before Christmas
break regarding genetics and DNA.  In the process, they will learn how
to analyze data and program computers.  It's ambitious, but with these
kids I have to be ambitious.

DNA is a code.  The letters themselves have no intrinsic meaning, but
they represent different specific amino acids which, when assembled in
the sequence specified by the code, fold up into a 3-d shape which is
useful for performing some function in the body.  So to introduce the
idea of "breaking the code," I started with a non-DNA message in code:
Uif Ivohfs Hbnft jt b 2008 zpvoh bevmu opwfm cz Bnfsjdbo xsjufs Tvaboof Dpmmjot. Ju jt xsjuufo jo uif wpjdf pg 16-zfbs-pme Lbuojtt Fwfseffo, xip mjwft jo uif qptu-bqpdbmzqujd obujpo pg Qbofn, xifsf uif dpvousjft pg Opsui Bnfsjdb podf fyjtufe. Uif Dbqjupm, b ijhimz bewbodfe nfuspqpmjt, fyfsdjtft qpmjujdbm dpouspm pwfs uif sftu pg uif obujpo. Uif Ivohfs Hbnft bsf bo boovbm fwfou jo xijdi pof cpz boe pof hjsm bhfe 12–18 gspn fbdi pg uif uxfmwf ejtusjdut tvsspvoejoh uif Dbqjupm bsf tfmfdufe cz mpuufsz up dpnqfuf jo b ufmfwjtfe cbuumf up uif efbui.

Uif cppl sfdfjwfe nptumz qptjujwf gffecbdl gspn nbkps sfwjfxfst boe bvuipst, jodmvejoh bvuipst Tufqifo Ljoh boe Tufqifojf Nfzfs. Ju xbt qsbjtfe gps jut tupszmjof boe dibsbdufs efwfmpqnfou, uipvhi tpnf sfwjfxfst ibwf opufe tjnjmbsjujft cfuxffo Dpmmjot' cppl boe Lpvtivo Ublbnj't Cbuumf Spzbmf (1999), cpui pg xijdi efmjwfs ubmft frvbmmz hsjqqjoh, zfu mftt ebsl uibo uif hfosf't psjhjobm nbtufs xpsl: Ljoh't Uif Mp oh Xbml (1979). Jo xsjujoh Uif Ivohfs Hbnft, Dpmmjot esfx vqpo Hsffl nzuipmphz, Spnbo hmbejbupsjbm hbnft boe dpoufnqpsbsz sfbmjuz ufmfwjtjpo gps uifnbujd dpoufou. Uif opwfm xpo nboz bxbset, jodmvejoh uif Dbmjgpsojb Zpvoh Sfbefs Nfebm, boe xbt obnfe pof pg Qvcmjtifst Xfflmz't "Cftu Cpplt pg uif Zfbs" jo 2008.

Uif Ivohfs Hbnft xbt gjstu qvcmjtife jo ibsedpwfs po Tfqufncfs 14, 2008 cz Tdipmbtujd, gfbuvsjoh b dpwfs eftjhofe cz Ujn P'Csjfo. Ju ibt tjodf cffo sfmfbtfe jo qbqfscbdl boe bmtp bt bo bvejpcppl boe fcppl. Bgufs bo jojujbm qsjou pg 200,000, uif cppl ibe tpme 800,000 dpqjft cz Gfcsvbsz 2010. Tjodf jut sfmfbtf, Uif Ivohfs Hbnft ibt cffo usbotmbufe joup 26 mbohvbhft, boe qvcmjtijoh sjhiut ibwf cffo tpme jo 38 uf ssjupsjft. Uif opwfm jt uif gjstu jo Uif Ivohfs Hbnft usjmphz, gpmmpxfe cz Dbudijoh Gjsf (2009) boe Npdljohkbz (2010). B gjmn bebqubujpo, ejsfdufe cz Hbsz Sptt boe dp-xsjuufo boe dp-qspevdfe cz Dpmmjot ifstfmg, xbt sfmfbtfe jo 2012.

This was a really good idea for motivating the students; they really
wanted to break the code once they realized it was doable! I elicited
from them some observations which might be useful:
  • Each paragraph begins with "Uif".  They guessed pretty quickly that "Uif" might stand for "The".  This was a springboard for making  explicit what they already implicitly knew about word and letter frequencies in English.
  • Numbers seem to stand for themselves: "Tfqufncfs 14, 2008" looks like a date.
  • Ditto for punctuation: the periods and commas look natural, not like they stand in for something else.
  • "b" is a word by itself.  Presumably it stands for either "a" or "I".
One student guessed the answer even as I was writing down the fourth
observation: simply replace each letter here with the letter which
precedes it in the alphabet.  This "b" becomes "a" and "Uif" becomes
"The".  I asked them to make some predictions to double-check this
hypothesis.  For example, this hypothesis predicts that "a" and "r"
will be uncommon because they stand for the uncommon letters "z" and
"q".  That checks out, so let's proceed.

Here's where I introduce computers.  It would be extremely tedious to
manually translate all these letters to decode the message.  But if we
write a computer program to do it, in a short time we will have a tool
that automatically translates this and all future such messages.
Computers are great for automating repetitive tasks!

Before we actually open our laptops, let's write some pseudocode.
"Code" has a new meaning here: "a set of instructions to the
computer", and pseudocode is when we write those instructions a bit
more like everyday language to help us organize and communicate our
thoughts to other humans.  To decode our message, we want to tell the
computer to do this:

for each character in the message:
    if character is a letter:
       print the previous letter
    else:
       print the same character # (because it's punctuation or a number)

(The # symbol and everything after it represent a comment about the instruction, rather than an actual instruction.)  This pseudocode illustrates two of the most important ideas in programming: looping, in which we repeat some set of instructions over and over, and if-then-else.

A somewhat old-fashoned way of constructing a loop which does something 100 times is:

tasksCompleted = 0
while tasksCompleted < 100:
      doSomething
      tasksCompleted = tasksCompleted + 1

Although this is a bit old-fashioned, I thought it was worth making the loop logic very explicit for beginners. Next, we practiced some simple loops in an actual language, Python.  I gave them a file containing the coded message, named 'coded1.txt'.  I showed them how to read it in:

letters = open('coded1.txt').read()

Now letters is the name of a location in memory that contains the message.  A very simple loop is:

for character in letters:
     print character,

With this more modern type of loop, Python automatically keeps track of how many times we need to repeat.  This is easier to write, easier for others to read, and less error-prone.

So far we have just repeated the very simple action of printing that character.  By the time each group had finished this, the 45 minutes was up and we took a break. After the break, we set about putting more complicated instructions inside the loop.  We started writing something like:

for character in letters:
    if character == 'b':
       print 'a',   
    elif character == 'c':
       print 'b',

(Note that == is a test of equality, whereas = would have been an assignment, forcing them to be equal; and elif is shorthand for else if.)  We can see that this will become tedious if we have to type in an if-else block for each substitution rule, so let's find a better way.  Let's set up a dictionary named sub (short for substitution):

sub = {'b':'a',
       'c':'b',
       'd':'c',
       ...}

so now we can just say

print sub[character]

and if the character is 'b' the computer will look up the "definition" (the value, really) stored at the dictionary location of 'b', which is 'a', and print that.  (Note that the ... above is not real code, but you can guess what it stands for.)  We spent a while talking about the software concept of dictionaries and playing with them for a while before returning to the decoding task, which now looks like:

letters = open('coded1').read()
sub = {'a':'z',
       'b':'a',
       'c':'b',
       'd':'c',
       ...}

for character in letters:
    if character in sub:
        print sub[character]
    else:
        print character

As a test, we did this after typing in just some of the substitution rules.  We could see that it was going to work, but it didn't handle capitals: "Uif" became "Uhe". Instead of typing in another 26 upper-case substitution rules, we did this before entering our main loop:

for key in sub.keys():
    upperCaseKey = str.upper(key)
    upperCaseSub = str.upper(sub[key])
    sub[upperCaseKey] = upperCaseSub

str.upper is a function which makes an upper-case version of the letter which is given to it inside the parentheses.  So this block of code creates a new upper case dictionary entry and value for each pre-existing one, so we don't have to type them in manually.  (Yes, I know there are more efficient ways to do this, but I wanted to make the logic very explicit for the learners.) With that done, the race was on as each group rushed to be the first to type in all the substitution rules and read the message.  That was really fun.  If you want to see the message, you'll just have to assemble your own Python script out of the parts I've illustrated here!

Once all the groups had decoded the message, we had used about 45 minutes since the break.  A word of advice to teachers: it takes a while.  Although I explained several times how one typo or indentation mistake will torpedo the script, kids are not used to this, and they need a lot of help finding their mistakes even though I had my own example code projected up on the screen. But it was really worth spending the time.  They started to get the idea of debugging; although I often had to find the bugs for them, they started to understand the process.  I had the luxury of doing it with six kids in three groups; if you have a larger group I would try to arrange for assistants and give them some advance training.

That gave us about 12 minutes to discuss how DNA is a code.  We reviewed a bit about how letters code for amino acids, which build proteins.  Then we looked at the DNA code table and discussed by some amino acids have many codons (groups of three DNA letters) which code for them, while others have just one.  The basic idea is that some "typos" will not actually result in a mistake in the amino acid, which is a good thing; it adds robustness to the code.  And it's even more robust if the most common amino acids are the ones with the most robustness against typos, in other words have the most different codons.  That led to an interesting discussion of where DNA "typos" might come from, including cell reproduction and radiation.

Finally, I asked why we need three letters to represent an amino acid if we have all these leftover three-letter combinations.  If we have four options (G,C,T, or A) at each DNA location and we have three consecutive locations, how many total options are there? The best way to think about this, if you are not used to mathematical manipulations, is to draw a tree with four big branches representing the four options at the first decision point.  Each of those big branches then has four medium-size branches representing the four options at the second decision point.  And each of those 16 medium-size branches then then has four little branches representing the four options at the third decision point, which makes 64 little branches, representing 64 possible combinations.  There are only 20 amino acids, so with 64 code words we can have a lot of redundancy, leading to a lot of robustness against damage.  The last question we discussed was: since we have so many extra code words by using three-letter combinations, could we (robustness aside) get away with using just two DNA letters to code for an amino acid?  I'll let you figure that one out for yourself.


Friday, January 11, 2013

Modeling Colliding Galaxy Clusters and Dark Matter

Science is about making models.  We make a conceptual model of
something (in other words, we guess how it works), then we figure out
what that model would predict, we compare those predictions to
observations, and then we either discard, modify, or (for the time
being) accept that the model could be correct. (Recently I stumbled
across an entertaining video of Richard Feynman explaining this
method.)  Ideally, the model is conceptually simple, with as few
moving parts as possible, yet is able to match a rich variety of data.
Sometimes this modeling process is about something really fundamental,
such as how gravity works; other times the modeling process is just
about estimating something we can't measure directly.  For example, a
scale which doesn't read the correct weight can still be used to infer
your weight, as long as you have a workable model such as "reads about
ten pounds too heavy" or "reads about half the true weight."

My student Will Dawson recently finished some work which is a really nice example of the latter kind of modeling.  We have been studying colliding clusters of galaxies; our lives are too short to see the collision play out, so we have to make a model which allows us to extrapolate from the current (just post-collision) state back to the time of maximum impact.

A good analogy: given a photograph and a speed gun reading taken a
split-second after an automobile collision, reason backward from that
to infer the velocity of collision and the time since collision.  The
main difference is that the galaxy clusters mostly go right through
each other because the space between the galaxies is so big.  The hot
gas clouds filling those spaces do collide, leaving a pancake of hot
gas in the middle while the galaxies continue on (eventually to slow
down and turn around due to gravity).  We are interested in what
happens to the dark matter: the Bullet Cluster and the Musketball
Cluster show that it is mostly collisionless, but "mostly" is
something we really want to quantify, for reasons I'll explain in a
future post.

But first, we have to make a model of the collision.  Speed guns and
spectrographs can only tell how fast the galaxies are moving toward us
or away from us; they say nothing about how fast they are moving in
the transverse direction (in the plane of the sky).  To study dark
matter we need to know the full three-dimensional velocity, and we
want to know what it was at the time of collision, rather than what it
is right now, after the collision.  This is closely related to how
much time has passed since the collision (by collision I really mean
the maximum overlap of the two clusters), because the observed
separation since the collision could have been achieved by moving at a
high velocity for a short time, or moving at a low velocity for a long
time.  Making things more complicated, the separation we observe is
only the transverse part of the separation.  So a collision which
occurs along the line of sight will give us a large velocity on our
speed gun but a small apparent separation, while the same collision
viewed transversely will exhibit a small part of the velocity and a
large part of the separation.  We don't know what angle we are viewing
the system at, so the true velocity could be just about anything.

Like a rock climber inching up a chimney, the way out of this is to
push against two extremes.  If we observe any line-of-sight velocity,
the motion can't be completely transverse; in fact we can rule out a
range of near-transverse geometries because they would require an
absurdly large three-dimensional velocity.  (Absurdly large is defined
here as larger than the free-fall velocity from infinity.)  Similarly,
if we observe any transverse separation we can rule out a range of
nearly line-of-sight geometries because they would require absurdly
large three-dimensional separation.  (Absurdly large is defined here
as requiring longer than the age of the universe to reach that
separation.)

Still, we are left with a range of geometries in the middle; at the
extremes of that range the geometries aren't completely ruled out, but
look pretty unlikely.  Here Will applied another important concept:
marginalizing over all remaining possibilities.  His code ranges over
all possible geometries, tabulating how well they match the data, and
thus produces a probability distribution.  So we don't know exactly
how fast the collision was, but we can be 99% confident it is within
have a certain broad range, 90% confident it is within a certain
smaller range, etc.

This was a pretty big advance in sophistication compared to the way
previous studies had estimated the collision velocity and time since
collision.  Using this technique, Will demonstrated that what
astronomers don't know can hurt them---not knowing the angle from
which we are viewing a collision results in substantial uncertainty in
the quantities we need to know to study the behavior of dark matter.
To narrow things down to a useful range, we need additional
information about a collision.  (In the case of the Bullet Cluster,
the shock gives this information, but most collisions have not shown
an observable shock.)

Will also used his new technique to estimate that it has been about
700 million years since the Musketball Cluster collided, compare to
"only" 200 million years for the Bullet Cluster.  This is good for the
study of dark matter because people would be justifiably skeptical of
conclusions about the nature of dark matter based on just one kind of
collision (a recent, high-speed collision of massive clusters such as
the Bullet).  Studying a range of collision conditions--including less
recent, lower-speed collisions of less-massive clusters such as the
Musketball--gives us a much better chance of identifying universal
properties of dark matter with high confidence.


Friday, December 21, 2012

Liquid nitrogen cannon

This relates to our recent themes of solid/liquid/gas and pressure, but mostly it was for fun.  I brought a steel tube just a bit larger than a tennis ball, a 16-oz plastic soda bottle, a tennis ball, and some liquid nitrogen.  After the usual LN2 demos, we went outside to make the cannon.  I found a large object to hold the tube upright, then I loaded the bottle with about 4 oz of LN2, screwed the cap on tightly, dropped the bottle into the tube, and dropped the tennis ball on top.  Then we waited for the liquid nitrogen to boil into gas, which would make the pressure inside the bottle roughly 100 times atmospheric pressure.  It took about 5 minutes, and then the bottle exploded, propelling the ball hundreds of feet into the air and out into the neighboring field.  Even the ripped-apart bottle shot up in the air, about 50 feet.  It was awesome!

I had a second bottle and ball, but I was too greedy.  I put in about 8 oz of LN2 to get a bigger boom, but after a 7-8 minute wait we heard a hissing.  The bottle had a nonexplosive leak.  Since it was starting to rain as well, we went inside, figuring it would not blow.  But after another 7-8 minutes, we heard it blow.  Bottom line: it's awesome with just 4 oz.

A Sense of Scale

Today we covered three small topics.  It's my last day with the 1-2
graders (I will rotate to the upper graders), and also the last day
before Christmas vacation, so I tried to squeeze in several fun things
and also answer some of the questions which arose last week.  So we
didn't go super-deep in any one topic, but we had a blast. 

We started with a movie: the ten-minute 1977 classic Powers of Ten by
Charles and Ray Eames.  I wanted to show this movie because the kids
had many questions last time, when I mentioned galaxies but didn't
have time to really explain them.  This movie steadily zooms out from
a person on Earth to show how big and how far apart astronomical
objects are.  The movie then zooms progressively in to show the sizes
of microscopic things.  (Note: if you want more snazzy modern special
effects you might try the more recent Cosmic Voyage, but Powers of Ten
feels more intense.)  I stopped the movie many times to answer
questions as they arose, but eventually there were too many questions.
We had four 3-4 graders in the room, and I will be doing astronomy
with them in the spring.  It looks like showing this movie would be a
good way to start my three months with them.  They could generate
questions, and we could take our time answering them.  The best
question today was, "How do we know all this?" and I hated not having
time to give a real answer.  My three months of astronomy with the 3-4
graders will be the answer to "How do we know all this?"

I then showed a website for visualizing the sizes of things, where you
control the zoom. This is a great site for showing how much
bigger the Sun is compared to Earth, how much bigger some stars are
compared to the Sun, etc.  But be warned: they do NOT show the space between these objects, so don't be fooled.  The space in between stars
is VERY, VERY BIG compared to the stars themselves. 
Apart from that, it's a great tool.  (One caveat: I did not zoom out all the way to the "estimated size of the universe"...there is no estimated size of the universe.)  Exploring this site also generated many questions, so that may also be a good icebreaking activity.  Because you can zoom in as well, it could even be a good icebreaker for life sciences as well.

A few more links for interested parents:

  • http://www.nikon.com/about/feelnikon/universcale/  is a similar idea as the previous link but with a different feel.  It's worth checking out, but it mostly focuses on microscopic things rather than astronomical things (it has a few mistakes too.


  • http://www.powersof10.com/ is a site (currently in beta) by the Eames Office. I just discovered while gathering links for this post, so I can't say much about it other than it looks promising.
Activity number two was understanding orbits with a donutapult demo and play with the coin funnel.  Since I've blogged about this before, I won't describe it in detail here.  If you'd like to read about it, search for these terms (donutapult and coin funnel) in this blog's search box.

Activity number three will be the next blog post.

Saturday, December 15, 2012

Origins Part II

(This is a continuation of a previous post.)

After a short break, we tackled the Big Bang.  I asked if we needed to
extend the timeline even further back than the origin of the Earth.
They were clear on the need to do so, since the Earth and the solar
system formed from a pre-existing cloud of gas.  I showed them some
pictures of galaxies and then some of a fly-through movie of galaxies from
the Sloan Digital Sky Survey.  I just wanted to roughly establish that
galaxies are like neighborhoods: we have ours, and we can see where
some others are too.  It was clear later that they have no real idea
that galaxies are much bigger than the solar system (even though I
said it); they kept mixing up planets and galaxies.  But I didn't
dwell on that; I figure there's only so much I can do in one morning,
and it was more important to establish that "things are moving apart"
than to work on a sense of scale.

Next, I took a long loose spring (almost like the helical telephone
cord that used to be on all landline phones) to which I had attached
galaxies (each galaxy had the name of a kid).  Starting with the
spring scrunched up, I extended the spring 12 feet or so and got the
galaxies far apart.  I did this a few times so they could see how all
galaxies moved away from each other.  This was actually the first time
I had done this demo, and now I'm sure I will do it with my college
kids.  I always use a balloon, and I still will, but there's something
nice about also doing the one-dimensional case.  It just makes
everything a lot more visible, especially in a big room.  With the
spring stretched I asked how we could figure out how long it has been
since everything was together.  One kid figured it out right away.  He
explained that knowing how fast they are moving and how far apart they
are, we can calculate the time it took.  He used the example of a
speed of one inch per year.  In that case, the number of inches apart
is the number of years it took to get that far apart.  This was an
amazingly good answer; it was almost as if I had rehearsed it with him
beforehand and planted him in the audience (I swear I didn't).

Next we went outside and practiced doing the same thing with our
bodies.  With Teacher Pa as the Milky Way, we all ran away from her.
Teacher Ethan ran the fastest and became the most distant galaxy by
the time I said stop.  I wanted to make clear that the most distant
galaxy is further away not because it has been traveling for a longer
time, and that there was a time when all galaxies were together.  We
went back inside and I drew a diagram of us as someone above the field
would have seen us.  If that person came upon that scene and saw us
moving very slowly, would he guess that we had started a long time
ago, or a short time ago?  (Long.)  If that person came upon that
scene and saw us moving very quickly, would he guess that we had
started a long time ago, or a short time ago? (Short.)  Using the same
logic, astronomers have found that all galaxies were together and
started moving apart (the Big Bang) 13.7 billion years ago.  I made a
big show of extending the timeline into the hallway and out of the
school to emphasize that that is a long time.

Now, the kids may have gotten the wrong impression that we are at the
center because everything is expanding away from us.  To combat that,
I had prepared two transparencies.  One has a smattering of galaxies, each
with a different shape so that it's recognizable.  I had prepared this by putting
graph paper behind the transparency and drawing galaxies at random coordinates.
I prepared the second one by drawing the same galaxies (now in red instead
of black) at the same coordinates multiplied by 1.5.  You can pick one galaxy
in the middle to represent the Milky Way and show the initial (black) transparency
to show where the other galaxies are around it.  Then overlay the red one, matching
up the Milky Way's position, to see how everything moved away from us.  Here's the
cool part: now you pretend you are an alien in another galaxy, match up that galaxy
across the two transparencies, and you ALSO see that everything is expanding away
from the alien!  This blew everyone's mind, including the teachers.  We spent a fair
amount of time with the kids picking a galaxy, and me matching that galaxy and
showing that everything moved away from it.  Bottom line: just because we
observe everything moving away from us doesn't mean we're at the center.  When
there's more space  everywhere, EVERY galaxy can observe this.  We're not special.
People often ask, where did the Big Bang happen?  It happened everywhere,
including here!  All the places that all the aliens in the universe could call "here"
all overlapped , in the distant past, with what WE call "here"!  I reinforced this with
the traditional balloon demo of the expanding universe: draw some dots on a partially inflated balloon, then fully inflate it and show how each dot is further from each other dot, but none is in a special or central position.  If the balloon could really be completely collapsed, then all the dots would be in the same starting position without ever really moving away from its position on the balloon.

But, should we believe that we can extrapolate that far back in time?
We should look for evidence! I made a lame show of demonstrating how
things are hot when compressed (I brandished a bike pump and asked
them to notice how the valve gets hot next time they pump up a tire),
so that the whole universe would have been red hot at some point in
the past when it was highly compressed.  We actually see that light:
it's called the cosmic microwave background.  This is fossil evidence
of a hot early universe.

We were running out of time but the kids voted to do the marshmallow
activity rather than just stop early.  I had brought white and yellow
mini marshmallows and toothpicks.  These represent the building blocks
of atoms (technically, protons and neutrons, but I didn't use those
words).  These building blocks can be stuck together only at very,
very high temperatures which the universe experienced only in the
first three minutes, when it was even hotter than red hot.  (Kind of
like marshmallows will stick together if heated.)  We had talked about
solids, liquids, and gases in previous weeks, so I sketched out
hydrogen (just one proton) and helium (two protons and two neutrons),
which they knew were gases.  I had set up cups half full of a mix of
protons and neutrons, in a 7:1 ratio.  I gave them the cups and told
them they had only three minutes to build as much helium (ie stick two
white and two yellows on a toothpick) as they could.  Because of the
paucity of neutrons, they were typically able to build only 3 helium
atoms, with about 36 hydrogen atoms left over.  This is actually the
ratio we observe!  So the atoms themselves are additional fossil
evidence of a very hot early universe.  [Parents: if you're curious
where the 7:1 ratio came from, that came from the even hotter
conditions in the first fraction of a second, and the observed ratio
agrees with the Big Bang model, thus providing even further fossil
evidence. If you want to read more, search "Big Bang nucleosynthesis."]

Overall, it was a VERY successful day.  The kids had many additional
questions about planets and orbits which I didn't take time to answer,
and this could form the basis of an activity for my next visit, and I
do think they gained an appreciation of the basic idea that we can
tell the age of the universe from how fast it's expanding.  How well
they'll remember that or be able to answer questions on an assessment,
I'm not confident.  But the basic idea is not beyond the grasp of 1st
and second graders.  The movie we saw before the break was great, the
spring demo was great, and the marshmallow activity was good.  (We
didn't have enough time to do it really well, but it's a very
promising idea and I will develop it further.  Given more time, I
would have the kids make mini posters with "raw ingredients" "elements
after cooking in the heat of the Big Bang.")  The radioisotope dating with
dominoes (see previous post) came up a bit lame, but I think it's a good idea
that just needs more refinement.

As the kids went to lunch, I worked on the science section of Teacher
Pa's poster comparing different religions' creation stories.  Because
I wanted to emphasize the LACK of parallelism as discussed in my
previous post, I ripped off the science column and posted it on the
wall next to the window where the religion part of the poster was.  I
also did not carry over the formatting of the rows in the religion
column.  I hope to post a picture here rather than describe it in
words, but I think I achieved the right balance in emphasizing how
science is different from religion while respecting both.

Update: if you look at this picture full size, you will be able to read the poster.



Friday, December 14, 2012

Origins Part I

Teacher Pa's class as been studying various religions, including their
creation stories, this week, so she asked me to review the scientific
"creation story" with the kids.  She had made a big poster with
Hinduism, Judaism, Christianity, and Islam as column headings, each
with entries in rows titled [Name of] God, [Sacred] Book, Creation
Story, Golden Rule, What Happens After Death, and Holidays, and she
wanted me to fill in a Science column for Creation Story, Golden Rule,
and What Happens After Death.

I wanted to make very, VERY clear to the kids that science is not
another religion, so I refused to tell a "creation story" and instead
made a detective story about our origins.  (It turns out I was
justified: even after spending the whole morning with the kids and
emphasizing how science works, as the kids went to lunch I began
ripping the Science column off the religion poster and my own son
Linus said, "Dad, what holidays does science celebrate?")

I started the morning by discussing what kinds of questions science
can answer and what kinds of questions it can't.  If you're about to
bite into your last cookie and someone asks you to share it, can
science help you figure out if you should share it?  No.  If your best
friend moves away and you're lonely, can science help you figure out
what to do?  No.  Religion might help you with those questions.  But
if you have a question about nature, such as "When did the Earth
begin?", then science can help.  I think it's super-important to help
kids draw these distinctions.  Because religion tries to say something
about our origins, and so does science, it's tempting to make
parallels between them.  But the differences are more important then
the superficial parallels, and we need to help kids see that.  Science
and religion are simply about different things.  If we had a poster
comparing different sports, we wouldn't put Sudoku on it!

The kids had done a timeline of the history of Davis, so I started
with a blank timeline with "Now" on the right and "?" on the left.  I
put a few recent events (the years they were born) close to "Now" and
asked how we could know about the distant past using evidence (clues).
Because they had recently been to Yosemite and seen a slice of a tree
with about 1,000 rings, I started with that: we know that trees grow
one ring each year, so this tree tells us that Earth is at least 1,000
years old.  In fact, the oldest trees in the world live in California
and they are over 4,000 years old, so I marked that too.  (Aside: by
matching long-dead trees with just-felled trees [using ring thickness
as an indicator of how good for growth each year was], scientists have
been able to put together tree-ring histories going back about 10,000
years!)

Next, we moved on to rocks. They had studied some geology in
preparation for Yosemite, so we reviewed how long it takes millions of
years for a river to carve a canyon, based on how fast we observe it
carving today.  So Earth is at least millions of years old.  One kid
knew that some rocks are at least 1,000,000,000 (one billion...I wrote
out the number to impress them) years old.  But how, I asked.
"Dating."  OK, but how do we do that?  I did a very simplified version
of radioisotope dating.  I took some dominoes and stood them up on a
desk.  Standing up, they have some potential energy, because they have
the potential to fall.  Once fallen, they don't have potential energy.
(We had talked a bit about this concept previously.)  Now some atoms
in your bones (or in rocks) have this extra potential energy, but as
time goes on more and more of them lose this.  I knocked down a few to
illustrate the passage of some time, then a few more to illustrate the
passage of more time, etc.  They quickly got the idea of "more down
equals older" (I gave them many scenarios and they got the relative
ages right) but I'm not sure what they were really visualizing when we
said "more energy" or "fall down" because I got questions about
whether the atoms are dead or had changed into something else.  A nice
thing about these dominoes was that they came in different colors, so
it was easy to point out that this domino is still a red domino with 5
and 2 dots, it's just that it doesn't have extra energy now.  So I
think the got the idea that we were using small particles in the rocks
as a clock, but not much else.  Which is probably ok; you can't do
everything.  (If I had planned this whole semester better I probably
would have brought in a microscope very early on, and established the
concept of atoms so that I could safely refer to it throughout the
semester...last year all the kids in the school studied atoms but only
one of those kids is in this room this year.)

So I extended the timeline all the way across the other (very long)
whiteboard and wrote 4,500,000,000 as the age of the oldest rocks on
Earth.  I then mentioned meteors, which they had heard of, and how
their slamming together would generate heat.  (I slammed clay lumps
together for visual effect.)  We think Earth was formed by meteors
slamming together and creating so much heat that they melted together.
The rock-dating clock starts when the rock solidifies, so the age of
the Earth is 4,500,000,000 years.  I then wanted to show them a movie
rendering of this process, and I showed the first few minutes of the
Birth of the Earth episode of How the Earth Was Made; in the first
several minutes they have some really nice visualizations of this.
But they like it so much that we kept watching, well into break time,
and almost finished.  But with about 10 minutes left in the 43-minute
episode, I really wanted them to stretch their legs so we encourage
them to go outside but left the option of continuing to watch. Half
the kids watched to the end.  I highly recommend this episode, and in
fact this whole series.  It emphasizes the use of evidence to test
ideas.

The kids had MANY questions in response to the video.  It was great to click Pause as soon as a question arose so I could deal with it right away.  I felt like the movie was an awesome way to keep their attention (which is sometimes a struggle), but I could still provide an interactive teaching environment.  It was the best of both worlds.




I have a lot more to say about what we did after break, but I'll make
that another post.  To be continued....