More probability and stats resource notes

I did not come up with a good worksheet last week. We did a lot of examples, but I didn’t do anything unified.

On the other hand, here are some interesting resources I drew on for examples of continuous random variables in Python.

  • PMF, PDF, and CDF basics using histograms here.
  • Some iPython notebooks from the Statistical Learning online course by Hastie and Tibshirani. Original code was in R.
  • Very pretty visualizations and plotting of distributions using the Seaborn package. I used a lot from this page in putting together my own iPython notebook.

This week was spring break so nothing new — only relaxation! I will have to make public some of the review material I’ve been working on, though, so that students can get another view on the material before class this week. A few more discussions and then another midterm… the semester races onward!

Why Python when I’ve been concentrating on Ruby for the last year? Popularity and the way Python’s developed so robustly into a data science tool with pandas/numpy/scipy. In particular, I want to do some time series analysis I’ll write about next week for another project and Python is just worlds ahead in time series. However, Ruby is developing on the stats and data visualization fronts too, and if I can schedule my time very well maybe I can play with some of that this weekend.

Putting the log in blog

We all remember, right, that blog came from weblog, which is a combination of the words “web” and “log”. Going back to the olden days of logs — records of what you’re doing — I’m going to muse about statistics for the moment. At the moment…

I just finished up some lecture note tweaking for my probability class. We’re going to look at exponential and Poisson distributions today, and normal and lognormal distributions. Despite loving Ruby more than Python I’m trying out some IPython notebook modeling of distributions for a nice way to visualize what’s going on. Python has a much different culture of documentation than Ruby and Rails, I must say, but that’s a different post. Back to the moment. I’d like to get students to work in class on some of these problems — not just doing problems, but doing problems, exploring connections, and working through proofs. I don’t have a computer-filled classroom so can’t do online activities. What would nice worksheets look like for this topic? We’ve been down this road before….. see earthcalculus.com!

Musing: primary goals for this class would include

  • comfort with manipulating the normal distribution
  • comfort with the relationship between normal and lognormal, and an understanding of why one comes from multiplicative effects and the other from summative effects
  • a grasp of the memoryless property of the exponential distribution

If I come up with a decent worksheet I’ll post it.

Personal salvation

It’s Lent in the majority of the Christian world. The season between Christmas and Easter is the mirror of the long academic slog between the beginning of the semester and Spring Break: the focus is not on joy but repentance. I read an article that shared pain brings people together and makes more effective teams: maybe my students will take heart in that.

But I’m writing in this blog that no one reads because I’m troubled by Lenten reflections. I found She Reads Truth, an organization that combines daily Bible reading with beautiful design. With each reading, a writer reflects on her life today and tries to apply and illuminate the text through the lens of Lent. I enjoy reading these: I like the little reflection on bigger things in the morning. But as I read Lamentations, I can only think of eastern Ukraine. Syria. Palestine, some days. Iraq.

11 All her people groan
    as they search for bread;
they barter their treasures for food
    to keep themselves alive.
“Look, Lord, and consider,
    for I am despised.”

People really are trading their treasures for food in these places and others. The scene of bombed-out desolation depicted is not some past memory for many of our contemporaries.

Listen, all you peoples;
    look on my suffering.
My young men and young women
    have gone into exile.

Due to my recent travels I think of the drug war in Michoacan. Severed heads along the road. Violence against teachers. I asked what young people do for work down there. “Go north.”

19 “I called to my allies
    but they betrayed me.
My priests and my elders
    perished in the city
while they searched for food
    to keep themselves alive.

And after all that — the vision of destruction, the news stories flashing past my eyes, the radio documentaries about starving grannies echoing in my ear — the call to repentance is to be a better person.

A better person?

We spend a lot of time on self-improvement. I love self-improvement! It’s fun, productive, challenging, interesting. But does it distract us from the greater task of improving our communities and our world?