Different sampling approaches exist that target different sub-populations to make sure they appear in the sample. To see these sampling approaches at work we are going to sample lines from Walt Whitman’s poem “Song of Myself”…

Sampled Poems Contain Multitudes

Sara Stoudt
Bucknell University

The basic principle of statistical inference is motivated by the fact that we can rarely observe the entire population. For example, we often can’t talk to everyone to ask, “Who is your favorite poet?” It would take too long and be too expensive. Instead, we rely on a sample of the population. If the sample is representative, or “looks like” the population, we can use our findings from the sample to infer properties about the full population.

But how can we make our sample “look like” the population? Different sampling approaches exist that target different sub-populations to make sure they appear in the sample. To see these sampling approaches at work we are going to sample lines from Walt Whitman’s poem “Song of Myself” to make new poems. Follow along with the code needed to produce these sampled poems here.

Walt Whitman was an influential 19th-century poet who is often emblematic of the American poetic style of the time. “Song of Myself” was revised several times in different editions of his book, Leaves of Grass. Here I will use the final version that has 52 stanzas. Yes, this is a long poem, but as one of its most famous lines states, “I am large, I contain multitudes.” There are many different ways to recombine these lines to create new poems. And hey, if we don’t have time to read the whole poem, maybe we can still get a good sense of Whitman’s style and message by looking at a sample of the full text.

Leaves of Grass 1860 frontispiece with calligraphic text
Frontispiece to an 1860 edition of Leaves of Grass

The sampled poems created here are examples of found poetry that “take existing texts and refashion them, reorder them, and present them as poems.” (There’s even some other found poetry based on Whitman, this time via erasure poems, where poets choose what to erase from a pre-existing piece, rather than what to keep, like we do here.) Let’s see what we can find!

Simple Random Sampling

The baseline sampling approach is to take a random sample. Then we rely on probability to lead us towards representativeness. For example, if 25% of the population’s favorite poet is Whitman, and we take a random sample of 100 people, we would expect about 25 of them to answer “Whitman”.

Randomly chosen dots in a grid.
An illustration of simple random sampling.

Here is what we come up with when we form a poem that has the same number of lines as there were number of stanzas in original poem:

And these tend inward to me, and I tend outward to them,
My voice goes after what my eyes cannot reach, 
In vain the elk takes to the inner passes of the woods, 
I do not ask the wounded person how he feels, I myself become the wounded person,  
Whatever interests the rest interests me, politics, wars, markets, newspapers, schools,  
They do not think whom they souse with spray.  
Dung and dirt more admirable than was dream’d,             
This hour I tell things in confidence,         
And would fetch you whoever you are flush with myself. 
O despairer, here is my neck,    
The smallest sprout shows there is really no death,      
Embody all presences outlaw’d or suffering,       
I heard his motions crackling the twigs of the woodpile,      
Maternal as well as paternal, a child as well as a man,    
Lack one lacks both, and the unseen is proved by the seen,     
Were mankind murderous or jealous upon you, my brother, my sister?   
How they contort rapid as lightning, with spasms and spouts of blood!     
Out of the dimness opposite equals advance, always substance and increase, always sex,  
Dash me with amorous wet, I can repay you. 
At home in the fleet of ice-boats, sailing with the rest and tacking, 
Where the steam-ship trails hind-ways its long pennant of smoke,    
Magnifying and applying come I,            
The half-breed straps on his light boots to compete in the race,   
For I who am curious about each am not curious about God,  
I anchor my ship for a little while only,       
And filter and fibre your blood.  
Two well serv’d with grape and canister silence his musketry and clear his decks.  
I help myself to material and immaterial,  
Partaker of influx and efflux I, extoller of hate and conciliation,   
What I guess’d while I lay alone in my bed,    
Where the life-car is drawn on the slip-noose, where the heat hatches pale-green eggs in the dented sand,
Not a youngster is taken for larceny but I go up too, and am tried and sentenced.
I hear bravuras of birds, bustle of growing wheat, gossip of flames, clack of sticks cooking my meals,  
All goes onward and outward, nothing collapses,      
We found our own O my soul in the calm and cool of the daybreak.    
The press of my foot to the earth springs a hundred affections, 
Seeing, hearing, feeling, are miracles, and each part and tag of me is a miracle.     
This is the press of a bashful hand, this the float and odor of hair,   
Some made a mad and helpless rush, some stood stark and straight,    
Our vessel riddled and slowly sinking, preparations to pass to the one we have conquer’d, 
With music strong I come, with my cornets and my drums,   
And brown ants in the little wells beneath them,   
Flames and ether making a rush for my veins,                                                             
If our colors are struck and the fighting done?                                                         
I tighten her all night to my thighs and lips.                                                           
A youth not seventeen years old seiz’d his assassin till two more came to release him,                  
Waiting responses from oracles, honoring the gods, saluting the sun,                                    
And what is yet untried and afterward is for you, me, all, precisely the same.                           
Trippers and askers surround me,                                                                         
Lovers of me, bafflers of graves.                                                                        
Do I astonish more than they?                                                                            
I reach to the leafy lips, I reach to the polish’d breasts of melons. 

