Friday, April 28, 2017

LiveCode - Create a Simple Probability App for Mathematics

A few months back I finished reading the latest book by Michael Lewis titled, The Undoing Project. It was fascinating story about two psychologists from the last century. A great part of the book is about how people make decisions and how susceptible we are to making decisions on bogus assumptions.  Once section of the book was talking about probability and that got me thinking about using coding to get students to think about things such as the "Belief in the Law of Small Numbers," etc.

So I quickly coded up a little application with LiveCode ( LiveCode comes in a free OpenSource version, so it is great to use with students and schools.  The little application is just a virtual flipping of a coin to demonstrate what happens in terms of percentages when a person flips a coin and the outcome of whether it will be heads or tails. The little app is very basic and can be used to foster discussions about coding, probability, and can be used to generate data that can be tracked as the number of times the coin is (virtually) flipped.

You will need LiveCode to open the app project and here is the link to the little app, Coin Flipping App.

 All the code for the app is in the "Flip Coin" button. The other objects can be dragged out for the tools palette and named accordingly.

No comments: