This is the third post is a small series of posts reflecting on my teaching in a new class (all teaching materials can be found here) introducing students to SAS and R on our MSc course. The two previous posts have so far just been a reflection on student's attitudes towards each piece of software.
In the first of those posts I said how I was slightly surprised at how students had chosen to use SAS for 1 particular question where they had the option of the language. In my opinion it was a problem much easier to tackle with R (all the course works, class tests etc can be found on this site). I also mentioned in that post how I asked students which language they preferred. Almost all students answered that it depends on the task (which is a great answer) but after pushing them for a particular decision a strong majority seemed to prefer R. I posted on G+ recently about a particular interaction I've had subsequently with a student which seemed to confirm this attitude of needing to find the correct tool for the correct job.
In the second post I described how students in their group presentations (asking them to teach me something I had not taught them) mostly evaluated SAS v R for certain tasks. It was great to see them identify strengths and weaknesses for each language.
This post is about their choices in their individual coursework.
Similar to their class test (which I discuss in the first post of this series) there was a question which allowed students to choose a language in this individual coursework component of the class (which can be found here).
In my opinion this question made use of quite a big data set (generated by some research I'm currently doing) and I thought it would probably be simpler to approach in SAS. About 52% of the class agreed with me whilst 48% seemed to still prefer R. First of all, I could be wrong and R could indeed be better suited for this question, secondly it might also be a reflection of the personal preferences that the students seemed to indicate when I asked: most students seemed to prefer R. If the latter is the case then I suppose it's nice to see that students not just realise that there's a better tool for a given job but also a better tool for a particular person doing a given job. I'll be keeping a track of this over the years and see how (if) it changes.
In my next post in this series I'll start to reflect on some of the teaching methodologies I used.
My name is Vince Knight and I'm a lecturer in Operational Research at Cardiff University with interests in game theory and queueing theory. I'll be using this blog to post about various things mainly including math and software... www.vincent-knight.com
Showing posts with label MSc. Show all posts
Showing posts with label MSc. Show all posts
Saturday, 8 June 2013
Saturday, 25 May 2013
Student choices between SAS and R in teaching presentations.
This is my second post in a series of posts (the first one is here) about a SAS/R course that I've recently finished teaching to MSc students at +Cardiff University.
I taught this course using a hybrid of flipped classrooms / IBL (although I'm cautious when using the term IBL as I'm not entirely sure my approach fits with any variation of Moore's methods). I gave students access to all the content of the class before hand (including notes, exercises and a series of screencasts - all the materials are here if they're of interest). The students were then given "challenges" and had to deliver their solutions to as presentations to the other students in the class. The aim of this was to get the students to teach themselves/each other and quite often I would not actually have to say much at all during a class (this allowed for a better use of 'me' by the students during the lab sessions).
(Here's a previous post about flipping the classroom and here's one about IBL)
In the previous post I described how students chose to use SAS and/or R in their class test. Most students chose SAS despite displaying a preference for R when asked.
The above is 1 of 3 assessments that the students have had to go through. This post is about the second assessment: a group presentation. In this presentation I asked students to teach an aspect of SAS or R that had not been covered in class (you can see the brief here).
I believe that this is a particularly important thing to assess as I in no way can pretend to teach them everything. It's important that they know how to learn new things that they might need in their career.
I was expecting groups to select a particular language and then a particular topic but interestingly most groups chose to look at both languages and compare strengths and merits.
I had 6 groups and here are the subjects that they looked at:
I'm planning on putting the code/slide up for these talks for them to serve as resources for students doing the course next year but I want to wait till I've marked their final piece of work and asked the students if they mind. In the mean time I'll repost this gif of the Mandelbrot set made by 1 of the groups (I thought this was cool!):

I taught this course using a hybrid of flipped classrooms / IBL (although I'm cautious when using the term IBL as I'm not entirely sure my approach fits with any variation of Moore's methods). I gave students access to all the content of the class before hand (including notes, exercises and a series of screencasts - all the materials are here if they're of interest). The students were then given "challenges" and had to deliver their solutions to as presentations to the other students in the class. The aim of this was to get the students to teach themselves/each other and quite often I would not actually have to say much at all during a class (this allowed for a better use of 'me' by the students during the lab sessions).
(Here's a previous post about flipping the classroom and here's one about IBL)
In the previous post I described how students chose to use SAS and/or R in their class test. Most students chose SAS despite displaying a preference for R when asked.
The above is 1 of 3 assessments that the students have had to go through. This post is about the second assessment: a group presentation. In this presentation I asked students to teach an aspect of SAS or R that had not been covered in class (you can see the brief here).
I believe that this is a particularly important thing to assess as I in no way can pretend to teach them everything. It's important that they know how to learn new things that they might need in their career.
I was expecting groups to select a particular language and then a particular topic but interestingly most groups chose to look at both languages and compare strengths and merits.
I had 6 groups and here are the subjects that they looked at:
- Time series forecasting: both in SAS and R;
- Principal component analysis: both in SAS and R;
- Random sampling: both in SAS and R;
- Survey sampling (in SAS) and the creating a gif of the Mandelbrot set (in R);
- Scorecard building in SAS;
- Mapping and spatial analysis: in R.
I'm planning on putting the code/slide up for these talks for them to serve as resources for students doing the course next year but I want to wait till I've marked their final piece of work and asked the students if they mind. In the mean time I'll repost this gif of the Mandelbrot set made by 1 of the groups (I thought this was cool!):

I still want to write generally about the teaching/learning methods in this class and will do that later but if it's of interest my PCUTL portfolio is available here and in there I describe and justify a lot of what I'm doing.
Wednesday, 10 April 2013
Two thirds of the average game
The two thirds of the average game is a great way of introducing game theory to students.
I've used this game on outreach events with +Paul Harper, at conferences with +Louise Orpin (when describing my outreach activities with other academics) and also in my classroom. I've blogged about the results before:
- School kids
- Postgraduate students
- OR 54 conference delegates
- MSc students (Note that one point of this post is to show better graphs than the ones on those posts)
The definition of the game from the wiki page is given here:
"In game theory, Guess 2/3 of the average is a game where several people guess what 2/3 of the average of their guesses will be, and where the numbers are restricted to the real numbers between 0 and 100, inclusive. The winner is the one closest to the 2/3 average."
I run this game once without any instruction. I just explain the rules and let them fill in the form in front of them (contained in this repo).
I then bring up slides discussing how iterated elimination of weakly dominated strategies leaves the "rational" strategy to be that everyone guesses 0.
After this I invite the participants to have a second guess. In general the results are pretty cool as you see the initial shift towards equilibrium. The fact that the winning guess in the second play of the game is in fact not 0 gives an opportunity to discuss irrational behaviour and also what would happen if we played again (and again...).
I've run this game a couple of times now and here's the graph of the histogram showing the results for all guesses I've recorded.
You certainly see that the guesses move after rationalising the strategies. Funnily enough though no one has guessed 100 during the first guess but a couple of people have in the second guess. I assume this is either some students trying to tell me that I'm boring them, trying to help a colleague win or I'm perhaps not doing a great job of explaining things :)
Here's some graphs from the individual events that I've collected data for:
- A talk I gave during a high school revision week:
- An outreach event with the MSI:
- MSc students from the 2012-2013 cohort:
- Academics at a talk on outreach at OR54 (the OR society annual conference):
- The OR society student conference SCOR2012:
- Academic at a talk on outreach at YOR18 (The OR society conference for early career academics):
Despite the low number of participants in some of the events they all show a a similar expected trend: the second guesses are lower. Surprisingly on one occasion the second winning guess was actually 1! This is a very quick move towards the theoretical equilibrium.
These experiments have been done on a much wider scale and in a much more rigorous way than my humble "bits of fun" for example the coursera game theory MOOC collect a bunch of data on this game and there's also a pretty big experiment mentioned in this talk:
Having said that I can't recall if other experiments look at successive guesses following an explanation of rational behaviour...
Github repo
I've put all the code used to analyse a game on github. It's a simple python file that can be pointed at a directory or a file and will produce the graph (using matplotlib) as well as spit out some other information. The data set for all these events (the first graph on this post) is also on there and if anyone would like to add to it please let me know :)
(There's also the handout that I use to get the student answers in the repo)
(If you found your way here because of interests in game theory this previous post of mine listing free OSS software for game theory might be of interest)
(If you found your way here because of interests in game theory this previous post of mine listing free OSS software for game theory might be of interest)
Labels:
Game Theory,
Git,
Github,
mathed,
matplotlib,
MSc,
OR54,
Outreach,
Python,
Teaching
Tuesday, 23 October 2012
Playing games with MSc students
This is the fourth post in a series of posts (see previous posts here, here and here).
I teach the first 4 weeks of the OR Methods module for our MSc in OR and Stats at Cardiff. One of the subjects I teach is game theory and this year I decided to introduce the subject through the use of the same games I've used in outreach events.
We had 31 participants. The first game we played was the 2/3rds of the average game. Here is the first set of guesses (before we discussed rationality and in essence solve the game together).
You can see that the guesses are pretty distributed across the range from 15 to 82. Three students did seem to notice that something was happening around 2/3rds of 100. The winning guess was 26, which is the highest winning first guess I've had so far.
After this we all went through the fact that 0 is the dominating strategy in this game (through iterated elimination of other all other strategies). Once this was rationalised we played again, here's the second set of guesses:
I teach the first 4 weeks of the OR Methods module for our MSc in OR and Stats at Cardiff. One of the subjects I teach is game theory and this year I decided to introduce the subject through the use of the same games I've used in outreach events.
We had 31 participants. The first game we played was the 2/3rds of the average game. Here is the first set of guesses (before we discussed rationality and in essence solve the game together).
You can see that the guesses are pretty distributed across the range from 15 to 82. Three students did seem to notice that something was happening around 2/3rds of 100. The winning guess was 26, which is the highest winning first guess I've had so far.
After this we all went through the fact that 0 is the dominating strategy in this game (through iterated elimination of other all other strategies). Once this was rationalised we played again, here's the second set of guesses:
A few weird things happened, for example someone actually guessed 100 (there was no one guessing a 100 before). I suppose this shows some confusion or perhaps someone was just trying to tell me that they thought this was boring (despite the fact that I used a box of chocolats as a participation bribe... :) ). Otherwise the results are as one would expect and the guesses seem to be clustering a bit towards 0. The winning guess was 10 this time around (3 students had to share the chocolats) which is actually a tie for the highest winning second guess I've had so far.
Here's a quick summary of the 4 games I've played so far:
- School kids (13 participants) - First Guess: 17 Second Guess: 2
- Postgraduate students (80 participants) - First Guess: 18 Second Guess: 10
- OR 54 Delegates (10 participants) - First Guess: 23 Second Guess: 3
- MSc 2012 Cohort (31 participants) - First Guess: 26 Second Guess: 10
After this we put the guesses up for everyone to see and discussed what we expect to happen if we played again (and again). I thought this went well and I've had some of the students say they enjoyed it. I certainly enjoy teaching game theory as it's very "easy" to make come alive. After the 2/3rds of the average game we played a prisoner's dilemma tournament but I won't go in to that here. Here are a few photos showing the students discussing strategies and (hopefully) having fun.
Subscribe to:
Posts (Atom)







