Race is Different than Money

This winter I’m taking a course on urban education. Our first topic: segregation and desegregation in schools.

Firstly, what do we mean by segregation? As a working definition, I’ll offer that segregation is the spatial pattern of people across some attribute. So we could talk about segregation by race, by income, or by favorite ice cream flavor. Once we pick something to measure against, we find that every city is segregated according to this definition. What matters is in what way the segregation manifests and the consequences on the populace the pattern has. Segregation patterns can be uniform, with all groups distributed more or less evenly within a region, or clustered. Likewise, we could also calculate the extent to which subpopulations are isolated from each other—which also gives a rough estimation of how often members of one group is likely to run into someone outside of their group. I think when we talk about ‘segregated’ groups, we typically mean highly clustered populations that are isolated from the other groups in the city.

I don’t think that clustered, isolated groups are necessarily bad on their own. I love visiting the North End and Chinatown. Because they’re both T-accessible, it’s easy for me to get there. (Though, both neighborhoods have had rough pasts.) And Harvard Square is the nicest place I’ve ever lived. Score one for segregation!

Moral judgments aside, self-selection can have a big influence on patterns of segregation, at least it can in models. The positive feedback loops reinforce small, individual choice to generate large-scale patterning. Schelling’s model of segregation is a classic, good first example of what I mean. In this model individuals exhibit only a slight preference to have neighbors that are similar to them. The individuals in this model are not racist. (Or maybe they are. I don’t have a good functional definition of racism yet.) When individuals find themselves in a neighborhood that is too unlike themselves, they move somewhere else at random, possibly to a neighborhood more dissimilar from themselves than the last. Even with this mild, partially blind behavior, a totally segregated structure emerges.

In more relaxed models that completely ignore race, even more realistic patterns of segregation form. In this class of model, individuals simply choose to live in the nicest area they can afford. As if by magic, isolated poor and rich neighborhoods form. Depending on the details of the model, wealthy suburbs appear spontaneously. If we use socioeconomic status as a proxy for race, it’s the same old story. Except this time, we have a systems-level mechanism that generates isolated, poor communities that lack the power to advocate for equitable resources and very rich communities with disproportionately high share of public goods insulated by a buffer of middle class individuals. Race was not the cause; money was.

When was ask whether it’s morally justified for a white family to send their kid to a predominantly white school, I think it’s important to know what about the school is so attractive. Do all parents value differentiated cultural and social understanding across many kinds of experience? Are they likely to value it more than a pretty campus or reputation of success by its graduates? Sure, in some cases the choice may be motivated largely by racism. But I’d expect that in many cases, it’s mostly a matter of ensuring access to the most and best resources possible for their child. It just so happens that low-resource groups aggregate, even in the absence of race.

I believe that diversity (of background, experience, perspective, and the like) is important in schools because, as has been mentioned a few times by others, students learn how to navigate social situations outside of school from the people they meet in school. But when we talk about diversity, do we really mean racial diversity? As an example, imagine that an elite, wealthy, mostly white college in the Northeast has recently been chastised for admitting a student body that is not sufficient diverse. Consequently, the school begins recruiting wealthy black students from Africa, some of whom attended the same boarding schools as students already enrolled in the college. In time, the student body comes to be half white, half black with an even mix in all classes and housing situations. In what sense, if any, has the college increased diversity on campus? Do you think the college has produced the diversity they were previously lacking?

While I think that racial segregation is a problem, I don’t think race is necessarily the capital-C cause. In a world without racism, economic segregation will still exist. But I’m willing to bet that in a world with no financial disparity, a lot of the troubles we associate with racism would evaporate. And so, I think race will play a secondary part in the solution to segregation. In fact, I think that race may even obscure the issue of access to equitable education for all. (I’m not sure if that’s what we’re really trying to achieve, but I think it’s a good start.) Instead, I believe that the struggle of the American education system is one of power and status. As such, I think we should talk about resource allocation (including strategies that move students to resources as well as bringing more resources to students), causes and effects of socioeconomic segregation, and cultural and pedagogical practices that systematically discourage/motivate students to learn the skills required to become an informed and capable citizens.

Talking to the moon