Aside from some odd punctuation, this isn’t too bad for a randomly-generated poem. There are some awkward transitions, but one could read this as the product of more of a stream of consciousness approach than the more meticulously revised original.

Stratified Random Sampling

But what if there are certain subgroups of the population that do not have many members? Since they are so rare, it will be hard to pick them as part of the sample, just by chance alone. Stratified random sampling allows us to split the population into groups and then sample members of each group to form our full sample. This way each group is represented in the final sample.

One dot randomly chosen from each row.

For example, there are some stanzas of Whitman’s poem that have only 6 lines, where the median stanza length is about 20. If we stratify by stanza, so that each one is represented by one line, we end up with a poem like this.

This sampling approach lets every stanza have equal representation. We could also sample proportionally. That way each stanza is still represented, but longer stanzas aren’t under-represented. That one gets a little long to print here, but check out the code to see an example and make your own.

Cluster Random Sampling

Sometimes sampling comes with logistical challenges. For example, what if you had to travel to do the sampling? You might want to limit the number of cities you go to. You could cluster people by city and then sample at the city level, thereby limiting your travel. Here, we could cluster by stanza and pick a random sample of only stanzas for our new poem. This has the added benefit of keeping lines within a stanza together and limiting awkward transitions between lines. Jump to the poem here.

Dots placed in two columns.

Systematic Sampling

Systematic sampling is also motivated by pragmatism. You start with a randomly-selected person and then systematically skip $k$ people on the list to choose the next person, and keep taking every $k$th person until you reach the end of the list… This can be helpful if you don’t know exactly how many people are available for sampling at the beginning of the study. For example, consider an exit poll where every fifth person to leave the polls is questioned.

Every 12th box has a dot in it, starting from the 2nd dot
A systematic dot selection.

Starting with the 50th line and taking every 50th line afterwards results in the following poem:

Stout as a horse, affectionate, haughty, electrical,                                                             
How could I answer the child? I do not know what it is any more than he.                                         
The youngster and the red-faced girl turn aside up the bushy hill,                                               
Twenty-eight young men and all so friendly;                                                                      
The litter of the grunting sow as they tug at her teats,                                                         
The regatta is spread on the bay, the race is begun, (how the white sails sparkle!)                              
Breathe the air but leave plenty after me,                                                                       
I find no sweeter fat than sticks to my own bones.                                                               
I believe you refuse to go back without feeling of me,                                                           Unscrew the locks from the doors!                                                                                
The little light fades the immense and diaphanous shadows,                                                       
A tenor large and fresh as the creation fills me,                                                                
The insignificant is as big to me as any,                                                                        
A gigantic beauty of a stallion, fresh and responsive to my caresses,                                            
Upon the race-course, or enjoying picnics or jigs or a good game of base-ball,                                   
My course runs below the soundings of plummets.                                                                  
They have clear’d the beams away, they tenderly lift me forth.                                                   His was the surly English pluck, and there is no tougher or truer, and never was, and never will be;             
It is I let out in the morning and barr’d at night.                                                              
I do not ask who you are, that is not important to me,                                                           
The day getting ready for me when I shall do as much good as the best, and be as prodigious;                     
Making a fetich of the first rock or stump, powowing with sticks in the circle of obis,                          
All below duly travel’d, and still I mount and mount.                                                            
I know I have the best of time and space, and was never measured and never will be measured.                     
And I swear I will never translate myself at all, only to him or her who privately stays with me in the open air.
If you do not say any thing how can I say any thing?   

I love how the last three lines come together here!  

Multi-stage Sampling

Multi-stage sampling combines multiple sampling schemes together. For example, we could do a cluster random sample and then take a simple random sample within each cluster. We wouldn’t be able to talk to everyone within a city like we proposed in the clustering example above anyway.

Here is a small-scale example of what this can look like for Whitman:

