A great intro stats question for kids that I learned thanks to Ole Peters

Yesterday I saw a great introductory stats question thanks to a tweet from Ole Peters. The question is here:

In case it doesn’t come through in the tweet, here’s the problem:

You flip a fair coin 20 times. If this sequence contains at least one HHHH, I pay you $100. If it contains at least one HHHT, you pay me $100. If it contains neither, nobody wins.

The question, essentially, is this -> Would you like to play this game?

I introduced the game to my son and asked him what he thought:

So my son thought that the sequence HHHH would appear more than HHHT. Now we went to a short Mathematica program that I wrote to explore the game:

Next we talked about the surprise – HHHT was much more likely than HHHH, and more than 10x more likely to occur alone. The idea here was a little hard for him to see, but eventually he was able to figure out why HHHH was so unlikely to occur alone.

Finally, we went back to the whiteboard to talk through the details one more time. What I was trying to talk about here – and unfortunately not doing a great job of articulating – was:

(i) Why does HHHH occur alone so infrequently,
(ii) Why do the sequences HHHH and HHHT occur together so much, and
(iii) Why does HHHT occur alone much more frequently than HHHH?

I think this is an absolutely amazing introductory statistics problem for kids to think through. It is a really neat problem all by itself, but it also helps kids see that analyzing a time series of data – even a simple one – can be surprisingly subtle!

Advertisements

Follow up #2 to John Shonder’s US weather data visulaization

Two weeks ago I saw an amazing piece of work by John Shonder shared on Twitter:

I’ve already done two projects with the boys using Shonder’s ideas. The first was just walking through his code and showing him that the underlying ideas weren’t that complicated:

Using John Shonder’s Amazing US Temperature visualization wtih kids

At the end of that project I asked the boys for follow up ideas. My younger son (in 7th grade) thought it would be interesting to look at percent change rather than raw temperature change. We did that follow up yesterday:

Follow up #1 to John Shonder’s US temperature change visualizaiton

My older son (in 9th grade) thought it would be interesting to see if we could use the data to make predictions about future temperatures. We looked at that idea today.

Since an even cursory discussion of predictions is way more complicated than I’d like a 15 min talk with a 7th grader and an 9th grader to be, I decided to focus more on best fit curves rather than on actual predictions.

A funny side note to this discussion is that when I told my older son about this change he said – “That sounds pretty hard.” I told him not to worry, that there was a Mathematica command that does the fitting. His response was “of course there is” – ha ha.

So, we started today’s project by looking at plots of some of the county average temperature data. One thing I did here was have the boys estimate what a best fit line would look like by placing a ruler on the computer screen:

Next we used Mathematica to find the best fit line to the data and used Shonder’s code to do a county by county visualization of the slope of that best fit line.

Not too surprisingly, this visualization looked a lot like Shonder’s original one and the percent change one we looked at yesterday. The fact that all three of these visualization looked pretty similar led to a nice discussion about why that wasn’t so surprising:

Next we fit with a quadratic function rather than a line. As with the fit to the line, we looked a several counties first to get a feel for what was going on:

Finally, we did a county by county visualization of the x^2 coefficient of the quadratic polynomial. Here we got a visual that looked very different from the ones we’d seen before:

I’ve really enjoyed the discussions that we’ve had using Shonder’s project. It is amazing to me how Mathematica (and Shonder’s terrific code!) makes a pretty difficult data analysis project accessible to kids.

Follow up #1 to John Shonder’s US temperature change visualization

Last weekend we did a project inspired by this incredible data visualization project from John Shonder:

That project is here:

https://mikesmathpage.wordpress.com/2019/06/16/using-john-shonders-amazing-us-temperature-visualization-with-kids/

At the end of last week’s project I asked the boys to think of some follow up projects. My younger son thought it would be interesting to see the percent change in temperature rather than the absolute difference. We did that project today.

The boys have been hiking in the White Mountains for about a week and just got home last night. So, to start today’s project we took a quick look at last week’s project and talked about what changes we’d need to make to implement my younger son’s idea:

Off camera the boys looked up how to convert Fahrenheit to Kelvin so that we could talk about percent change. We started the second part of today’s project by looking at the code where Shonder takes the difference between 10 year averages and changing that code to compute the percent increase.

It is great that Shonder’s code is so accessible that we can make this simple change and spend time talking about math that is easily accessible to a 7th grader.

To finish, we took a careful look at the new visualization. For clarity, below the video are the pictures from last week and this week. I should have prepared both of these for the boys to see in the video, but even though I didn’t, their thoughts on the change are really interesting:

Here’s last week’s visual:

Screen Shot 2019-06-16 at 1.21.46 PM

And here’s this week’s – you have to look pretty carefully to see the differences, but I still think today’s project was worthwhile:

Screen Shot 2019-06-22 at 9.16.13 AM

Using John Shonder’s amazing US temperature visualization with kids

The videos in this project are a bit longer than what we normally do. Also the 2nd one is badly out of focus even though I didn’t do anything that I know of (!!) with the camera between any of the videos. Oh well, don’t let the length or the focus issues distract from Shonder’s amazing piece of work.

So, last week I saw a really neat tweet about a blog post on Wolfram’s site:

I started the project by showing the boys Shonder’s visual and asking them what they thought about it and what they noticed. At the end I showed them the raw data and we talked about some of the difficulties that come when you are dealing with a big data set:

Next we walked through Shonder’s blog post. I wanted to show the boys that although some of the code looks a little complicated, for the most part Shonder was dealing with ideas that were reasonably easy to understand. So, almost all of the steps and ideas in this presentation were things that were accessible to kids.