This semester I’ve helped teach a biology-meets-math sort of a course. There’s been some debate among my labmates about what such a course ought to include and about the merits of math in biology more generally. It’s true, I’ve never explicitly used control theory to calculate how much liquid I should pipette into my experiment. And I very seldom think about the principle of detailed balance when I peer into a microscope. So why would we take a room full of experimentalists and teach them about dynamical systems on abstract graphs—how could this possible improve their biology?

My students were wondering the same thing when they showed up to the first section this semester. That week we were discussing a paper by van Oudenaarden on yeast’s ability to regulate and maintain its internal osmotic pressure despite living in a varying external environment. The technique they used was indirect but powerful. Assault the cell with pulses of carefully measured salt concentrations and then watch as a judiciously chosen protein read-out accumulate in the nucleus in response. A mess of genes and proteins and other factors have been associated with osmoregulation and the trick was to pick out which of these players are most important and when.

By matching their salt pulse inputs with fluorescently labeled protein outputs, the researchers were able to come up with a simplified model of the cell’s vastly complicated internal logic. And while their model is a cartoon of reality, it was extremely good at predicting previously unmeasured behavior when different cells and different cell types were subjected to new concentrations of salt. Combing the literature helped the researchers identify the parts that popped up in their model. They pared down a hair ball of chemical interactions and were left with a relatively simple mechanism.

This experiment is wholly unlike the classic experiments I usually think to do as a biologist. For example, how would a biologist determine whether the moon affects the tides? Now, hold on. I know that the moon and tides don’t normally reside within the realm of biological experimentation. This shouldn’t worry you. Biology, just like any other discipline, has its own methodologies. And these methodologies make some knowledge easy to dig up and verify and others hard. So, what does biology have to say about the tides?

First off, you’d do a knock-out study. Blow up the moon, but keep everything else the same, and see how the tides changed—if at all. Perfect. They stopped. What next? Well, there’s an obvious follow-up study: over-express the moon. Put two of them up there; maybe three, just in case. Now that the tides are back, we have some strong evidence that the moon in some way seems to influence the tides.

Part of the beauty of the van Oudenaarden input-output approach is that it didn’t require us to muck about with the genetics of the yeast. No knock-outs, no knock-ins. They kept the cells normal and genetically intact. Instead, they did what my friends in the cognitive neuroscience labs do with children subjects. They asked the cells a question: “What will you do with this salt concentration?” And then they listened for the response. From the answers the cells gave them, the researchers were able to infer something about the decision-making process. In this case, they drew it up as second-order linear, time invariant system. Here is an example where math allowed a biologist to do something very surprising. Math was used to talk to cells, ask them questions in their own language (so to speak), and learn something about them from their answers. Doesn’t that sound nice?

Possession is less than nine tenths.

Walking into a library doesn’t make you literate. Owning a speedo doesn’t make you a swimming superstar. Nor does having a chemistry set make you a chemist. Sure, all of these statements make sense. It’s hard to argue otherwise. So why was I so shocked this morning when I realized that scribbling my appointments into a calendar doesn’t make me organized? That’s right, I woke up bright and early to play squash with a friend from college—I even had the decency to send a polite text message to her while heading over to the courts.

“Hemenway, I’m on my way.”

She responded with a real, voice-to-voice telephone call. Her voice was laughing, though. It looks like I’ll need to wake up, bright and early, again, tomorrow morning How can this be? My Google calendar was wrong. I was wrong.

Moral 1: Having a resource is only half the story. You need to know how to use it well, too. (The computer scientists have a phrase for this sort of situation, “Garbage in, garbage out.”)
Moral 2: I should get an assistant.

At least I got some quality practice in.

Read my other blog, too.

When I was a sophomore in college, math had got me down pretty bad. You see, it’s never math’s fault if you don’t get an answer. My friends and I used to joke that math was that really hot cheerleader in high school. And who did she date? Well, the star quarterback of the football team of course. She wouldn’t even look at any of us; I wasn’t good enough to be the waterboy, let alone make it onto the team of professional mathematicians. At least that’s how I felt.

