## New tool for statistics students – the experiment lab!

This post is about a new tool that I’ve developed that allows students to play and create different versions of an online game.

The context – online game design (or…… How can we design an app to make us millions?)

I’ve embedded the online game within this post so you can have a go but you would send students to www.mathstatic.co.nz/experiment-lab or www.mathstatic.co.nz/experiment-lab/alphabet-challenge to play the game etc.

The basic idea behind developing these games is that you need to award points somehow, you need different levels of difficulty for the game and you need a way for the game to end ……. oh and you need to make it addictive! For this particular game, there is no points system and no way to move players up through levels. This (hopefully) gives a rich context to explore lots of statistics ideas 🙂

When thinking about how to use the game and the experiment lab in teaching statistics, a really important teacher understanding is that the data created from playing the game exists initially within an “experimenting world”, not a “sampling world”. So, unless you are going to use actual random samples from defined populations (e.g. a random sample of students from your school), then this game/data should not be used directly for teaching sample-to-population inference or for exploring sampling variation.

But you can definitely explore other sources of variation with this game, as well as important ideas around study design e.g. defining and measuring variables, carrying out an experiment etc. To get the “ball rolling” I’ll start with a few ideas, which are in no particular order and written as independent lessons/activities …………

How do you measure performance in the game?

The original version of the game only records the time to complete the game, so you could base your teaching around getting students to define or create other measures of performance. In the experiment lab, they can choose to measure other aspects of performance. Other measures could also be developed and measured by students e.g. how “stressed” a player felt during the game, whether they “rage quit” or not. If you do come up with other measures that you would like to add to the game, let me know and I’ll try to include them.

Here’s how I came up with the performance measures in the experiment lab…….

Originally I started with the time in seconds to “connect the dots” as the performance measure. I realised quickly that a second is actually quite a long time and that this was not accurate enough. Playing the game initially with the time measured to the nearest second could be used to do some teaching around measurement error e.g. if two players both get 4 seconds as the time recorded for completing the game, does this mean they both finished at exactly the same time? In the experiment lab, students have the option to round the time measurements to 0, 1, 2, or 3 decimal places.

As I played with different words I noticed that it took me longer to start the game when there were more letters to have search through to find the letter I needed, so I added a measure for how long it takes for the first click. I noticed as I was playing the game that often I missed the dot when trying to click it, so added the number of clicks as a measure. I also wanted to compare the number clicks to the number of letters to see how many times I missed, so I added the number of letters as a measure.

I was also interested in whether some games were easier/harder to play because the dots started/stayed closer together (the game randomly decides where to place the dots at the beginning of the game, more about this later….), so I added a measure for the distance between each click when a dot was hit (measured in pixels). I then noticed that in games when I was really struggling I was moving the mouse a lot around as I tried to “track” the dots, so I added a measure for the distance the mouse is moved during the game (measured in pixels).

In terms of the accuracy of the times recorded, there will be a very slight delay between the actual click and the time recorded, while the code behind the game does its calculations. I can’t notice the delay when I play, but it could be that for different devices the delay is longer (or shorter). The game plays on the “client side” so there is no need to consider internet speed or server load.

Here’s another version of the game that shows you all the current performance measures and with the time rounded to two decimal places – have a go!

Can you get better at the game?

The original version of the game will give each student a starting word for the game, randomly selected from a list of approved words. Get the students to play the game once and to write down the time. Then get them to play the game again with the same word and compare this time to their first time. Depending on the settings you have used, you might need to change the rounding of the time measurement for students to be able to see a difference (or incorporate this as part of the teaching – the need to measure time more accurately than seconds).

Get the students to keep playing the game with the same word so they can notice different kinds of variation: variation in their own times, potential decrease of times with practice, variation in how the game positions the letters of the word and how the letters move during the game. Then get the students to try out another word (click new word), again repeating the game with this new word multiple times. For example, here are my times for repeating the same word four times for four different words, represented on a line graph:

A reason why the “practice effect” is not very strong when playing this game is because even with the same word, each game is different because the starting positions and angles for each letter differ (assigned using a random process).  I’ve played the game many times, and generally my time decreases between the first and second attempts of the same word for shorter words, but then the time goes back up again for subsequent attempts. I haven’t noticed much of a difference for the longer words for the times to complete the game. The weak/non-existent practice effect for longer words is helpful for exploring paired comparison experimental designs.

Most games involve randomness in the game design, so the next question could be whether the game is fair if each game is different? Does the scoring system (if it existed) need to take into account how the letters were placed at the start of the game? Or does it all just balance out?

How can you make different levels of the game?

