Date: Tue, 9 Feb 2010 19:33:14 -0600 (CST) From: Mark Jacobson To: 810-025-01-spring@uni.edu Subject: PI = 3.14159 and area of a circle and Monte Carlo snow day... ---------------------------------------------------------------- But the fact is, Greg, with the knowledge you've been given, you are now on the inside of what I like to call... "the Byrnes family circle of trust." I keep nothing from you, you keep nothing from me... and round and round we go. ---------------------------------------------------------------- Hi 025 students, Here is a review page of what we did today in class: http://www.cs.uni.edu/~jacobson/025/logo/PI/PIestimate.pdf Estimating PI and some of the Monte Carlo concepts and Excel skills that were demonstrated and talked about today (throwing darts) will be the task for Thursday's StudioIT 1 ITT 134 hands-on lab class. 1. Microsoft Excel and creating a simulation to see what might be the longest hitting your free throws or longest missing free throw shots streak would be for a basketball player who shoots: 70% free throw shot percentage (or 50% or 90%, etc) and shoots 200 free throw shots in their high school or college basketball career. 2. NetLogo used to throw turtles to random locations on the netlogo world of patches and checking to see how many of all the turtles are within a certain distance of the center PATCH, the (0,0) center of the world, to get an estimate of the AREA of the circle or to get an estimate of PI, which is 3.14159 as in the formula AREA = PI r squared or circumference = PI d, where d is the diameter of a circle. 3. Excel and Monte Carlo. Throwing darts instead of sending turtles to random patches. Was the dart inside or outside the circle? The Excel IF( ) function was used today to see if the "dart" landed inside the circle or not. =RAND() * 2 - 1 was the formula used to generate the horizontal (x) or generate the vertical (y) coordinate for the DART's (x,y) location, where it hit in the 2 by 2 square. The question to answer for each and for every dart: Is it inside the CIRCLE? That reminded me of the "Circle of Trust" and Greg Focker played by Ben Stiller along with Jack Byrnes, played by Robert De Niro, where Jack explains to Greg about the "CIRCLE OF TRUST" and whether he is inside that circle or outside of that circle of trust. Greg's future hopes for marriage to Pam Byrnes (played by Teri Polo) hang completely on whether he is in that CIRCLE! ---------------- From the movie "Meet the Parents" ---------------- - Morning, Greg. - Good morning. Pam told me she let you in on a little secret of mine last night. Yes, she did. Well, as long as you can keep your mouth shut for the rest of your life, you're in no immediate danger. I won't tell. I'm just being humorous. Huh. That was funny. But the fact is, Greg, with the knowledge you've been given, you are now on the inside of what I like to call... "the Byrnes family circle of trust." I keep nothing from you, you keep nothing from me... and round and round we go. Okay. Understood. Okay, good. Come on. Let's go inside and have breakfast. [Chatter, Laughter] <----- Next scene Jinxy cat, Jinxy cat where are you of the movie, I love you Greg trying to Jinxy. Jinxy. find the cat he accidently let out of the house. See you on Thursday in StudioIT 1 ITT 134. Hopefully, next assignment is ready and can be handed out that day. Mark http://www.cs.uni.edu/~jacobson/025/logo/PI/PIestimate.pdf http://www.cs.uni.edu/~jacobson/025/first5wks.html http://www.cs.uni.edu/~jacobson/025/