Nice story. Thanks Alain. cheers -ben On Thu, Feb 12, 2015 at 6:42 PM, Alain Busser <alain.bus...@gmail.com> wrote:
> It is in French so I try to translate some parts. My goal was to teach as > fast as possible the binomial distribution (number of successes when > independently repeating a Bernoulli experiment) to students who, either > have never seen an algorithm, or have seen some algorithmics in math > lessons and don't like it at all. Both categories loved what I did with > them. I precise that almost all of them are allergic to english language. > > The assignment was "throwing 10 dices, what is the probability of having > at least 2 times "6" around the 10 results?" > > The whole job is related here: > http://irem.univ-reunion.fr/IMG/pdf/binomiale.pdf (but I did only pages > 1-5 in one hour) > > The first step was to show how one can simulate the throwing of 10 dices. > I can do it without having to make a variable vary (explicitely at least), > thanks to Seymour Papert: > > 10 timesRepeat: [ Transcript show: (6 atRandom)]. > > Then I spoke about the usefulness of the Bag object when there are > statistics: Adding the 10 results (small integers) inside a Bag makes it an > object where one can see and count the 6es: > > | urn | > urn := #( ) asBag. > 10 timesRepeat: [ urn add: (6 atRandom)]. > Transcript show: urn. > > (Why "urn"? This is the word used by Bernoulli, he was thinking about > balls concealed inside a vase for which the latin word was "urna"; the > balls where called "billets" by Condorcet, so that they could instead be > pieces of paper; whatever they were, a vase was use to conceal them) > > Then there remains only one difficulty: How can I automatize the counting > of the 6es inside the bag? There is the most frightening challenge: Use a > block with students who have never seen Pharo before. Very good surprise: > They didn't seem to find this that difficult, I just had to say that > > 1. The pipe symbol means "such that" like in my lessons > 2. The first time I use the letter "x" I have to tell Pharo that it is yet > no variable to evaluate, hence the need to precede it with a colon. > > With that in mind, counting the 6es is the same as counting the x-es such > x equals 6: > > | urn | > urn := #( ) asBag. > 10 timesRepeat: [ urn add: (6 atRandom)]. > Transcript show: (urn count: [ :x | x=6]). > > Afterwards it remained only to repeat the whole experiment and, instead of > showing the number of 6es, adding it to another bag called "stats", then > displaying this bag. The end was made with a tool which exists only in > mathsOntologie: The displaying of a bar chart in a translucent Morph, so > that the most rapid of the students could compare several bar charts by > superposition and guess the shape of the distribution. > > Once again, they all loved it, either because they found Pharo a better > tool than whatever they knew before (and disliked), or because they knew > nothing similar before (one exception: A girl who never learned > algorithmics but just happens to love playing with a computer, here she is: > http://reunion.la1ere.fr/2014/06/04/miss-reunion-muriel-roger-candidate-ndeg-9-158293.html > ). > > I insist on the fact that they never saw anything like Smalltalk before, > and did not seem to "rtfm": Is it because Smalltalk is a natural language > or because MathsOntologie mimics the french language, I lack elements of > comparison to answer to this. But I insist also to say that these students > seem to dislike probability theory too. > > Finally, some stats about these stats: I can rapidly find the bugs when > the text appears in red, and most of the time a point was missing at the > end of a line, or a right bracket was missing or misplaced. Sometimes they > add a space inside a word like asBag which becomes "as Bag". > > Alain Busser > IREM La Réunion >