Looking to crawl out of my math-induced low, I did what I thought you’re supposed to do in such a situation: I went to one of my professor’s office hours for advice and consolation. And he responded, I suppose, in the way that he thought you were supposed to respond in a such situation: he told me that I’d probably do well as a science writer, like for the New York Times. It was as if the cheerleader had spit in my face. A science writer—really? But I wanted to study quasi-Fuchsian groups or sympletic geometry or something exciting and esoteric like that. I left those office hours feeling less supported than I had when I entered.

Well, it looks like that professor knew me better than I did myself. That’s right, I’m going to start posting (hopefully regularly) for Complex Systems and Society. The idea as hatched (not by me) while I was hanging around the Santa Fe Institute, essentially the Mecca of complex systems, earlier this summer. Look there for accessible commentary from researchers on current research. I’ll probably write about evolutionary game theory, sociobiology, and other stuff I don’t have the background to write about with much authority (not that that has stopped me before, mind you). Now that doesn’t mean I won’t write here anymore—I’ve been remiss in my duties, I know—because I will. I have three entries drafted already.

My first set of posts over at Complex Systems will detail what goes on in my head as I read Foundations of Social Evolution. So far it’s been a treatise on the Price equation, which describes natural selection with a hierarchy of effects. The concept is something I’ve run into a handful of times. Each encounter left me running away without a proper understanding. Forty-four pages into this book and I still don’t have a firm purchase on it. The fledgling computer scientist in me likes that it’s recursive, though. With some persistence and a little luck, I’m sure I’ll have something useful to say before my first deadline rolls around.

Anyway, this is a note to you, faithful reader, to wish me good luck on my foray into science writing. Look for something over there by August 2.

Some Mottos

I’m loathe to write this post, because I know it’s going to be short and what I’m about to write—and my essential character, therefore—can easily be misinterpreted. Still, in the last two days people have accidentally uttered things that I think could be motto-worthy. However, one of my implicit mottos, one that I will not formally list, is, “You shouldn’t have too many mottos.” After all, it’s hard enough to carry around a handful of maxims throughout the day. Many more and I’d run out of the computational resources necessary to live by my own standards.

It is my hope that once I’ve got these things committed to (metaphorical, digital) paper, I’ll be able better to organize them, combine them, and generalize them. That’s right: it’s time for a spring cleaning of my wintered philosophies.

So here they are in chronological order:

  1. You can never have too much butter fat.
  2. Treat a person like dirt and he’ll stick to you like mud.
  3. I am smarter than my genes.
  4. I am more patient than a five year old.
  5. Be the person you want to attract.

On Friday DJ accidentally pointed out that I’ve ignored the deterministic components of nurture in the old war between nature and nurture. So maybe it’d be worthwhile to add

  • I can outgrow my environment.

And this morning my aunt Robin called to discuss her responses to Carol Dweck’s book on self and motivation theories that I mentioned a long time ago. I told her that I find her receptiveness to what Dweck has to say encouraging. Her response could warrant a more permanent place in my daily life:

  • It doesn’t matter what you think if it’s not working.

Do you have any words of wisdom that I should consider introducing to my list? You know I love comments.

Making Proper New Year’s Resolutions

It that’s time again: the start of a new year. And while my cat hasn’t seemed to respond to the fleeting opportunity to mend one’s ways that the beginning of a new year brings, I have. In order to honor that age-old tradition of turning over a new leaf and calendar all at once, I’ve decided to make some new year’s resolutions of my own.

I applaud those people who pause long enough mentally to arrange their lives, reflect, and respond accordingly. I think it’s important to remove ourselves from the hustle and bustle of our own lives, make the familiar unfamiliar, and critically examine where we are and where we’re going. But in my experience, people have got the technique all wrong. Few people know how to come up with a proper resolution. And without a good resolution, how could you ever hope of using it to signpost your journey through the coming year? So I am here to impart my deep if not self-important insight to you, free of charge.

I remember my mother calling me one early January to wish me a happy new year and to share her resolution for the new year. “Josh, this year my resolution is to be happier,” she told me over the phone. Likewise, my dad resolved to make more money. And this year, for about twelve seconds, I thought, wouldn’t it be nice if I managed my time more efficiently? Sure, these are all nice things to wish for, at least on the surface, but good resolutions they are not. (I hope my parents don’t mind my saying so here.) It’s hard to argue with anyone who wants the time and wealth it takes to be happy. (It takes wealth and time, doesn’t it?) So what makes these resolutions to bad? Well, two things.