(No doubt I have died myself ten thousand times before.)                                         
Of the moon that descends the steeps of the soughing twilight,                                   
I ascend from the moon, I ascend from the night,                                                 
Of the turbid pool that lies in the autumn forest,                                               
I hear you whispering there O stars of heaven,                                                   
And as to you Death, and you bitter hug of mortality, it is idle to try to alarm me.             
And what I assume you shall assume,                                                              
I, now thirty-seven years old in perfect health begin,                                           
Hoping to cease not till death.                                                                  
For every atom belonging to me as good belongs to you.                                           
Creeds and schools in abeyance,                                                                  
I celebrate myself, and sing myself,                                                             
The grave of rock multiplies what has been confided to it, or to any graves,                     
Somehow I have been stunn’d. Stand back!                                                         
That I could forget the mockers and insults!                                                     
That I could look with a separate look on my own crucifixion and bloody crowning.                
That I could forget the trickling tears and the blows of the bludgeons and hammers!              
Inland and sea-coast we go, and pass all boundary lines,                                         
One of the Nation of many nations, the smallest the same and the largest the same,               
At home on the hills of Vermont or in the woods of Maine, or the Texan ranch,                    
A farmer, mechanic, artist, gentleman, sailor, quaker,                                           
A novice beginning yet experient of myriads of seasons,                                          
A Southerner soon as a Northerner, a planter nonchalant and hospitable down by the Oconee I live,
At home in the fleet of ice-boats, sailing with the rest and tacking,                            
He staid with me a week before he was recuperated and pass’d north,                              
I tuck’d my trowser-ends in my boots and went and had a good time;                               
In the late afternoon choosing a safe spot to pass the night,                                    
And gave him a room that enter’d from my own, and gave him some coarse clean clothes,            
And brought water and fill’d a tub for his sweated body and bruis’d feet,                        
Wandering amazed at my own lightness and glee.

Up until now, we have been sampling by line to ease the understandability of the found poem, but what if we instead sampled by word? There is an app for that, so you can go through this same process, now sampling by word, with your favorite poem or song lyric. What do you notice about the poems here and the poems discovered using the app for the same Whitman poem? Want to make an easy dataset to work with like the one used here? Check out this poem parser tool. Share with us the poems you find, and remember each poem, song, and sample contains multitudes!

Stratified Sampling Poem

