Wednesday, November 21, 2012

Lesson Plan -- Homemade Pi

When I was teaching high school math, I would often take my classes to the computer lab so the students could use Excel (or an open source alternative) to apply some of the concepts they were covering. Here's an example that would be appropriate for 8th grade* and up. It employs the following skills and concepts:

Area of a circle


Area of a square 

Inscribed figures

The Pythagorean Theorem



Basic algebra

Basic computing

Monte Carlo techniques 

Start with the following 

The area of the circle is pi-r-squared.

The area of the square is 4pi-squared.

The proportion of the square that's shaded is (area of the circle)/(area of the square)

Do a little algebra and you get p = pi/4 or pi = 4p

If you picked points in the square at random, the number in the circle divided by total number would converge on p

Since the figure is symmetric along the vertical and horizontal axes, the shaded part of a quadrant should also be p.

Now pick a radius. I used   r = 3 here but make sure to mix it when assigning this project and use different radii (but not one -- you don't want a radius that equals its own square when presenting examples).

Have the students create x and y coordinates using 


Then use a conditional based on the Pythagorean Theorem that takes the value 1 if the point is in the circle.

Your estimate of pi is four times the average of that field.

As with all Monte Carlo based lessons, have the students start with a small sample and move up until they start getting reasonable answwers.

I realize this may seem like a bit much but remember:

1. These spreadsheet skills (functions, conditions, random number generators) should already be familiar to the students. 

2.  Kids have a way of surprising you (and sometimes in the good sense)

* Some people out there are probably saying this is too advanced for 8th graders. You know your kids best but I would encourage you to give it a try. They might surprise you.

1 comment: