Showing posts with label grades 5-7. Show all posts
Showing posts with label grades 5-7. Show all posts

Thursday, April 25, 2013

Picnic Day


UC Davis Picnic Day is a giant open house attended by 50,000 or more
people. The Physics Club runs a "magic show" and a demo room where
visitors can do some hands-on experiments, but there hasn't been a
kid-friendly physics room in the past.  This year, I decided to make
one with the help of kids and parents at Peregrine School.  The day
before Picnic Day, I brought all my toys (Coriolis effect demo,
balloon in a bottle, infrared camera, mixing colors of light,
airzooka, etc) to the school and spent the morning training students
and parents so they would be able to explain the ideas behind them to
visitors on Picnic Day.  On Friday night my wonderful wife Vera and I
set the demos up in a room on campus, and on Saturday we had a ton of
visitors.

I think we did a really good thing here.  We didn't have our kids
explaining physics to other kids as much as I had imagined, for
various reasons: our kids were having fun playing too; they wanted to
visit other exhibits on Picnic Day; and most of the visitors to our
room were actually adults.  So the kids got less practice in
explaining physics than I had imagined, but we did a great public
service.  As an educator, I'm always thinking about ways to tweak
things, so if there is a next time (or as advice to others thinking
about doing this kind of thing), one way to get kids really deeply
invested might be to have them develop their own unique demos.

Friday, March 29, 2013

Cold and Clammy

