Exploring Markov chains and Martingales with kids

Earlier this week I saw a neat tweet from Greg Egan:

It reminded me of an old project we did back in 2017 using Markov chains and Martingales:

The Most Interesting Piece of Math I Learned in 2017 -> The COVFEFE Problem

The Martingale take on the COVFEFE problem (and the amazing ABRACADABRA problem) came from this paper:

Martingale’s and the ABRACADABRA problem by Di Ai

This week I was using some of the Markov chain ideas for a few fun projects with my older son who is studying linear algebra. Today I though it would be fun to revisit the COVFEFE problem and then look at some coin flipping examples inspired by Greg’s tweet.

We started with a brief discussion of the COVFEFE problem and then switched to coin flipping at the end. It took me a bit to get my brain going on this project – sorry for a few obvious mistakes at the beginning of the discussion . . . .

Next we went to the computer to look at the approach to the word typing / coin flipping problems via Markov chains. Instead of the COVFEFE problem, we are looking at the expected number of coin flips required to see the sequence HTHT. The ideas here and the code are things I learned from Nassim Taleb – see the references in the project linked above:

Next we returned to the whiteboard to talk about the Martingale approach to the problem. The ideas here are things that I learned from Christopher Long and also from the paper linked above.

Here we take a quick look at the COVFEFE problem, the ABRACADABRA problem, and see why the HTHT problem takes on average 20 flips.

Finally, we computed the expected number of flips required to see each of the 16 different combinations of 4 coin flip sequences -> HHHH, HHHT, HHTH, and etc. The calculation for all 16 cases took a little longer than I usually want one of these videos to run, but I wanted to do all of the cases to help the boys understand the ideas that go into the calculations:

A detailed discussion of the concepts of both Markov Chains and Martingales are above what anyone could reasonably expect a 10th grader and 8th grader to understand. But the ideas are so neat that I thought showing these fun examples would make a great project for kids.

Sharing Po-Shen Loh’s new idea about the quadratic formula with kids

Yesterday thanks to a tweet from Tina Cardone I saw a neat article about a new idea about the quodratic formula from Po-Shen Loh:

I thought it would be fun to see what the boys thought about this new idea. We haven’t looked at the quadratic formula in a long time – probably at least 2 years – so I started with a review of the ideas. I asked my younger son if he remembered the formula and then my older son was able to derive it using ideas about completing the square.

Next I wanted to show some ideas about the sum and product of roots of equations. Personally, these are some of my favorite ideas from algebra as they were my high school math teacher’s favorite ideas. But, again, we haven’t talked through these ideas in a while so I wanted to review the ideas about the sum and product of roots in a quadratic equation with the boys before they watched Po-Shen Loh’s video:

Next we watched Loh’s video that introduces his idea:

Having watched Loh’s video, I asked the boys to give me two ideas that they took away from that video. We then talked through the ideas with a relatively simple quadratic equation:

Finally, we solved a general quadratic equation using the ideas from Loh’s video – the general solution requires a fair amount of algebra, but really is a fascinating way to get to the general result!

I think this is a really neat approach to solving a quadratic equation. The ideas of sum and product of roots are neat ideas and were emphasized in the Algebra book from Art of Problem Solving that my kids learned from. It is fun to see those ideas coming up again in a slightly different context as my older son is studying eigenvalues and eignevectors in his linear algebra book now. Hopefully Loh’s ideas will help lots of kids see the quadratic formula in a new and interesting way!

What a kid learning trig can look like

My younger son is studying in Art of Problem Solving’s Precalculus book this year. Right now he’s looking at some of the trig problems in

(1) The first problem asks you to prove that the area of a triangle is A*B*C / 4R, where A, B, and C are the side lengths and R is the radius of the circumscribed circle:

(2) The second problem asks you to prove that in an acute angled triangle that:

b = c Cos(A) + a Cos(C), where a, b, and c are the side lengths of the triangle and A and C are the angles opposite sides a and c.

(3) The third problem is Tan(A/2) = r / (S – A), where A is the angle opposite side A, r is the radius of the inscribed circle, and S is half the perimeter of the triangle.