In the experiment lab, there are lots of ways to modify the game. If you think about a simple “comparison of two independent groups” design, then students can learn as much from two versions of the game that give “different” results than two versions that give “similar” results. I’ve played the game many times during its development and there are just so many comparisons to be explored, but here are a few ideas. Of course, everything else for the game would be kept the same (same word, same dot size, speed, same instructions etc.) except for the treatment described below:

• Word displayed in order vs reverse order
• No movement vs slow movement
• Bright red coloured background vs light grey coloured background
• One word vs another word

Some of these comparisons are also related to what you are measuring for the performance e.g. I wouldn’t expect to see much of a difference between the time to first click for words displayed in order vs reverse order. This is a good thing, as students should be justifying their selection of variables 🙂 Not all words will necessary suit the type of experiment they want to conduct, which they should learn from trying out the experiment on themselves first.

It is also possible to create very different versions of the games, but the player needs to be taken into account. For example, using small dots with the highest speed will lead to rage quit! [well, if there was a quit button – the stop button is all that is on offer!] We want the game to be addictive – challenging enough for players to keep interested but not so difficult that they just give up.

How can you award points for playing the game?

You could think about awarding points for the game in terms of rewarding good playing (skill) and punishing bad playing (no skill). This links to the earlier question about how to measure performance. To demonstrate bad playing, you could set up a version of the game so that the dots are not visible (using the same colour of the dots as the background colour and letter colour), so students have to guess where to click to select the correct dot. Give it a go below:

Did you give up? It took me 84 clicks 🙂 Clearly skill is involved when you play the game and “random” clicking is probably not going to help you click the correct dot faster. So it could be that the points are initially awarded based on the time to complete the game, but points are then taken off for extra clicks. To award points based on the time to complete the game needs a way to “baseline” the game to take into account different words. So the students will need to explore relationships between the performance measures e.g. the number of letters of the word vs the time to complete the activity.

Also, if two performance measures appear to have a relationship, than it might not make sense to use both variables to determine points (e.g. time to first click and time to complete the game).  Each player brings their own level of skill and practice with the game, but can we use two of the performance measures to find out more about how people play the game? I think there are a lot of good reasons to explore the relationships between the performance measures…..

More about the game…..

This is the first stage of an online game I’m developing, built off code from this website with my own additions and improvements. There are lots of similar games out there involving balls – here are just a couple:

If you (or your students) are interested in the design of the game itself, just look at the page source of this page to see the code. There is a fair bit of logic and mathematics involved (e.g. trigonometry, co-ordinate geometry, measurement). I’ve set the words used for the game to a fixed “approved” list so students can’t create games with dodgy words, even if they try to hack the link used to access a different version of the game 🙂

Resources

Experiment lab for students on mathstatic.co.nz

Alphabet challenge on mathstatic.co.nz

Link to just the game with default settings

## Writing report comments ….. using a little bit of statistics :-)

This is a post about my new tool to help write report comments for statistics (and mathematics) students. You can find it under the new “Tools” menu, but you might want to read the stuff below first to find out how it works 🙂

A very brief history of my approach to writing report comments….

A good friend of mine (also a teacher) once commented that I spent more time thinking and creating tools to write report comments than the actual time it would take to just write them by hand. I did write my report comments “by hand” for the first couple of years of teaching, but then I realised that, while every student is different, I wasn’t necessarily using completely different comments about each student. There was a structure to what I was writing and some key things I was commenting on regarding what the student was doing (or not doing) in terms of their learning. So a started developing tools to help me (and others) write report comments.

Developing the new reporting writing tool…

My goal with this new version of the report writing tool was to make the process more natural and for comments to be “suggested” in the writing process (rather than using drop-down boxes), similar to how Google suggests search terms for you as you type. For this suggestion process to work well, I had to analyse all the comments I had used before to identify words that were useful at identifying comments and words that were not. For example, I found that most words less than four letters long were not that useful at selecting useful comments, and words like “have”, “take” etc. also were not useful at presenting reasonable options for comments. I ran some of my previously written comments through some text analysis tools to check out aspects such as readability and word length.

Want to see it in action?

I’ve made this video to explain how to use the tool because I think it’s easier this way 🙂

Or just try it out for yourself here

## How long does it take a student to submit a swear word into a text analysis tool?

Update on the predictive text challenge

I haven’t heard anything from anyone with any problems, and there seems to be a bit of traffic to the challenge page, so hopefully this is going well. I’ll allow checking of the first list of reserved words tomorrow. Students should put in what they predict the readability score will be for each word. These predicted scores will be checked against the actual readability scores and students will be given an overall result e.g. 85%. Oh, and just because you’re a teacher too you’ll get this idea for an investigative question/problem……. How long does it take a student to submit a swear word into a text analysis tool?

Related “reading themed” statistical investigation ideas

Check out http://josephrocca.com/randomsentence/ where you can generate “random” sentences from books that are no longer under U.S.A. copyright restrictions – so books generally published before the early 20th century. You could compare the process for random sampling sentences from digital books to processes for random sampling sentences from physical books (so much here with different sampling methods). You could give students an actual physical book and challenge them to estimate the total word count (check using the digital version!), or get students to devise a way to compare the “readability” of two books, or….?

So what was so surprising?

Recap: I got 10 dominoes from a supermarket recently and was surprised to find that all 10 were different (there are 50 different dominoes to collect). Ok, so on the face of it this may look like a familiar (and not super awesome) starter. Collecting cereal cards, ice block sticks, seed packets…….. But I was surprised to see this because I was thinking that a random process like this would mean I should expect to see at least one double up e.g. like seeing runs of heads when you flip a coin. When I thought about it more, I realised I wasn’t taking into account there were 50 dominoes – this makes a difference.

More about SOLO

SOLO stands for the Structure of the Observed Learning Outcomes. It’s a model/taxonomy for defining different levels of understanding or thinking and was developed by J. Biggs and K. Collis in 1982. I’ve been using SOLO in my teaching of statistics since around 2006 and think it’s awesome. It fits so well with building conceptual understandings of statistics rather than just procedural ones. I use SOLO in (at least) two ways: (1) to structure good questions for students to use when working with data, questions to make them think at different levels and (2) to plan my teaching of a topic e.g. what are the key ideas (not skills)?

The prices increased from Jan to Feb and then decreased from Mar to May and then increased again…..

I think I like this answer on Quora re how to explain over-fitting of models. Some of the language is a bit off – I think if you swap the word “hypothesis” for “model” and remove “experiments” and replace with “observations” it reads better. But I like the idea of how to explain to students that a model is not about getting a perfect fit to the observed data and that simpler can be better (e.g. go for the minimum number of trend lines as possible that tell the general story of what is happening……).

## Probability teaching ideas using simulation

This post provides some teaching examples for using an online probability simulation tool. It’s a supplement to the workshop I offered for the NZAMT 2015 conference.

Probability simulation tool

I recently developed  a very basic online probability simulation tool . I wanted a simulation tool that would run online without using applets or flash (tablet compatible). I also wanted to be able to animate repeated simulations in a loop – in the past to get this effect, I had to either make animated GIFs or set up slides in Powerpoint to transition automatically. I did a quick search for online simulation tools and couldn’t find what I wanted so I adapted some code I had written previously to get what I wanted.

An example of an animated looped simulation from the probability simulation tool

It’s very much designed “fit for a specific purpose” (more about that in the part 2) so I know it has lots of limitations 🙂 But what I like about the feature being demonstrated above is that it will keep running automatically, freeing me up to ask the students questions about what they are seeing and why they are seeing this.

Small samples – lots of variation

One of the activities I presented in the workshop involved teachers trying to work out who my siblings were based on photos. I presented five sets of four photos. Within each set, one photo was of one of my siblings, the rest were photos of other non-related people. In the workshop there around 30 teachers present.  The basic idea (with lots of assumptions) is that distribution for the number of correct selections IF teachers were guessing can be modelled by a binomial distribution with n = 5 and p = 0.25.

After “marking” the teachers selections of my siblings, I created a dot plot of the 30 individual results. One of the questions put to the teachers at the workshop was “Do these results look like what we’d see if each of you was guessing which person was my sibling?”‘

To build up a simulated distribution based on guessing, each teacher then used five different hands-on simulations to make new sibling selections for each set of photos (see the resources link at the end of this post). I then created another dot plot from these simulated selections and asked teachers to compare the features of the two plots e.g. centre, spread, shape, unusual.

For this workshop, the two distributions actually came out to look pretty similar. But this won’t necessary happen. To demonstrate the amount of variation between repeated simulations (of 30 students guessing across five sets of possible siblings), I set up the probability simulation tool with the options shown in the screen grab below:

So that the axis does not resize for each simulation, I fixed the axis between 0 and 5. To stop the dots from automatically resizing, I fixed the dot size to the smallest option. I then pressed “Start animation” and let the simulations run over and over again. This gives the following animation:

This animation could then be used to ask questions like:

• “What would be an unlikely number of correct siblings if someone was guessing?”
• “How many correct siblings would you expect to see if someone was guessing – between where and where?”
• “What looks similar for each animation?”- “What looks different?”
• “What variation are we seeing?” – “Why are we seeing it?”
• “What does one dot on the graph represent?”
• “How is the simulated data being generated?”

Want to read/see more?

Wild, C. Animations of sampling variation

Wild, C. VIT – Visual inference tools