A year is a long time, and it’s hard to keep track of long-term behavior when you experience it only in the moment. For this reason, avoid making resolutions that are fuzzy. Resolutions need to be stated in a way that gives you an easy way to know whether you achieved them. You need to build a measure into your goal, so you know whether you made it or not. In this way you have a mechanism to figure out how to adjust your actions if you’ve run off track. For example, instead of resolving to “be wealthier,” try to save 10% of your paycheck each week in account that you can’t touch until next year. It’s easy to check whether you’ve been saving over the course of a year. It’s a lot harder to evaluate your relative wealth from 365 days in the past.

Not only is it hard to know whether you’ve achieved a fuzzy goal, it’s hard to know how even to start. How in the world does someone go about “being happier” anyway? Resolutions should suggest a planned course of action. To kill two birds with one stone, I’m going to venture that a regular, regimented work-out routine would make me happier and force me to manage my time more efficiently. According to search trends on Google, it looks like a lot of people feel the same way. Look at how the number of searches on term “gym” spiked at the start of 2004, 2005, 2006, and 2007.

But we have to be careful to make sure that our resolution to go the gym has: (1) a well-defined goal, and (2) suggests a way to achieve that goal. So this year, I’ve resolved (2) to go to pool three days a week, so that I can (1) swim a mile without stopping. And, oh, to be more successful, too.

Happy new year, everyone.

Hold the door, please!

Everyday each of us engages in several delicate dances with the other members of society. I secretly long for the days of learned formalities, proper ettiquette, and wide-spread manners. If someone were just to tell me what to do, things would run more smoothly. Take, for instance, the simple act of holding the door for another person.

So far I’ve only noticed one person play the situation correctly. On several occasions, I held the door for my friend Lane, who, by chance, was always a good ten yards away when I first spotted him. Lane usually acknowledged my act of kindness. He might say, “Thanks, Joshie,” but he would never speed up as I stood. The moments seemed to lag as he slowly approached the entrance to the dining hall. Once he arrived, I thanked him with full sincerity. Most people, I explained, sprint once they realize that someone else is holding the door for them. However, that ruins the favor. What sort of charity requires you to break a sweat? Lane had enjoyed my gift as it was intended, and I believe we both appreciated the exchange all the more for it.

But that sort of action doesn’t readily transfer to any other person. On Friday a stranger held a door for me, and like most people, I sped up as soon as I noticed that I was inconveniencing another person. The man beckoned me to slow down, but how could I? Then I’d come across as arrogant and entitled. I’ll make no one a doorman for me. Well, at least no stranger. And there lies the fundamental difference. Lane and I are friends. This man and I were not. For some reason it’s easier for me to take advantage of my friends than strangers. I guess that’s a good thing for society at large, though a little strenuous on my immediate circle of friends. I believe sociobiologists would have a thing or two to say about multi-level selection processes at this point, but I don’t.

Instead I have a few questions. Normally we think of selfish behavior as something that individuals inflict on members outside of their group. (The ones who are selfish to those inside their group is called “cheaters” or a “defectors”.) The defectors take advantage of and therefore benefit from the cooperators on the individual level. Locally, the defectors do better. But when it comes to asking for help, it’s easier for me to ask someone I know I can trust. I’m more willing to ask my friends to do me favors than strangers. In the iterated prisoner’s dilemma, it’s in your best interest to cooperate with your partner because you’re going to see them again. If you screw them over, they’ll remember it and be less likely to help you in the future. But in many cases I impose on other precisely because I know I’ll see them again. My willingness to ask others to do things for me increases with my level of comfort with them, and I see it in others, too.

Take it up a notch and look at groups as your fundamental unit rather than individuals. People have noticed before that groups that have more (internal) cooperators do better on average than groups with fewer. That seems to make sense. If more people in your group are willing to help out others in your group, the group should run more smoothly than groups that don’t work well together. Nothing exciting there. But what happens when there’s lots of internal chaos but external altruism—can groups composed of individuals that take advantage of each other but cooperate with members outside of the group coexist given proper inter-group interaction?