After spending most of the morning studying the dynamics of sand along California's beaches,  I had about 30 minutes left to tie up some loose ends I had left on my last visit.  On that visit, I had promised that I could catastrophically crush an aluminum soda can using just heat and cold, but it didn't work.  As soon as I left the school that day, I realized what I had done wrong, but instead of just explaining what I did wrong, I planned some activities to build up to an explanation.  The first was measuring the dew point in the room. (Note: there are lots of dew-point activities written up on the web; I'm just linking to a random one here out of laziness.  In particular, I saved time compared to the activity in this link by starting with cool rather than warm water.)  The dew point was about 10 C, in a room with a temperature of about 20 C.  I also had them answer some questions related to dew point, such as: Which city would you rather travel to, one where the dew point is 50 F or one where it is 80 F?  Explain why, and suggest a plausible location for each city.

Then we related dew point to relative humidity. I wanted to make a graph of amount of water that air holds, vs temperature of the air.  At any temperature, there is a maximum amount it can hold, so I can sketch this maximum amount as a curve which changes with temperature.  I elicited from them how I should sketch it: the warmer the air, the more water it can hold. On that same graph, how would we represent the air in this room? We know it's 20 C, and we know the amount of water in the air is substantially less than the maximum---if it were close to the max we would have seen condensation very quickly as soon as we began to cool the glass.  So I made a mark indicating that conceptually.  As we cooled the glass, we lowered its temp, so I drew a line going leftward from that point.  When it hits the max curve, it condenses.

So the dew point is an indication of how much water is in the air, but what we feel as humidity is really how much water is in the air relative to the maximum it could hold at that temperature. This is called relative humidity.  For example, the dew point was about 10 C, or about 50 F, and in a 70 F room that doesn't feel humid.  But in a 52 F room, that would feel clammy as well as cool.  So I asked the kids to brainstorm how they could build a device to measure relative humidity.  To my surprise (because I was hearing some whining) someone came up really quickly with the idea of a wet thermometer.  I said "Brilliant!" and tried to elicit more details.  Why is being wet important?  Because then there will be evaporation.  OK, how will evaporation change your thermometer reading?  There was much discussion of this, with about half the class leaning toward warmer and half toward colder, but eventually I steered them toward thinking about getting out of a swimming pool and feeling cold as all those little water drops on your skin evaporate.  The thermometer will definitely read a colder temperature! So how does this help you determine humidity? Well, if the air is very humid already, there won't be much evaporation, so the wet thermometer won't read much colder than a dry thermometer.  If the air is very dry, there will be a lot of evaporation and the wet thermometer will read much colder than a dry thermometer.  So we did the experiment, and we found about 16 C (61 F) for the wet one and 20 C (70 F) for the dry one.  Then we find a table which tells us the relative humidity as a function of dry-bulb temp and the temperature difference between dry and wet bulbs.

Now for the grand finale. I reminded them how much a substance expands when going from liquid to gas.  Similarly, when a gas condenses to liquid, it occupies much less volume.  So I put a small amount of water into an empty aluminum soda can, heat the can with a torch so that the gas in the can is mostly water vapor, then plunge the can upside-down into an ice bath.  The water vapor in the can condenses quickly.  Suddenly, there's a lot of empty space in the can, and it collapses catastrophically because the pressure on the outside of the can (standard atmospheric pressure) is so much greater than the pressure on the outside of the can (very little because the gas is gone).  When I tried to do this demo previously, I was not cognizant of the key role of condensation and I put very little ice into a giant pail of water, virtually guaranteeing that I would not get condensation.  You can see a video of this kind of demo here.  It was a satisfying conclusion.  Three kids wanted to take crushed cans home for keepsakes.


A River of Sand

Today was my last day with the 5-7 graders.  We spent most of the time learning about beaches: how sand gets there and how sand moves once it's there (California grade 6 standard 2c).  It's a lot more interesting than you might think, and it's explained well in this video.  Normally I show just short clips of videos, 30 seconds or a minute here and there to support whatever I want to talk about; a lot of "educational" videos have a lot of fluff surrounding the critical part(s).  But I found this video to be packed full of good visualizations of what's going on with beaches, far better than I could set up myself, and very little fluff.  So we watched all 20 minutes (ok, I skipped the fluffy first 80 seconds), and I highly recommend it for parents too.  Aside: It's from the 1960's, and told in the "voice of God" style strongly reminiscent of the films I was shown when I was in elementary school.  Science videos today are quite different, typically with a friendly host just like us who wants to take part in experiments just like we do.  That's probably an improvement on average, but I experienced some nostalgia for the "voice of God" style as I watched it. 

After the video, I set the kids to work on the "Rollin' Down the Sand Highway" activity from this packet (the last activity in the packet).  I didn't provide maps, but just looked them up online as needed.  Some kids had never seen a topo map before, so I explained that in context.  But for most of the time most of the kids were stuck on the math, which surprised me because the math is pretty simple.  I guess it's a question of applying math outside of math class!  It's always easier to apply a concept when you've just learned it and you know that the problem you've been given can be solved using that concept.

More specifically, the students did not have a clear idea of how to go about converting cubic yards of sand per year to dump trucks per minute.  I led them through  the easy step of converting cubic yards per year to dump trucks per year, and I thought this would give them the boost they needed to complete it on their own, but I was wrong.  As I circulated around the room helping students, it came out that we would need to know how many minutes per year, and the students were able to come up with that number (although they may have Googled it on a mobile device behind my back): 525,600.  But there was a huge amount of confusion regarding whether they multiply or divide by this number, and whether the result would be dump trucks per minute or minutes per dump truck.  I walked them through how I think about it, and they stared at me totally lost; I stared back wondering how they could not have seen this before.  So I backed up and (much wailing and gnashing of teeth omitted here) found a way to get it across. 

Here's what worked: let's say that you are asked to compute 3 times 4, divided by 7 times 3:

3x4
----  = ?
7x3

The kids universally said the following: multiply across the top and also across the bottom:

3x4     12
----  = ---
7x3     21

This surprised me because it's not what I would do, but once I figured out that one kid was thinking like this, I repeated it for all the kids.  Although the answer surprised me, it's not wrong, so let's continue along these lines and see what happens.  The natural next step is to simplify the fraction 12/21: is this its simplest form?  The typical answer from a student was: ...um...well, I don't see any common factors.  And of course it's hard to see the common factors when you're staring at 12/21.  But if instead you look at

3x4    
----  =?
7x3    
the common factor of 3 is jumping up and down screaming "I'm a common factor!"  So cancel the 3's and you immediately get 4/7.  This is not only much less work than writing 12/21 and then trying to simplify; it avoids the potential for a lot of mistakes.  Although this kind of thing is second nature to me, it was not natural for the kids, who were intent on following the specific rules they had learned about multiplying fractions.

I had to go through all this just to get to the main idea: we can do the same kind of thing with items like dump trucks and minutes instead of specific numbers.  We are given dump trucks per year and we want to get dump trucks per minute, so we can represent the problem like this:

dump trucks      ?         dump trucks
--------------- x   --   =   ---------------
year                     ?           minute


We have to get rid of years and introduce minutes, so if we put years per minute in the question marks, we get:

dump trucks      year           dump trucks
--------------- x   -----     =   ---------------
year                   minute           minute

The years on the left cancel each other, leaving dump trucks in the numerator and minutes in the denominator.  If we had instead tried:

dump trucks      minute           dump trucks
--------------- x   ---------    =   ---------------
year                      year                 minute

this equation is manifestly false; the right hand side should contain dump truck minutes on the top and years squared on the bottom. This kind of thinking seemed to be new to the 6th graders, and I'm glad I did it because it's really important.  It provides a system for making sure you do the right thing.  Don't know whether to multiply by 525,600 or divide by 525,600?  One system popular among the students was to just try one approach, and then if the teacher says it's wrong, just do the other!  But here's a system which makes clear that we have to multiply by years/minute, or 1/525600. And not sure if the resulting number represents dump trucks per minute or minutes per dump truck? Again, the system makes clear that the result is dump trucks per minute.

Another thing the kids need to internalize much better is sanity checking.  If you multiply 722,222 cubic yards by the $5 per cubic yard it costs to remove, you should get a number bigger than 722,222, not less than 722,222.  The kids didn't apply this kind of sanity checking to any of their results, and therefore didn't catch any of their mistakes before showing their answers to me.  This was the first math-based activity I had really done with the upper-graders, and I was probably naive to expect that they could apply math outside the context of a math class.  I should have given a little primer on how to estimate before calculating, how to check that your answer is right after calculating, etc.  This is not really math; it's metacognition in a math context, and I'm now kicking myself for not emphasizing metacognition throughout this trimester with the upper graders.

In any case, we spent a lot of time on this activity: 1 hour, including the movie, before break; then maybe another 20 minutes after break.  It was worth it to work through these issues, but then I did have to cut down on my planned post-break activity.  I'll dedicate the next blog post to the humidity-related activities we did in the last 30 minutes of the morning.


Wednesday, March 20, 2013

Making Clouds in a Bottle

As our final activity in our March 12 physics-behind-the-weather extravaganza, we made clouds in a bottle, pretty much as shown in this video.  This experiment shows that to form clouds we need three things: humid air, a change in temperature/pressure which brings the air below the dew point, and condensation nuclei, which are provided by particles in the smoke we waft into the bottle.  Without these, water droplets tend not to form; see the Wikipedia article on supersaturation.

After many minutes of squeezing to see the clouds form and releasing to see the clouds disappear, they tended to stop forming.  I think that must be due to the particles being driven into the liquid water rather than floating in the air.

This was a relatively quick (~15 minutes) activity, but I was surprised at how the kids had problems getting the smoke into the bottle.  They didn't think about how the bottle had to exhale before it could inhale the smoke.  I didn't trust the kids with matches, so I was quite busy servicing the kids as they each tried to get smoke multiple times.  My advice to teachers is to have several adults help if you do this with a larger number of kids.

Friday, March 15, 2013

Balloon in a bottle


This is a great demo for making air pressure dramatically visible.
The "bottle" is a special flask with a hole in the bottom. Stuff most
of a limp balloon into the neck of the flask, mount the balloon's neck
onto the flask's neck, and inflate the balloon.  When you take your
mouth off the balloon, it deflates, of course.  Ask your audience to
predict what will happen if you put the stopper in before taking your
mouth off.  Now inflate the balloon again, insert the stopper in the
hole at the bottom of the flask, take your mouth off, and TA-DA!  The
balloon does not deflate, despite having its mouth held wide open by
the neck of the flask!  This is really an astounding demo, and people
are delighted every time I do it.

The key to understanding this is that inflating the balloon pushes air
out of the flask through the hole in its bottom.  With no stopper, air
rushes back in through the same hole when the balloon deflates. But
with a stopper, pulling air back in to the flask is not possible. As
soon as the balloon deflates just a tiny bit, the same amount of air
in the flask must occupy a larger volume, which means it lowers its
pressure.  Each square inch of latex in the balloon's surface now
starts to feel a higher pressure from the inside of the balloon than
from the outside of the balloon, so it can't deflate any more.
(Experts: I am purposely omitting surface tension to keep it
simple for a young audience.)  If you now remove the stopper, it
quickly deflates by drawing air into the flask through the newly made
hole.

There are further variations such as pouring water in the balloon
before removing the stopper (which creates a nice squirt of water when
you do remove the stopper).

If you can't find this specialized flask, you may be able to do a
similar demo with a regular bottle by using a straw in parallel with
the balloon to vent the bottle as you inflate the balloon.  From the
videos I've seen, it takes some dexterity and practice to do this and
remove the straw to prevent further air flow at the critical moment,
but it is doable.

I did this Tuesday with the upper-graders at Peregrine School to
introduce pressure to our study of weather.  Pressure is related to
temperature; pumping up a bike tire shows that compressing a gas
raises its temperature, and there are demos I will describe in a
future post which show how cooling a gas makes its pressure drop.  So
hot air masses are associated with high pressure, and cool air masses
(and storms) are associated with low pressure.  In low-pressure storms
like hurricanes, air is pushed from higher-pressure regions on the
periphery toward the center.  Combining this with what we had just
learned about the Coriolis effect, we see that in the northern
hemisphere air will be deflected to its right, making a
counterclockwise circulation which is easily seen in satellite images:


In the southern hemisphere, air is deflected to its left as it tries
to go from outskirts to center, thus creating clockwise circulation.
We saw in our previous activity that the Coriolis effect cannot
determine the circulation in toilet bowls because a few inches' travel
is too small to be affected by riding on the 12,000-mile
merry-go-round we call Earth.  But over hundreds of miles, the
Coriolis effect does build up and cause these wind patterns.

The next and last activity in our  physics-behind-the-weather extravaganza was making clouds.

Thursday, March 14, 2013

Coriolis Effect


After learning how convection makes air "want" to circulate from
equator to pole at high altitudes and back from pole to equator at low
altitudes, we learned how that idealized picture of air flow is
modified by the Coriolis effect.

I won't explain the effect here, because there are plenty of good Web
resources on that, with MIT providing perhaps the best demo.  As a
teacher, my quandary was whether to simply show the video of this
demo, or to try to actually do it in class. I took a risk on the
latter, and it worked out amazingly well.  I built something like the
contraption shown in the MIT video, by borrowing a sturdy turntable (a
low one, much lower than a pottery turntable, so that a fall from it
would not hurt) and clamping a 2"x12"x8' plank to it.  I put a kid on
each end, asked them to take some practice throws, and the spun it and
had them throw at will.  They had a blast! Everyone insisted on taking
a turn---multiple turns---so we had plenty of chances to explore the
effects of different variables, such as direction of rotation, speed
of rotation, and distance over which the ball travels.  When break
time arrived, the kids just kept playing with it, and kids from other
grades also came in the room and demanded their turn.  I can honestly
say this was the most fun science activity I have done with kids.
They begged me to leave the device at school, but I did not leave it
because it would require constant adult supervision to keep it safe.
I strongly urge anyone teaching the Coriolis effect to do this
activity. The activity described in this post took about an hour, but
kids could play with this device for many hours.  If you don't think
you can build one, a merry-go-round should provide a good substitute.

Back in discussion mode, we took some time to understand that Earth's
northern hemisphere is like a merry-go-round spinning
counterclockwise, so when low-altitude air tries to circulate from
pole to equator it gets deflected to the right and becomes a wind from
the northwest, whereas when high-altitude air tries to circulate from
equator to pole it gets deflected to the right and becomes a wind from
the southwest.  This means that one giant circulation cell from
equator to pole and back is not feasible; it gets broken up into three
cells, from equator to about 30 degrees latitude, from 30-60 degrees
latitude, and from latitude 60 to the pole:

(Image from Wikipedia)


The sourthern hemisphere is like a merry-go-round spinning clockwise,
so its air circulation cells (called Hadley cells) are a mirror image
of the north's.  On a faster-spinning planet such as Jupiter, the Coriolis effect
is much stronger and therefore the equator-to-pole tendency is broken up
into more cells.  Each cloud band in this photo represents a cell:


An important thing to note about the Coriolis effect is that it does
not determine the direction of toilet flushes.  Our experiment showed
that when traveling distances which are short compared to the diameter
of the merry-go-round, the ball is not noticeably deflected.  Water
traveling a few inches from rim to center of a toilet ball is
traveling only a tiny, tiny fraction of the Earth's diameter, so the
Coriolis effect cannot be important.  What is important is how water
is injected into the bowl.

I reinforced that idea by showing this video from a travel documentary,
whose producers and stars are completely taken in by locals living on the
equator purporting to demonstrate that water drains in different
directions just north of the equator vs just south of the equator.  As
you watch this video, can you spot a major mistake the locals make?
Also, can you explain how the locals got the water to drain in
different directions at will?

In the next activity, we explored how the Coriolis effect also explains why storms like hurricanes circulate counterclockwise in the northern hemisphere and clockwise in the southern hemisphere.

Tuesday, March 12, 2013

Convection and Weather

This morning I guided the upper-graders at Peregrine School through a
set of weather-related activities.

First, we reviewed what we had learned previously about energy in the
Earth-Sun system.  Briefly, although the Earth's core is very hot and
slowly cooling off due to heat flowing outward through the surface,
the vast majority of heat that we experience comes from the Sun.  How
could we figure that out from everyday observations? Julia nailed it:
the surface temperature varies quite a bit from pole to equator and
from day to night, which is indicative of the Sun rather than of a
constant flow of heat outward in all directions from the Earth's core.
We also reviewed how the Sun heats the ground, not the air (because
air is transparent to visible light); air near the ground is heated by
the ground and that heat then gets mixed throughout the atmosphere.
Whenever something is heated from the bottom, as our atmosphere is,
you get convection (one of the three forms of heat transport we had
discussed earlier).

Convection is the reason we have weather. Hot air rises, cool air
sinks, and so air is always in motion.  To assess the solidity of
their understanding of convection, I immersed a shot-glass full of hot
water (dyed red) into a big container of cool water (dyed ever so
slightly yellow to provide contrast), but first, I asked them to make
predictions about what would happen.  This is a really nice, really
simple experiment or demo.  You can see the hot fluid rising in wisps;
eventually all the red collects on the top half of the large
container.  But the true test of understanding is predicting what
happens when I immerse a shot-glass full of cool water into a big
container of warm water.  The kids showed a good understanding by
predicting that the cool water would not rise at all, and just stay in
the shot-glass (and the bit of cool water which might spill in the
process of setting the shot glass down in the large container would
also settle on the bottom of the large container).  In weather, this
is called an inversion: if cold air gets under a layer of warm air, it
is trapped there, and among other things air pollution can build up in
a city where there's an inversion. (The Wikipedia article on inversion
has some decent pictures, and a Google image search on "weather
inversion" also yields some nice pics.)

Convection transports heat in the oceans as well as in the atmosphere.
There are ocean currents which circulate warm equatorial water toward
northern regions and bring cold water from the north back down toward
the equator to get warmed up again.  The sea off California's coast is
rather cold because the current here comes from Alaska.

But the takeaway message of this part of the day (which took probably
only 20-25 minutes) is that the Sun provides the energy for moving air
around, which makes weather happen.  Because of the way the Sun's
energy hits Earth, hot air must rise from equatorial regions and cold
air must sink near the poles.  But the only way for this to be
sustainable is with a "conveyor belt": hot air which rises from
equatorial regions moves toward the poles, where it cools, sinks, and
moves along the surface back toward the equator.  This creates wind
and weather patterns.  Our next activity was designed to add more
nuance to this general idea.

Before proceeding to the next activity, I presented the class with a
lava lamp for long-term loan.  This will constantly remind them of
convection even when I'm not there!


Saturday, March 2, 2013

Climate Change

Yesterday we tied together California (Grade 6) Science Standards 6
(resources), 3 (Heat), and 4 (Energy in the Earth System).  We'd
already done quite a bit of 3 and 4, so we started with a discussion
of resources.  The consequences of using resources (6a) led naturally to
the greenhouse effect, which builds on our previous understanding of
heat flow in the Earth-Sun system.  We had previously calculated a
rough temperature that Earth "should" be at, ie the stable temperature
at which Earth should radiate just as much heat into space (in the
form of infrared light) as it gets from the Sun (mostly in the form of
visible light).  This temperature was just below freezing, and it
turns out that a natural greenhouse effect makes Earth livable.

We started with this video, which is a nice short demo of how carbon
dioxide absorbs infrared light.  C02 is by no means the only
greenhouse gas; water vapor is also very important, and methane
absorbs much more infrared light on a gram-for-gram basis, but there
is not enough methane in the atmosphere to make it the most important
greenhouse gas overall.  We also watched a short clip of another
video, which demonstrated how the temperature of a bottle of carbon
dioxide increased more than a bottle of air when both were heated by a
lamp.  This latter experiment requires only basic equipment and a
teacher might consider having the kids do the experiment, but I
suspect the experiment could be finicky in real life: you will have to
make sure there are no leaks in the C02 bottle, etc.

The kids were ahead of me on this one. They had already made the leap
to climate change, but I wanted to do at least a quick review to fill
in the logic.  The atmosphere is basically transparent to visible
light, the form in which we get energy from the Sun; if it's not
transparent to infrared light, the form in which Earth gets rid of its
heat, then Earth must heat up.  As stated above, we need a certain
amount of natural greenhouse effect to avoid freezing over, but there
can be too much of a good thing.  We spent the rest of the time in
small groups, playing with a computer simulation of all this. This
simulation is really good, so I encourage you to click Run Now (it
takes a minute to load and start).  You can adjust the level of
greenhouse gases from none (to see our previous calculation in action)
to lots.  As I circulated around the groups, we discussed the effect
of clouds (keep us cooler during the day but warmer at night) vs
greenhouse gases (always keep us warmer).  We also looked at the
Photon Absorption tab, which shows what's going on microscopically.
You can shoot visible or infrared photons (the smallest unit of light)
at a variety of molecules to see which are greenhouse gases.  In the
main (Greenhouse Effect) tab, the view is too zoomed out to see what
the photons are interacting with when they bounce around.  This was a
successful activity: students learned something as they explored, and
some students worked into their recess break to finish answering the
questions on the worksheet.

(Maven alert: it's common to say that greenhouse gases "trap" heat,
but this is not technically correct. It's more accurate to say that
they impede the flow of energy.  I didn't correct the kids when they
said "trap", but teachers should be aware of this.  Saying "trap" as a
teacher leaves you open to refutation.)

After the recess break, we discussed feedback loops and the
physics/engineering definition of positive and negative feedback
(which have nothing to do with psychological concepts such as negative
reinforcement or positive attitude).  I asked them to classify 11
different situations as positive or negative feedback (eg, foxes
provide negative feedback on the rabbit population), and they did very
well, so the concept is possibly less challenging than I imagined.  We
briefly discussed how confusing it is to have delayed feedback (eg
Alice says something to Bob and three days later he raises his voice).
Psychological experiments have shown that when feedback is delayed a
long time, people get very confused as to what causes what: they think
their actions have no effect, or the opposite effect.  (For more on
this, I recommend the book The Logic of Failure.)

So it is with climate change.  Scientists knew of CO2's heat
"trapping" properties more than a century ago and predicted rising
temperatures as we dumped more CO2 into the atmosphere, but it takes
so long for the heat to build up that it's easy to ignore.  By the
time we really see the temperature rise in a very convincing way, we
have dumped so much C02 into the atmosphere that temperatures will
rise much more even if we take immediate action.  Compounding this is
variability: if you just pay attention to the temperatures in your
neighborhood, there is so much variability from day to day and season
to season that it's impossible to notice a change in the average
temperature.  To see the change, you have to average together many
thousands of temperature measurements.

Even after getting people to accept that line of reasoning, they will be
unimpressed by the global average change so far: 1.4 degrees Fahrenheit.
What's a degree or two between friends?  But the change has been much
larger in some regions (the Arctic) and even 1.4 degrees results in a lot of
dislocation and expense: species have to adjust their ranges all over the world,
malaria may be able to move further from tropical regions, etc.  Won't Canada
and the northern US be happy to be a little bit warmer? Maybe, but it's not that
simple. Rain patterns may shift, so farmers in Canada may not be so happy after
all.  And northern forests are being destroyed at a rapid rate now that certain
kinds of beetles can survive the winter further north; beetles are mobile, but trees
are not, and the northern trees will be destroyed before they have time to
adapt to the beetle.  And areas which do gain from climate change may
be overrun with refugees from areas which lose big-time.

Anyway, the delayed-feedback idea led into the carbon cycle.  Over
tens of thousands of years the carbon cycle will remove excess carbon
from the atmosphere, so the Earth will not get hotter without limit
(thus answering an earlier question from a student). 

Our final activity was looking at this interactive flood map.  Seas
rise because the ocean heats up and expands (a very slow process) and
because of melting glaciers (not as slow, but still not easy to
predict).  The standard prediction for the year 2100 (when these
students will be old, but quite possibly still alive) is about 1 meter
of sea level rise, so I asked the students to dial in 1 meter and
answer a few questions about impacts on their house and on nearby
areas.  But the slowness of the ocean expansion means that the impact
of the current amount of carbon is further down the road, and has been
estimated to be 21 meters.  So I asked the students to dial in 21
meters and answer a few more questions.  This was another successful
activity combining student exploration with learning; I urge readers
of this blog to try the interactive flood map as well. Twenty-one
meters seems insane, so some kids need to be reassured that it will be
slow, over hundreds of years and perhaps a thousand years, so people
will have time to evacuate and adjust.  Still, evacuation and
adjustment are costly financially and emotionally so it may be better
to prevent the need for so much evacuation and adjustment in the first
place.

I didn't have time for a few things I wanted to show, but I can link to them here.
First, a quick Google image search for "glacier comparison" shows how fast most
glaciers are melting.  It is astounding*.  Second 30 seconds from this story about the
documentary Chasing Ice provide another dramatic look at glacier melting. (Sorry,
you will probably have to watch an ad to see this, but I couldn't find a better link.)

P.S.: Another important point for teachers of this subject is to emphasize that
"global warming" doesn't mean "every part of the Earth warms all of the time."
There is a model behind the predictions, a model with moving parts which affect
each other so that the predictions are richer than a novice imagines. For example,
a warmer atmosphere will also be a more humid atmosphere, so many areas will
get more precipitation and more intense storms.  If you live in a place where it's
cool enough to snow occasionally, then yes, global warming predicts that you can
get more snow.  People who think a big snowstorm contradicts predictions of
climate models simply haven't taken the time to get familiar with what climate
models really predict.  A scientific model should make a rich set of nuanced
predictions: that makes it easier to set up stringent experimental tests of the model.
This nuance does mean that scientists must work harder to educate the public.  If
any scientists are reading this, I plead with you to put in that hard work.  Society
needs you.

*Climate change deniers have recently made a big deal about a study showing that glaciers in some parts of the Himalayas are actually growing.  Note the qualified phrase "some parts of the Himalayas."  This is NOT what's happening to most glaciers around the world.  As noted above, climate change may have some "winners" as well as losers.  But I doubt the "winners" will feel very secure with so much dislocation in the world.

Wednesday, February 27, 2013

The Dating Game

Our third activity last Friday was on radioisotope dating.  (Everyone
has heard of carbon dating but carbon is just one of many radioactive
isotopes used for dating, and not even the most useful one for
geology, as we'll see below.)  This tied in with the other two
activities, because a certain age pattern in seafloor rocks was a
prediction generated by students' model of continental motions.  So
how do we measure the ages of rocks?

I prepared a whole bunch of small pieces of paper which were purple on
one side and white on the other.  Each group got a handful and put
them all purple-side up.  These represent potassium-40 atoms.  Each
group started constructing a graph of the number of potassium-40 atoms
vs time.  Let's say we start with 100 such atoms at a time we call
zero (we'll see later what this really means).  Over 1.25 billion
years, half of the potassium-40 atoms decay into argon-40 atoms.  The
students represent this by flipping over half of the "atoms" so the
white side is up.  Once flipped over, it can never flip back.  One
analogy is that once a ball rolls downhill, it's not going to roll
back up; similarly the argon-40 atom is in a lower-energy state.  (The
word "decay" evokes an irreversible process, for good reason.) So now
the student plots 50 atoms at a time of 1.25 billion years.  After
another 1.25 billion years, half of the remaining potassium-40 atoms
decay, so we now have 25 left and we plot that.  We may also want to
keep track of the number of argon-40 atoms, so (in a different color
pencil) we put zero of those atoms at time zero, 50 at 1.25 billion
years, and 75 at 2.5 billion years.

Keep going with this process.  In another time step, the 25
potassium-40 atoms decay into 12 or 13 argon-40 atoms. An atom can't
be half-decayed, and there is an element of randomness in this
process, so you can flip a coin or just decide randomly if it's 12 or
13.  (Aficionados will recognize that there is some probability of 11
or 14 as well, but that's beyond the scope here.)  Keep going until
you run out of graph paper, then connect the dots.

Now, how can we tell how old a rock is?  Look at the ratio of potassium-40 to
argon-40 atoms: 1:0 at the start, 1:1 at t=1.25 billion years, 1:3
at 2.5 billion years, 1:7 at 3.75 billion years, etc.  Measuring this
ratio provides an unambiguous estimate of the age of the rock.  I had
the kids field a few practice questions where I would give an age and
they would give a ratio or percentage, or vice versa. (If you're more comfortable
with percentages, as a percentage of the total potassium-40+argon-40 atoms, it's
100% potassium-40 at the start, 50% at 1.25 billion years, 25% at 2.5 billion
years, 12.5% at 3.75 billion years, etc.)


But what do we mean by the "age" of a rock? This is really key to
understanding the whole thing.  Argon is a gas, so when a rock is
molten the argon will just bubble out.  So when a rock solidifies, it
has no argon atoms, and a 1:0 ratio of potassium-40 to argon-40 atoms.
So t=0 corresponds to the last time that the rock solidified, which is
exactly the tool we need to date the age of new ocean floor oozing out
of the mid-Atlantic ridge!

The half-life of potassium-40 is well suited to dating rocks because
so many of them are so old.  What if we wanted to date something
younger, like a human skeleton from an archaeological dig?  Even if it
was 4000 years old, the ratio of potassium-40 to argon-40 would be so
close to 1:0 that we wouldn't be able to tell.  We need something with
a shorter half-life, like carbon-14, which decays to carbon-12 with a
half-life of only 5730 years.  Carbon-14 is great for dating
skeletons, but if we tried to use it to date a rock, we would most
likely find zero carbon-14 left so we would only be able to say that
it's many half-lives old.  To say that a rock is at least 10 of those
half-lives, or about 60,000 years old, is not very useful.

(Teacher warning: a lot of the implementation details are different
for carbon-14 dating.  For instance, there is never a 1:0 ratio of
carbon-14 to carbon-12, not even close. So adapting this exercise to
carbon dating would be tricky.)

This was a good activity for the 25 minutes we had left.  I wouldn't
try to squeeze this activity into any less time, but we definitely
could have used more time.  For example, we could have plotted the
ratio; used our computer skills to make plots, including of the ratio;
brought in some algebra to calculate things quickly through an
equation rather than graphically; etc.

Saturday, February 23, 2013

Trembling in our Books

Yesterday we did three activities related to plate tectonics: making a
model of continental motion and generating predictions from it;
locating earthquakes; and radioisotope dating of rocks.  The second
activity followed roughly the reasoning outlined here.  However, I
didn't want to get into S and P waves, so instead of measuring the
distance from the epicenter to the seismograph by analyzing the wave
form, I decided to "simplify" and give students the time of arrival at
the three seismographs.  Only after we started the activity did I
realize that although the timing information I gave was sufficient,
some serious algebra would be required to solve the problem with just
that information.  So I ended up giving them the distance from the
earthquake to one of the seismographs, just to get them started.

Using timing information to solve for a location is an important
problem with many real-world aspects.  For example, GPS uses exactly
the kind of reasoning shown in the last figure of the page linked to
above, but in full 3-d with satellites distributed around the Earth,
to solve for your full 3-d location.  So I like the pure-timing aspect
of my version of the activity, but I have to find a way to make
workable for 5-7 graders.

Still, I don't think the kids noticed all this scrambling going on
behind the scenes.  They got the main ideas: the intersections of two
circles are the candidate epicenters based on two seismographs, and a
third seismograph can be used to resolve the ambiguity.  And they had
fun finding the mystery location of the epicenter.  I think we took
about 40 minutes on this activity, including a 5-minute opening
discussion on the link between earthquakes and our previous activity.

Get My Drift?

Yesterday we did three activities related to plate tectonics: making a
model of continental motion and generating predictions from it;
locating earthquakes; and radioisotope dating of rocks.

In the first activity, I gave students cutouts of the continents.
(The best way to find these is by googling terms related to this
activity; you can't just print a world map because of the distortion
inherent in most projections.)  The cutouts were on their desks as the
students filed in, so it was interesting to see what the students did
without any instructions: mostly arrange them as they are now rather
than try to put them together like a puzzle.  But it only took a small
hint to get them assembling the puzzle.  Once each group settled on a
way of fitting the continents together, I had them glue the model to
one side of a handout I had prepared.  On the other side they were
instructed to make four specific predictions about what would be
observable if this model were true.  I had to drop some major hints,
but the groups did eventually come up with the same four major
categories: (1) fossils on once-adjacent pieces of land should be the
same even though they are now very far apart; (2) living creatures on
once-adjacent pieces of land should be similar (making allowance for
evolutionary changes and for especially mobile animals such as birds
to be excluded from this analysis; (3) an expanding ocean floor should
be young in the middle where it spreads apart, and progressively older
near the continents (some groups put more emphasis on finding an
identifiable mid-ocean feature, but it's basically the same idea); (4)
once-adjacent pieces of land should have very similar older rock
layers even though they are now very far apart.  One thing no one got
even though I mentioned GPS is that we should be able to measure the
distance between, say, North America and Europe increasing very
slightly each year (it is, by a few centimeters per year).

I had planned for this to be iterative.  In my original plan the
groups were to make a very specific prediction such as "fossils found
in this part of Antarctica match the fossils in this part of
Australia", and then I would look that up quickly (to prevent
computers from being a distraction), and then after seeing how all
four predictions went they would make a better model on a new sheet of
paper (I brought lots of continent cutouts).  But the initial puzzle
assembling took much, much longer than I anticipated.  Some groups
took a lot of time to trim their rough-cut continent cutouts in
exquisite detail; others rearranged theirs many times; others just
didn't focus as much as I would have liked.  So we didn't go through
another iteration.  But one lesson that was clear to me at least is
that although South America fits nicely into Africa, almost nothing
else matches that clearly.  At some point you have to guess (this is
clear when comparing the different guesses of the different groups),
and at that point you have to look for fossil evidence to verify or
falsify your guess.  That whole process is what science is really all
about!

In the time left before break, I asked the students to guess why the
continents move.  They had a lot of crazy theories, but I steered it
back to what we had learned last week: the core of the Earth is hot,
heat flows to areas of lower temperature, and it can flow through
radiation, conduction, and/or convection.  We talked about how each of
these might or might not apply in this case, and figured out that
convection is well suited to transporting heat through the mantle,
which is fluid although not really molten.  Once we got this all into
a diagram with convection loops in the mantle, it was clear that this
was a very plausible mechanism for making continents move. 

This whole activity took 45 minutes, and as I mentioned I probably
should have budgeted much longer, and/or come up with ways to save
lots of time on the puzzle-assembly.  Devoting time to verify or
falsify specific predictions and come up with a better model would
have been a great illustration of the process of science.  Maybe it
should be a homework.  But, apart from this reservation, I think it's
a great activity.

Saturday, February 16, 2013

Heat, Earth, and Sun

Friday I started earth science with the 5-7 graders at Peregrine
School. We started half an hour late because of the all-school
discussion of the meteor strike over Russia.  So I squeezed a lot into
35 minutes before a shortened recess break.  We reviewed the structure
of the Earth and then we talked about the three different ways heat
flows: conduction, convection, and radiation (which in this context is
just another word for light; it does not mean ionizing radiation,
which is what you need to protect your DNA from).  I brought a torch
and a saucepan to make the discussion of conduction more concrete:
cookware designers want the bottom to conduct heat very well so that
the food is heated evenly, but they want the handle to conduct heat
poorly so that you don't burn yourself.  Then I added water to segue
to convection.  Because hot fluids rise, convection occurs whenever a
fluid is heated from below, which occurs in very diverse contexts:
boiling water on the stove, fluid rock in Earth's mantle, and the
movement of air in the atmosphere.

Next, I drew a Sun far from our diagram of Earth, and I asked how heat
gets from the Sun to the Earth.  It can't be conduction or convection,
because empty space can't do either of these.  It's radiation (light).
So we observed thermal radiation (the light emitted by an object by
virtue of its temperature), noting the brightness and color of a light
bulb at different temperatures (achieved by changing the voltage).  We
analyzed the color in detail by looking through diffraction gratings
to make rainbows from the white light, and noting which color in the
rainbow was brightest.  The pattern that emerges is: raising the
temperature makes the light bluer, and makes it much brighter.  We
think of red hot as being about the hottest temperature we ever
encounter, but really white hot is even hotter (the light is a mixture
of red, green, and blue), and blue hot is even hotter than that.  (The
ocean and sky are blue because they scatter the blue light from the
Sun, not because they are emitting light.)  Even objects at room
temperature emit thermal radiation, but that light is "redder than
red" or infrared.  These kids had played with an infrared camera
before, so I didn't bring one, but we discussed their IR camera
experience in this new light.  (Read this post to get the basics of
the IR camera experience.)

The last point I made before recess break: Earth's temperature is a
balance between the energy it gets from the Sun and the energy
(infrared light) it emits into space.  To maintain a roughly stable
temperature, it must emit as much as it gets.  We would examine that
balance in more detail after the break.  During the break, I had a
trick to keep them thinking about this subject: I brought a parabolic
mirror, pointed it at the Sun, and we entertained ourselves setting
things on fire.

After the break, before moving on, I felt they needed more practice with
conduction, convection, and radiation, so I had them work in groups to design
thermoses.  We put together ideas from the different groups to arrive at a
consensus design which minimizes conduction, convection, and radiation.

Back to the main thread: I noted how the parabolic mirror gathered energy from
the Sun over a largish area and concentrated it on a small area.  If we
measured the power (energy per second) falling over one square meter
(about twice the area of the mirror), we would find that it's about
one kilowatt, or 1 kW.  I brought a 1 kW hair dryer to make that more
concrete.  We then talked about night vs day, and how the Sun is
fairly low in the sky during part of the day, and concluded that the
average power from the Sun on 1 square meter of Earth would be more
like 300 W.  So each square meter of Earth should emit about 300 W of
infrared light in order to maintain a stable temperature.

Recall that power emitted ("brightness") increases strongly as the
temperature of an object increases.  So if the temperature of that
square meter of Earth is low, it will emit less than it absorbs, and
that will raise its temperature.  But if the temperature goes up very
high, it will emit more than it absorbs, and the temp will come down.
We ought to be able to calculate the temp which is just right so that
it emits exactly 300 W.  This is where we returned to the computer
programming that the kids are loving so much.  Most of these kids are
not familiar with algebra, but they can (with lots of guidance from
me) write a loop over a range of plausible temperatures and print out
the power emitted at each temperature.

To do this, I had to give them the equation for power (in watts)
emitted as a function of temperature: 0.0000000567 T4, where T is in
Kelvins.  That led to a discussion of Fahrenheit vs Celsius vs Kelvin.
Fahrenheit is defined so that water freezes at 32 degrees and boils at
212, a 180-degree difference; Celsius is defined so that water freezes
at 0 degrees and boils at 100.  Therefore, each Celsius degree is
"bigger" by 180/100 or 9/5.  Therefore Fahrenheit = 9/5 Celsius + 32.
Kelvin = Celsius + 273 (I explained about absolute zero), so
Fahrenheit = 9/5 (Kelvin-273) + 32.  Admittedly, most students didn't
follow all these steps, but at least one did, and I told the others to
just use this to convert while focusing on the logical steps needed to
carry out their program.

So each group wrote a Python script to check from 1 to 1000 Kelvins,
at each step printing out the power emitted and the Fahrenheit
temperature.  It turns out that 26 F is the right temperature for 300
W.  Is this a reasonable answer?  We discussed the approximations
involved (primarily albedo, using snow as an example).  Then we tried
representing this information graphically.  Instead of scanning a list
of numbers to find the right temperature, I taught them how to make a
graph of power emitted vs temperature.  We then added a horizontal
line at 300 W, and the temp at which the line intersects the curve is
the "right" temp.  I really want to work on graph-making and
-interpreting skills, so we discussed the labels we should put on each
axis, and how to summarize the plot in words.

As a teaser for next week, a slightly more rigorous calculation shows
that Earth's global average temperature should be even colder than 26
F.  The reason we are not in fact that cold is that our atmosphere
intercepts some of the outgoing infrared light and turns it back to
the surface: the greenhouse effect.  There is a natural greenhouse
effect which makes our planet livable.  The kids had of course heard
of the greenhouse effect and global warming, so they were able to see
right away that the problem is not the greenhouse effect per se; it is
that we are adding to the natural greenhouse effect, resulting in too
much of a good thing.  More on that next week.

The original plot we made:
and a zoom in to the important part:




Saturday, February 9, 2013

Toy DNA Analysis Part III: Eve of Reconstruction

After the first and second activities of the morning, there was not
much more than 30 minutes left.  I wanted to do an activity with
mitochondrial DNA, so I went over the background first. (They had seen
much of the following earlier in the year, but the review turned out
to be necessary.)

Each cell has a nucleus which contains DNA, surrounded by the bulk of
the cell ("cytoplasm") which has various structures ("organelles") for
performing various functions.  One type of organelle is mitochondria,
when help you turn oxygen into energy.  Each cell has many
mitochondria, and here is the amazing thing: they have their own DNA!
They are not built according to instructions recorded in the DNA of
the nucleus; they simply reproduce by dividing asexually, as if they
were self-contained cells within the cell.  When the cell itself
divides, each daughter gets half the cytoplasm and therefore half the
mitochondria.  It is thought that mitochondria were once independent
bacteria, which learned to cooperate so well with other cells that
they took up residence.  That's pretty amazing!  Another amazing fact
is that all creatures on Earth share the same DNA code.  We are all
related, even humans and yeast.  (Example: if you put the DNA letters
for human insulin in yeast, the yeast understand those instructions
perfectly and makes human insulin.)

When a human egg cell is fertilized, the sperm carries in half the
nuclear DNA to complement the mother's half of the nuclear DNA.  But
the egg has an enormous amount of ctyoplasm and the sperm contributes
none.  So your mitochondrial DNA is an exact replica of your mother's,
and of her mother's, and of HER mother's....there is no shuffling with
each generation as we have with nuclear DNA.  Thus, mitochondrial DNA
makes it much easier to test whether you are a direct descendant
(through an all-female line) of, say, Cleopatra.  (A similar thing can
be done with Y chromosomes and all-male lines of inheritance.)
Furthermore, by mapping the geographical distributions of
mitochondrial DNA, we can trace out migrations of women over time.
(Ditto for Y chromosomes and men.)

It's good to ask the kids a few questions to see how well they
understand.  In this case, a girl said she was sorry for boys because
they had no mitochondria.  So we discussed that issue again: everyone
has mitochondria (that's how they turn oxygen into energy) but boys
won't pass theirs on to their kids.  Moms really do contribute more
than half, as immortalized by this song.

But there can be mutations. It turns out they're fairly rare in
mitochondria, probably because most mutations would be fatal very
early on.  But they do happen.  So if we gather mitochondrial DNA from
a large sample of people, we will find sequences that differ by a
little bit.  We should be able to trace the mutations backward and
reconstruct ancestor DNA.  For example, if we saw sequences GATTACA,
GATTACT, and AATTACA, we might guess that the ur-grandmother, many
generations back, of all three people had the sequence GATTACA.  One
mutation somewhere along the line would explain the people with
GATTACT, a different mutation somewhere else along the line would
explain the people with AATTACA, and the people who had never
experienced a mutation along their line would still have GATTACA.
They hypothesis of, say GATTACT being the ancestor is much less likely
because it requires that there was one mutation to make it GATTACA and
then, in the line with this mutation already present, there was
a second mutation making AATTACA.

So here's the problem I posed to the kids: reconstruct the ancestor of
these sequences:

CATTACGACT     
GAATACGACA      
GATTACAACT      
GATTACGACA      
GATTACGACT      
GATTATAACT
GATTCCAACT      
GTTTCCAACT      

Go ahead: print these out and cut them into strips, try to arrange
them as leaves of a tree, and guess what the branches and trunk have
to look like.

Some groups were lost, and so I tried to work it out with them on the
board, starting by making a guess about the immediate ancestor of one
very similar pair.  It turned out this was probably a bad guess,
because once we had worked out two hypothetical ancestors of two
different pairs, those two hypothetical ancestors seemed to have very
little in common, whereas we would have expected them to look similar
enough that we could guess a hypothetical original ancestor which
spawned them both.  Just as I was realizing that we were almost out of
time, another group handed me a sheet of paper in which they had
worked it all out.  The lesson I drew for everyone: don't be afraid to
take a guess, work out the consquences of that guess, and if it
doesn't work, scrap that guess and start over.  That's what science is
all about! (See the first minute or so of this video.)  Just because
lunchtime was coming up fast does not mean that we had done anything
wrong.  The wrong thing would be to continue pushing a guess which
doesn't explain all the evidence.

If I do this activity again, I would print out very large copies of
the sequence so I could rearrange them easily on the board (writing
with chalk does not lend itself to rearrangement).  Or I would print
it at regular size and use a document camera.  I would probably also
walk them through a simplified example first as I did in writing this
post.  Another idea I just had is to try representing the information
differently.  Perhaps a color code instead of letters would make
things just jump out. 

I saved a few minutes for the coolest part of this: because we know
that mutations happen about once every 10,000 years, we can use this
as a clock.  In my simplified example, you have to reverse-engineer
three mutations to get back to a common ancestor which explains all
the data.  That makes 30,000 years.  In real life with real data, you
have to go back 200,000 years, but you can do it.  That means that
there was one female about 200,000 years ago from whom every human
alive today has inherited their mitochondrial DNA; she is called
mitochondrial Eve.  This doesn't mean that other females living at
that time didn't contribute to people alive today; they surely did,
through their nuclear DNA.  But mitochondrial Eve is the only one who
has an unbroken female line to anyone alive today.  And a similar
argument identifies "Y-chromosomal Adam" who lived around 100,000
years ago.  We are all intimately related!







Toy DNA Analysis Part II

After the first activity and recess break, I posed the challenge of
finding out which animal is most closely related to the hippopotamus.
I gave them short (400-base) DNA sequences of various mammals and
asked them to figure out which was most similar to the hippo's.
Again, I just made up these short sequences to keep it simple.  In
real life, there are a lot more complications just as varying number
of chromosomes, billions of base pairs, etc.

The bottom line is that they had to take an animal, look at each
position in the sequence, ask whether that that animal's DNA at that
position was different from the hippo's, and total up the differences.
After repeating this for several animals, they would see which one had
the least differences.  After the near-chaos of the morning's first
activity, I thought it would be a good idea to go over the big picture
and assemble some pseudocode on the board based on their ideas:

get hippo dna
for each animal other than hippo:
    get this animal's dna
    compare this animal's to hippodna
    print number of differences

I emphasized basic ideas like what do we want to put inside the loop and what do we want to put outside the loop. A program like this does it:
 
hippodna = open('hippo.txt').read()
nletters = len(hippodna)

for filename in ('cat.txt','dog.txt','rhino.txt','bluewhale.txt','rockhyrax.txt','rhesusmonkey.txt'):
    dna = open(filename).read()
    differences = 0
    position = 0
    for letters in hippodna:
        if hippodna[position] != dna[position]:
            differences += 1
 position += 1
    print filename,'has',differences,'differences with hippo dna' 

Yes, Python experts, I know there are more efficient ways to do it but this seems most straightforward for a kid. I won't go into the detail I went into for the morning's first activity, but it was a similarly intense back-and-forth with students running into an obstacle every 30 seconds, which I tried to turn into a learning experience. They again needed emphasis on proper indenting, punctuation, remembering that if they named a variable 'difference' early on then they couldn't refer to it as 'differences' later on, etc. They again wanted to do one animal at a time rather than write a loop. But it was a really good learning experience.

This took close to an hour. At the end, we discussed how they might modify the program to see what's most closely related to some other mammal, and then a third mammal, etc, and build up a picture of how everything is related to everything else: a family tree. That was the emphasis of the morning's third activity.

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.


Saturday, September 22, 2012

Glaciers, Plate Tectonics, Rock Cycle and Fossils: The Geology and Yosemite

Friday was jam-packed with science this week as Teacher Carol and I
helped the upper graders demonstrate the geology of Yosemite to the
younger children, in preparation for our field trip there.  I stayed
in the 1-2 grade classroom, so I will mostly report from there.

Carol set up four half-hour activities:
  • glaciers
  • structure of the Earth (crust, mantle, core) and plate tectonics
  • [snack/recess]
  • the rock cycle
  • making fossils
In each activity, the upper graders kicked it off by explaining the
topic with the aid of posters they had made (you can read more about
Carol's work preparing the upper graders on her blog).  The upper
graders knew their stuff but had not been trained in pedagogy, so
Teacher Marcia and I facilitated by asking questions and repeating
explanations with simpler words and examples when necessary.  (Teacher
Marcia was really excellent in this regard!  At some point after
discussing erosion, the movement of rocks came up again and instead of
assuming the students instantly made the connection to erosion, she
asked "Do rocks have legs?"  This was funny but also made the children
stop and make connections to what they had learned earlier.)  Then
each topic turned to a related hands-on activity or demonstration:

Glaciers: we went outside as the upper grades made a block of ice
slide down a "mountain" of sand in the sandbox.  The kids sketched it,
then returned in the afternoon to sketch it after the glacier melted.
The point was to observe the pile of soil and rock left at the point
of the glacier's farthest advance.  We will see moraines like this in
Yosemite.  Often, they serve as dams for rivers which form in the
channel left by the glacier, and thus have lakes right behind them.
This phenomenon of course wasn't visible in the sandbox demo but I
wonder if we could tweak the demo next time so that it is.
  
Structure of the Earth and plate tectonics: we used a hard-boiled egg
to demonstrate a really thin crust (the shell) over a mantle (the
white) and a core (the yolk).  The Earth's crust really is that thin
relative to its bulk!  Slicing the egg in half also fractured the
shell into "tectonic plates."  We further demonstrated different ways
in which plates interact at their edges (convergent, divergent, and
transform boundaries) with pieces of cardboard, paper, and our hands.

The rock cycle: we grated crayons to represent erosion, then we
deposited the grains into a riverbed of aluminum foil.  We did this
for a few different colors to make distinctive layers of sedimentary
rock, then we wrapped up the foil and added pressure (with kids'
hands) and heat (with a torch).  When we opened the foil we found
metamorphic rock!  The torch was my idea because kids love flame, but
it melted the outside without melting the inside, so I would recommend
Carol's original suggestion of a hot-water bath to supply the heat.

Making fossils: we transitioned from the rock cycle to this by
discussing how older layers of rock are deposited first and buried
further down, so we can relate the rock layers to the ages of fossils.
The 1-2 graders are really into dinosaurs, so this was a great
transition: training for dinosaur hunters.  Beforehand, Carol and I
half-filled small paper cups with clay and coated the flat top of the
clay with a bit of Vaseline.  The kids chose from a selection of
animal figurines and pressed their animal into the clay.  They removed
the animal to simulate the decay of the flesh, but the imprint
remained.  Then a mudslide came along (me pouring wet plaster from a
large cup) and buried the imprint.  They took the cups home and
excavated their fossils the next day.

It seemed like a great experience for the kids, but it would also have
been great if it had been a little more spread out, say over two
Friday mornings.  We were asking the 1-2 graders to absorb a lot of
information in one morning!  Teacher Marcia found a good way of
spreading it out after the fact: Carol provided worksheets for the
kids to fill out, but we didn't have time for that because we had to
go slower for the 1-2 graders, so Marcia decided she will use them to
reinforce and review over the next week.  Apparently the 3-4 graders
were able to complete their worksheets in the morning.

The upper graders certainly learned a lot in the week leading up to
this Friday, first learning from Carol (with the worksheets asking
them to articulate their knowledge), and then making posters and
rehearsing demonstrations to prepare for teaching the lower graders.
(If you want to read more about Carol's work with the upper graders,
see her blog.)  However, because the upper graders had no training in
instructive strategies (asking questions, asking students to come up
with additional examples, etc), the teachers in the room had to
intervene a lot (Carol confirmed that this happened in the 3-4 grade
room too) and by the end the upper graders had become somewhat
passive.  I wonder if we could improve this next time by asking the
upper graders to fill a more specific role rather than a general one,
for example each doing a certain experiment or demo which was
self-contained enough for them to feel expert in.  They were certainly
good in helping the kids one-on-one, for example in making the fossils
and, in the 3-4 grade room, in responding to questions asked by the
worksheets.