#### alice in summerland

learning and teaching math in alice## 3-woman wolf pack

I am no longer a one-woman wolf pack.

Professor Rodger added two new girls to the Alice project wolf pack today: Peggy Li and Chitra Gadwal. I met Peggy in the morning in the office, and I learned that she is from Maryland, also a rising sophomore at Duke, and she is majoring in economics and computer science. A few hours later the two of us and Professor Rodger drove to the airport to pick up Chitra, who had just flown in from Maryland. Chitra goes to the University of Maryland, Baltimore County, and is also a rising sophomore and computer science major. The four of us had a delicious sitar lunch, where we got more acquainted with one another. German last time, Indian this time–my food tastes are definitely expanding! Also, both of the girls are really excited about the project, and it’s nice to have people to work with now!

After showing Peggy a few of my programs, I realized that a few of them definitely needed some tweaks, so I spent some time correcting them (especially the permutation program where I had inserted a visual array that completely messed up the spacing since I hadn’t integrated the structure into my code). I then moved onto the multiplication table program, which still has a problem when I try to reshuffle the 3D object numbers and actual numbers simultaneously. Still can’t seem to figure it out, but hopefully I’ll figure it out soon.

I read an interesting paper called “‘Computer Science and Nursery Rhymes’: A Learning Path for the Middle School”, which I discuss on my Papers page.

I also skimmed through the Pre-Algebra book and was happy to find a bunch of sections in probability (my favorite!) in the book, so I decided to work on a program involving some of those concepts, one that would be easier than the Craps game that would just be way too difficult for the youngins to learn. I started a program that teaches probability in terms of the classic example of choosing red and blue balls from two boxes. The player can choose whether he wants balls to be chosen in a stratified random sample (each *box* has an equal probability of selection, and then each ball *in that box* has an equal probability of selection) or a simple random sample (each *ball* has an equal probability of selection–the boxes are irrelevant in this case).

So today I worked out the case of a stratified random sample, where the box matters, and it worked out pretty smoothly. I have two boxes, where the first box has 5 red balls and 5 blue balls and the second box has 10 red balls and 5 blue balls. The user chooses how many balls they want to see randomly chosen, and then the balls that are chosen are moved to the top into what is essentially a horizontal bar graph, which the two bars counting the red and blue balls. The only problem I ran into was when I used visible arrays (though I set isShowing to false) to hold the balls. The balls seem to be too big for the spaces in the array so the array elongates past the edge of the screen. I’ll fix this tomorrow by either making the balls smaller, deleting some balls so they can fit on a smaller array, or some other solution that I think of, and then I’ll work out the case for a simple random sample. Although not as much of a game as some of my other programs, I think that this is a good visualization of sampling! In the tutorial I will have the programmer enter the probabilities associated with choosing each box and ball (still need to work on incorporating the ball probabilities without having to make the program inefficient), which, again, requires the programmer to learn math as he is coding, the goal of this summer.

## Leave a Reply