Because the comfortable defectors have to act charitably when someone else calls on them, it’s a little unfair to characterize them as defectors. Maybe it’s best to call them comfortable defectors-generous forgivers. This is starting to sound like the win-stay, lose-shift strategy. Maybe the folks studying evolutionary dynamics can clear things up for me. Help me out if you can, especially if I’m already comfortable with you.

Technorati Tags: , , , , , , , , , , ,

Geotools, WFS-T Update Request

A pet project of mine has flung me into the exciting though less-than-firm territory of web-backed geographical information systems. Since I don’t have the thousands of dollars it costs to get a commercial server like those provided by ESRI, I’ve had to check out the open-source alternatives. And there are some out there. I’m using GeoServer, and it works great! I can send all the web-feature service transactions (WFS-T) in XML I want and it works every time. Not bad if you want to make a GoogleMap of your house on your own—so long as you’re content to hard-code everything by hand. Should you want to jazz things up a bit (i.e., make minimally useful dynamic maps), like me, then you have to do a little more work. Actually, you need to do a lot more work.

GeoServer is built on top of a gargantuan set of Java libraries, collectively packaged under the name GeoTools. Now I appreciate that this thing exists, all two hundred and fifty megs of source code and all the functionality that comes with it. However, navigating the mountain of documentation for this thing is, at least for me, a little daunting. It took me a few days (and some serious help from my friend Matt) to figure out how to write a simple update transaction using their API. (Compare that to the forty-two seconds it takes me to type up the XML.)

Since other people might want to know what they have to do update an attribute field using WFS with GeoTools, and since I couldn’t easily find out how to do it elsewhere, I’ve decided to post a short snippet of code right here on my blog. That’s right: my charity knows no bounds.

In this example I’m going to update the value of all the features (polygons, lines, points, whatever) that match a simple filter. Here I’m going to change the value of propertyToUpdate to updatedValue using a filter to get all the features with the attribute called constraintProperty with a value of constraintValue. I’ve marked them in red, so that it’s as easy as possible to customize this example to fit your needs. Let’s start with the XML that the Open Geospatial Consortium standards expects to see.

<wfs:Transaction service=”WFS” version=”1.0.0″
  <wfs:Update typeName=”myns:LayerToUpdate“>

Now let’s rock out the Java.

Like I said, GeoTools is mammoth. To make life easy, we’re going to import a whole bunch of classes for this example. So many, in fact, that their number really warrants my displaying them here in their own list. What’s more, the names of some of classes (like Filter) show up in more than one package, and you need to keep track of which is used where. So keep an eye out for things from org.opengis.

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;

import org.geotools.data.DataStore;
import org.geotools.data.DefaultTransaction;
import org.geotools.data.FeatureStore;
import org.geotools.data.Transaction;
import org.geotools.data.wfs.WFSDataStoreFactory;
import org.geotools.feature.AttributeType;
import org.geotools.feature.FeatureType;
import org.geotools.filter.FilterFactoryFinder;
import org.geotools.xml.XMLSAXHandler;

import org.opengis.filter.Filter;
import org.opengis.filter.FilterFactory;
import org.opengis.filter.expression.Expression;

In our constructor we’ll set up a connection to the WFS server using a URL. If you’re tinkering with GeoServer, then that URL you’re looking for probably looks something like http://localhost:8080/geoserver/wfs. Since we know that we’ll want to filter our responses, it’s not a terrible idea to make a filter factory now and save it for later. In GeoTools everything is made using a factory. For filters, we need to make a factory using the new keyword, though. Here goes.

public class WFSUpdater {

    private DataStore wfs;
    private FilterFactory filterFactory;