(4) The final problem is pretty difficult -> you are asked to prove this identity:

final problem

It takes 10 min for my son to work through this problem, including a couple of false starts. But he gets to the end, which made me really happy:

Revisiting The Cat in Numberland

Yesterday this tweet happened to appear in my feed:

Infinity

It reminded me of an old project on infinity that I’d done with the boys:

Talking about The Cat in Numberland”

Last night I had the boys read the book again and write down three things that they found interesting. This morning we talked through some of those ideas. I’d forgotten that my older son had an appointment this morning, so we were unexpectedly pressed for time. So, sorry if parts of this project feel a bit rushed – I think I panicked a bit more about the time than I should have.

Here’s what my younger son had to say about the book – he was interested in a few of the twists and turns that happened in Hilbert’s hotel:

My older son interpreted my instructions in a different way and came up with a few conjectures instead. In this video we talk about whether or not the complex numbers (with only integer coefficients) could fit inside of Hilbert’s hotel.

This was a pretty lucky break as my younger son had wondered about the rationals, which is essentially the same problem:

Finally, we discussed the real numbers and the boys both guessed that they wouldn’t fit in. At the end I showed them Cantor’s diagonal argument . . . just in time for my older son to head out!

Sharing the Eigenvectors from Eigenvalues paper with my son

Yesterday I saw a neat tweet from Natalie Wolchover:

I was excited about the result when I first read Wolcover’s original article, but even more excited about the new paper as, by incredibly lucky coincidence, I’m covering eigenvalues and eigenvectors with my older son right now!

The paper gives a simple example of the “eigenvectors from eigenvalues” formula using this matrix:

Tao

Yesterday I had my son compute the eigenvalues and eigenvectors for this matrix, which is a nice exercise for someone who learned about those ideas two days ago! Today we tried to use the formula from the paper.

We began by looking at the formula and discussing the 3×3 matrix:

Next I had him work through the standard calculation for one of the eigenvectors:

Before moving on to the final formula, we needed to get some eigenvalues for one of the special submatrices in the formula. Unfortunately we had a little calculation goof that took a minute to find, but we eventually got the right answers:

Finally, we worked through one example of calculating the value for a component of one of the eigenvectors. This part probably could have been done a bit better by us, but live math isn’t always perfect!

I think this new paper is an incredible lucky break for anyone teaching linear algebra now or in the future. It really isn’t that often that a new math paper has a result that is accessible to young students. It was really fun to share these ideas with my son tonight!

Sharing some of Nassim Taleb’s ideas about probability distributions with kids

Yesterday Nassim Taleb shared a short paper looking at the tails of various probability distributions.

The paper is not for kids – the math is advanced – but I thought there might be a way to connect some of Taleb’s ideas with the project that we did on the coupon collector problem yesterday. By coincidence, in that project we’d spent some time talking about maximum values in a bunch of repeated trials.

Here’s that project:

Sharing the coupon collector problem with kids

So, we started by talking about the distributions we saw in yesterday’s project – especially the distribution of the number of trials required to find all 5 coupons (or, maybe even more simply – the number of rolls required to see all 5 numbers on a 5-sided die).

Also in this video I’m trying to introduce the idea that Taleb was studying – can we say anything about the tail of a distribution having seen only 100, 200, or even 1,000 samples?

Now we moved to the computer and looked more carefully at our 100, 200, and 1000 sample trials versus a 1 million sample trial. The boys were able to see at a high level how the amount of unseen area in the tail declines roughly like 1/n where n is the number of trials. This was one of the results in Taleb’s paper that I thought they would be able to understand visually.

Now I switched to a distribution that you really can’t say much about even if you have millions of samples. The problem is the so-called “archer” problem that we’ve explored before:

Helping kids understand when the central limit theorem applies and when it doesn’t

First I introduced the problem and let my younger son notice that we were really studying the distribution of \tan( \theta ) since he’s learning trig now.

Finally, we returned to the computer to see the strange distributions that come from the archer problem. Even thought the boys had seen some of the ideas here before they were still surprised. Try to guess some of the numbers along with them as you watch the video!