NZ Senior secondary guide – Lateness: Choice or chance

Resources

Workshop materials – stimulating simulations NZAMT 2015

Online probability simulation tool

## Statistics lesson starter: Is this really surprising?

A supermarket is running a promotion. For every \$20 you spend, you will receive one domino. There are 50 dominoes to collect. I received 10 dominoes for my last shop and was surprised to find that all 10 dominoes were different. Should I have been surprised? Explain 🙂

Update after some more shopping…

## Exploring statistical measures by estimating the ages of famous people

This lesson focuses on developing student understanding of statistical measures. It is a re-working of a workshop I offered for the NZAMT 2009 conference. This lesson is awesome because students drive the development of a measure for determining the best “age estimator”.

I was introduced to the activity when I was at teachers’ college, and have used it in my teaching pretty much every year since then in some way or another. I adapted it to focus on creating a variety of measures (not just the standard deviation) during some early work on the SOLO taxonomy, as a way of demonstrating progressions in thinking.

Download PDF of activity notes

## Statistics teaching ideas based on ….. the alphabet!

This post focuses on randomness, simulations and probability.

10 quick ideas……

1. Choose five letters (e.g. A, B, D, N, U) and display these together. For the rest of these ideas to work, choose letters that can go together to make three letter words (avoid certain words!). Ask students to randomly select one of the letters and write this down.
2. Ask students to share honestly how they selected their letter – you should find they do use a reason e.g. the first letter of their name, or they choose the one they think no one else will select. Discuss the difference between selecting something and randomly selecting something, and get students to come up with examples for each e.g. selecting which lolly to eat based on which one you like vs putting your hand into a bag and choosing a lolly without looking.
3. You could discuss more how humans are not that great at generating or accepting randomness. There are some great youtube videosand websites with ideas for activities to explore this. A nice example is this decision by Spotify to change their algorithm for shuffling songs – their article includes some nice visualisations to support their discussion. You could also explore how the word or concept of random is used in everyday language, or in particular, in design (like my example below).
4. Display the class results as a dot plot (with the letters along the horizontal axis). So what are we looking for in the plot? Ask the students – are these results what you expect? Some students may discuss expecting to see an equal number of selections for the five letters, others may expect to see uneven results because “it’s random”, others may have other ideas based on not trusting that other students selected their letters randomly. Try to get as much out of your students as possible so you know what they are thinking 🙂
5. We can’t use the results to prove that students selected their letters randomly or not, but we can see if the results look like what we’d get if a random process was used. Students may not know what they are looking for, and for small samples like a class, we actually expect quite a bit of variation. Use a simulation tool like this one to simulate randomly selecting n letters with replacement from the five letters you used (n being the size of your class). Discuss with the class whether their results look similar or different to the simulated results.
6. Make five large cards with each of the five letters on them. Select three students from the class (randomly or not!) and use a shuffling process to allocate each student one of the five cards. Get your students to stand in a line facing the class with their letters hidden. Ask the class how likely they think it is that when the three letters are shown that the three letters will make a word. Then get the students one by one from left to right reveal their letters.
7. Get students to generate three letter “words” by randomly selecting three letters without replacementfrom the five letters you used (they could work in groups with their own set of five cards). This will require students to decide if a word is real or not. If you want to help students spot correct words,  you could do a round of “Bogggle” and get the class to create as many valid three letter words as possible from the five letters without repeating letters. Depending on previous learning, you may need to discuss the concept of probability estimates (AKA experimental probability), before getting students to generate 20 “words” (or more if you like!), counting how many of these “words” were real, and determining an estimate for the probability.
8. Discuss how a simulation could be set up using a computer to run thousands of trials to check randomly created words from the five letters against a list of three letter words that are “real” to determine a closer estimate of the model probability (AKA theoretical probability). This process of checking words against a list of “true words”could be compared to processes around checking whether an email address submitted to an online signup form is “real” or not. We need keep linking what we do in the classroom with the real world 🙂
9. You could explore the model probability by considering the total number of “words” that could be created by randomly selecting three letters from the five without replacement (e.g. 5 x 4 x 3 = 60) and the total number of real words found by systematically trying out all permutations or by using a Scrabble tool like this one (e.g. for my five letters it’s eleven real words).
10. You could finish by looking at the “Infinite Monkey Theorem“. This will require a bit more of a theoretical focus and understanding of complementary events and the usefulness of finding P(X = 0) when you need to find P(X ≥ 1). This kind of thinking can be referred to whenever a new animal is found to be awesome at predicting the results of sports games e.g. Paul the OctopusRichie McCow

Want to read more?

Kaplan et al. (2014) Exploiting lexical ambiguity to help students understand the meaning of random

Resources

TWIG resources for infinite monkey theorem