I harbor for good or bad, I permit to speak at every hazard,                                                                                 
You shall not look through my eyes either, nor take things from me,                                                                          
Nor any more youth or age than there is now,                                                                                                
Apart from the pulling and hauling stands what I am,                                                                                         
And I know that the spirit of God is the brother of my own,                                                                                  
Tenderly will I use you curling grass,                                                                                                       
I hasten to inform him or her it is just as lucky to die, and I know it.                                                                    
The hurrahs for popular favorites, the fury of rous’d mobs,                                                                                  
And roll head over heels and tangle my hair full of wisps.                                                                                   
On a bank lounged the trapper, he was drest mostly in skins, his luxuriant beard and curls protected his neck, he held his bride by the hand,
Dancing and laughing along the beach came the twenty-ninth bather,                                                                           
Blacksmiths with grimed and hairy chests environ the anvil,                                                                                  
And consider green and violet and the tufted crown intentional,                                                                              
The pert may suppose it meaningless, but I listening close,                                                                                  
The machinist rolls up his sleeves, the policeman travels his beat, the gate-keeper marks who pass,                                          
I resist any thing better than my own diversity,                                                                                             
If they are not yours as much as mine they are nothing, or next to nothing,                                                                  
I blow through my embouchures my loudest and gayest for them.                                                                                
This hour I tell things in confidence,                                                                                                       
I find no sweeter fat than sticks to my own bones.                                                                                           
Earth of the slumbering and liquid trees!                                                                                                    
Partaker of influx and efflux I, extoller of hate and conciliation,                                                                          
It alone is without flaw, it alone rounds and completes all,                                                                                 
I speak the pass-word primeval, I give the sign of democracy,                                                                                
I crowd your sleekest and best by simply looking toward you.                                                                                
I am cut by bitter and angry hail, I lose my breath,                                                                                         
I have instant conductors all over me whether I pass or stop,                                                                                
Deluding my confusion with the calm of the sunlight and pasture-fields,                                                                      
Rich showering rain, and recompense richer afterward.                                                                                        
The insignificant is as big to me as any,                                                                                                    
And the cow crunching with depress’d head surpasses any statue,                                                                             
Myself moving forward then and now and forever,                                                                                              
Approaching Manhattan up by the long-stretching island,                                                                                      
They were the glory of the race of rangers,                                                                                                 
One of the pumps has been shot away, it is generally thought we are sinking.                                                                 
Stretch’d and still lies the midnight,                                                                                                       
In at the conquer’d doors they crowd! I am possess’d!                                                                                        
I troop forth replenish’d with supreme power, one of an average unending procession,                                                         
They are wafted with the odor of his body or breath, they fly out of the glance of his eyes.                                                 
Spread your palms and lift the flaps of your pockets,                                                                                       
It is middling well as far as it goes—but is that all?                                                                                       
Whatever interests the rest interests me, politics, wars, markets, newspapers, schools,                                                      
I take my place among you as much as among any,                                                                                              
Now on this spot I stand with my robust soul.                                                                                                
He joins with his partners a group of superior circuit,                                                                                     
I know I have the best of time and space, and was never measured and never will be measured.                                                 
(It is you talking just as much as myself, I act as the tongue of you,                                                                       
And there is no object so soft but it makes a hub for the wheel’d universe,                                                                  
O suns—O grass of graves—O perpetual transfers and promotions,                                                                               
Perhaps I might tell more. Outlines! I plead for my brothers and sisters.                                                                    
Very well then I contradict myself,                                                                                                          
The last scud of day holds back for me.

Go back to the main text

Cluster Sampling Poem

I harbor for good or bad, I permit to speak at every hazard,                                                                                 
You shall not look through my eyes either, nor take things from me,                                                                          
Nor any more youth or age than there is now,                                                                                                
Apart from the pulling and hauling stands what I am,                                                                                         
And I know that the spirit of God is the brother of my own,                                                                                  
Tenderly will I use you curling grass,                                                                                                       
I hasten to inform him or her it is just as lucky to die, and I know it.                                                                    
The hurrahs for popular favorites, the fury of rous’d mobs,                                                                                  
And roll head over heels and tangle my hair full of wisps.                                                                                   
On a bank lounged the trapper, he was drest mostly in skins, his luxuriant beard and curls protected his neck, he held his bride by the hand,
Dancing and laughing along the beach came the twenty-ninth bather,                                                                           
Blacksmiths with grimed and hairy chests environ the anvil,                                                                                  
And consider green and violet and the tufted crown intentional,                                                                              
The pert may suppose it meaningless, but I listening close,                                                                                  
The machinist rolls up his sleeves, the policeman travels his beat, the gate-keeper marks who pass,                                          
I resist any thing better than my own diversity,                                                                                             
If they are not yours as much as mine they are nothing, or next to nothing,                                                                  
I blow through my embouchures my loudest and gayest for them.                                                                                
This hour I tell things in confidence,                                                                                                       
I find no sweeter fat than sticks to my own bones.                                                                                           
Earth of the slumbering and liquid trees!                                                                                                    
Partaker of influx and efflux I, extoller of hate and conciliation,                                                                          
It alone is without flaw, it alone rounds and completes all,                                                                                 
I speak the pass-word primeval, I give the sign of democracy,                                                                                
I crowd your sleekest and best by simply looking toward you.                                                                                
I am cut by bitter and angry hail, I lose my breath,                                                                                         
I have instant conductors all over me whether I pass or stop,                                                                                
Deluding my confusion with the calm of the sunlight and pasture-fields,                                                                      
Rich showering rain, and recompense richer afterward.                                                                                        
The insignificant is as big to me as any,                                                                                                    
And the cow crunching with depress’d head surpasses any statue,                                                                             
Myself moving forward then and now and forever,                                                                                              
Approaching Manhattan up by the long-stretching island,                                                                                      
They were the glory of the race of rangers,                                                                                                 
One of the pumps has been shot away, it is generally thought we are sinking.                                                                 
Stretch’d and still lies the midnight,                                                                                                       
In at the conquer’d doors they crowd! I am possess’d!                                                                                        
I troop forth replenish’d with supreme power, one of an average unending procession,                                                         
They are wafted with the odor of his body or breath, they fly out of the glance of his eyes.                                                 
Spread your palms and lift the flaps of your pockets,                                                                                       
It is middling well as far as it goes—but is that all?                                                                                       
Whatever interests the rest interests me, politics, wars, markets, newspapers, schools,                                                      
I take my place among you as much as among any,                                                                                              
Now on this spot I stand with my robust soul.                                                                                                
He joins with his partners a group of superior circuit,                                                                                     
I know I have the best of time and space, and was never measured and never will be measured.                                                 
(It is you talking just as much as myself, I act as the tongue of you,                                                                       
And there is no object so soft but it makes a hub for the wheel’d universe,                                                                  
O suns—O grass of graves—O perpetual transfers and promotions,                                                                               
Perhaps I might tell more. Outlines! I plead for my brothers and sisters.                                                                    
Very well then I contradict myself,                                                                                                          
The last scud of day holds back for me.

Go back to the main text

Leave a Reply

Your email address will not be published. Required fields are marked *

HTML tags are not allowed.

47,443 Spambots Blocked by Simple Comments