Next we stepped through the individual lines of code using our home version of Mathematica. Here we go pretty slowly and carefully through most of the code and discuss (and show) what each command does to the data. I hoped that this slow walk would help the kids see that although the pieces of the code might have looked a little intimidating, it was mostly pretty simple stuff. Happily, the boys seemed to understand almost all of the steps, which was really fun!

Finally, I asked each of the boys to think (off camera) of a follow up project that they thought we could do.

My younger son thought about making a graph showing the percent change in the average temperature. That led to a short discussion of how we’d measure that percent change, which was nice. This idea seems like one that we can implement pretty easily and should be accessible for a 7th grader.

My older son wondered if we could make a prediction about future temperatures. This idea is obviously quite a bit more difficult, but hopefully we can find a way to explore it. One thing that might be fun would be to take the first 50 years of data, use that for a prediction of the next 50 years, and then compare that prediction to what actually happened.

Anyway, we’ll think about how to explore both of the ideas in the next week:

I really had a lot of fun prepping for this project and talking about the ideas (and the implementation in Mathematica) with the boys today. It is really amazing to me that data analysis ideas like the one Shonder is sharing here can be made accessible to kids.

Using some temperature graphs from Deke Arndt to talk about probability distributions with kids

Via my friend Ed Adlerman, I saw some amazing temperature graphs made by Deke Arndt:

I thought these graphs could be used for a great introductory statistics talk for kids, so I decided to used them to talk about probability distributions today.

We started by looking a probability distributions in a relatively simple situation -> dice:

Next we moved to talking about a probability distribution in a more complicated situation -> a “Galton board”:

Now we moved on to discussing Arndt’s graphs. The conversation about these graphs went on for 11 minutes. As always it is fascinating to hear what kids see when they look at advanced math.

Here’s the first part of that 11 min discussion – here you’ll hear their initial observations and a bit about how to interpret the distributions on display here.

Here’s the second part of our conversation about the graphs. Here we talk about what all of these pictures are telling us about the temperature in Sydney during the last 60 years.

We wrap up by talking about whether or not they liked this presentation and different ways to present the data that would have been made the presentation harder to understand (I though this would be an easier question for kids than finding ways to make it better).

I think Arndt’s work here is amazing all by itself, but is also something that I think can be used really effectively to talk about probability and statistics with kids. Thanks to him for sharing this great work.

Sharing an e surprise with kids

Yesterday I saw a neat request from Sam Shah on twitter asking for ideas about how to “stumble upon” e with kids in Algebra 2 (other than compound interest). I shared an old project we did (and am doing again below) which I think is a terrific way to share a fun and surprising idea about e with kids.

Later in the thread, though, there was a tweet that surprised me:

Strogatz has done more math for the public that just about anyone, and he’s also taught a college course that shared beautiful and advanced ideas in math with students not intending to be math majors, so I was really caught off guard by his thoughts about e.

But rather than getting into an academic discussion about whether or not ideas about e can be shared with Algebra 2 students, I decided to revisit our old project with the boys today.

The idea we’ll take a look at today is this -> Take an NxN set of squares and place a random integer from 1 to N^2 in each of the squares. How many of the integers from 1 to $N^2$ do you expect to not appear in any of the boxes?

I introduced the idea with a 2×2 square and selecting random integers from 1 to 4 by rolling a 4-sided die:

Next we moved on to a 5×5 grid and talked about what we’d expect to happen:

Now we moved to a computer to help us look at the grids more quickly. In this video I explain the program using a few simple examples. The program itself is picking random numbers and counting how often each integer from 1 to N^2 appears in the list of numbers selected.

Although I struggled a little bit with the output of the program (the joy of filming these things live . . . ) we eventually found our way and the kids noticed some potentially interesting patterns in the number counts:

Now we moved up to some larger grids and the kids began to notice more and more patterns in the number counts – :

Finally, we looked at a few very large grids – starting with a 50×50 grid – and the boys began to notice the pattern emerging in the number counts that allowed you to take a guess at each number in the list. It was fun to see them begin to understand these patterns more and more throughout this project:

I guess I’ll conclude by saying that my view differs from Strogatz’s view. I think this project would be appropriate for Algebra 2 kids. It shows them a pretty advanced idea but also gives them a chance to explore that idea using things they’ve learned in K-12 math ranging from simple arithmetic, to a bit of geometry and algebra, and also elementary statistics. I’m happy that we were able to go through this project again today.

Sharing a great Random Walk program with kids

I saw a fun random walk program shared by Steven Strogatz yesterday:

Today I shared the program with the boys. It has 4 different types of random walks to explore. For each one I asked the boys what they thought would happen. At the end we looked at all 4 simultaneously.

Sorry that the starting videos are so blue – I didn’t notice that while we were filming (and didn’t do anything to fix it, so I don’t know why the last two vides are better . . . .)

Also, following publication, I learned the author of the program we were playing with:

Here’s the introduction and the first random walk – in the walk we study here, the steps are restricted to points on a triangular lattice:

In the next random walk, the steps were chosen from a 2d Gaussian distribution. It is interesting to hear what the boys thought would be different:

Now we studied a random walk where the steps all have the same length, but the direction of the steps was chosen at random:

The last one is a walk in which the steps are restricted to left/right/up/down. They think this walk will look very different than the prior ones:

Finally, we looked at the 4 walks on the screen at the same time. They were surprised at how similar they were to each other:

Definitely a fun project, and a really neat way for kids to explore some basic ideas (and surprises!) in random walks.