    public WFSUpdater(String url) {
      try {
        URL endPoint = new URL(url);

        XMLSAXHandler.setLogLevel(Level.OFF); // turns off logging for XML parsing.

        // Parameters to connect to the WFS server, namely the URL.
        // You could have others, say if you had to authenticate your connection with a username and password.

        Map params = new HashMap();
        params.put(WFSDataStoreFactory.URL.key, endPoint);

        wfs = (new WFSDataStoreFactory()).createNewDataStore(params);
        filterFactory = FilterFactoryFinder.createFilterFactory();

      } catch (MalformedURLException e) {
      } catch (IOException e) {

Now that we have a connection, it’s time to make the transaction. As a first timer to GeoTools, I found it difficult to crawl through the documentation. Lots of their classes and methods have been deprecated with no clear hints about what to use instead. I had a hard time finding the right constructors. In what follows everything is hard-wired into the code, but it shouldn’t be all that bad to tweak things so that it works the way you like.

public void updateProperty(String propertyToUpdate, String updatedValue) {
    // This is the layer name on the server.
    String layer = “myns:LayerToUpdate“;
    Transaction update = new DefaultTransaction(“update”); // The handle/ID of this transaction is called “update.” It’s required.

    try {
      // Make the filter.
      Expression property = filterFactory.property(“constraintProperty“);
      Expression value = filterFactory.literal(“constraintValue“);
      Filter filter = filterFactory.equals(property, value); // This is an org.opengis.filter.Filter.

      FeatureStore features = (FeatureStore) wfs.getFeatureSource(layer);

      // Set the transaction. Otherwise, we can’t commit our changes later on.

      // Fetch the property from the FeatureType schema so that we can update it with the new value.
      FeatureType schema = features.getSchema();
      AttributeType atrributeToUpdate = schema.getAttributeType(propertyToUpdate);

      features.modifyFeatures(atrributeToUpdate, updatedValue, (org.geotools.filter.Filter) filter); // There’s that casting again.

      // Record the modifications.

      } catch (IOException e) {

Anyway, I hope this saves some people the hassle of tearing through the Javadocs for GeoTools. Also, if there’s a better way to do what I did, please let me know. Happy GIS-ing.

Technorati Tags: , , , , , , , , , , , , ,

Animal imagination

This time I have a question for you, the kind reader: can anyone tell me (or point me to a study that suggests) whether non-human animals practice their skills outside of a group?

On many a PBS nature documentary, you can find a gathering of young, fury things play-fighting one another to hone their hunting and social skills. However, human athletes will substitute physical competitors with imagined or abstracted ones. It’s common for athletes to compete against recorded times, high scores, or a mental reincarnations of a previous or idealized self during practice in the absence of a physically present opponent. And this sort of activity isn’t confined to sports like running or cycling. Full teams can visualize a routine or match performance for positive effect. Marines are instructed to imagine their hitting a target—and this sort of practice increases accuracy. These pretend opponents have real, demonstrable, and causal power. In short, human imagination is pretty powerful aid to skill acquisition, at least.

So let’s get back to my opening question: to what extent can non-human animals imagine? Please help me out if you can.

Technorati Tags: , , , , , ,

Genetics by the Poolside

Happy Independence Day! To celebrate our nation’s founding, my family and I often hit up the Cape. This year was no exception, there’s little to report. The weather has been spotty: a little rain here, a few showers there, but nothing substantial. Someone was playing bagpipes the other night. And I witnessed a gruesome car accident a few feet from my balcony during the fireworks spectacular. A mass of people immediately sprang up to help the man, direct traffic, and call 911 repeatedly until emergency vehicles could make their way here. I was genuinely impressed by the response, professional and make-shift alike. Within seconds the response team had the guy off to the hospital in no time flat. I think it prudent not to speculate on the cyclist’s health. I don’t want to jinx anything, you know.

And since it’s vacation time, I’m here, at the kitchen table, on my laptop, implementing genetic algorithms. Maybe later I’ll describe what I did. Maybe if I do, someone will be able to tell me if my results make any sense. Whether or not my programs reproduce the classical results isn’t really the point, though. Look at the evolution of strategies for playing the iterated prisoner’s dilemma: they make perfect modern art tile mosaics! I bet someone’d love to have this pattern on their pool floor or garden wall. (Don’t be alarmed that they don’t appear all that related. Each row in black represents the fittest individual from one of a number of independent runs. That is, they probably never had the chance to meet each other.) Imagine the graphic tastefully obscured by flowering vines. (Click on it for a larger image.)

I can see an upside-down raccoon in it. What can you find?