See you at the posterior line

Cartoonish figure of two cars at the start line of a racing track

An online racing game to teach Bayesian data analysis

Federica Zoe Ricci and Mine Dogucu (UC Irvine)

eCOTS 2024


Moving Forward with teaching Statistics and Data Science

  • Using data that is more relevant to students1

  • More use of fun2

  • More teaching Bayes3

Challenges of teaching Bayes

Diagram. A circle with the word 'Prior' in bold and a circle with the word 'Data' are both linked, with directed arrows, to a circle with the words 'Statistical inference (posterior)'

  • Priors 1

    • Where do they come from?

    • Is there one correct prior?

  • How can people use Bayesian analysis in real life? 1

We think that games can help with this

The Stat2Games project

Screenshot of stat2games website, showing a platform titled 'GRINNELL STATS GAMES Welcome to Stat2Games! Here you will find games that use stats to win.' with 13 different games visible. The Racer game is the one selected in this screenshot.

Kuiper, S., & Sturdivant, R. X. (2015). Using online game-based simulations to strengthen students’ understanding of practical statistical issues in real-world data analysis. The American Statistician, 69(4), 354-361.

George, T., Chakraborty, A., Kuiper, S. Improving students’ communication about data using online statistical games. USCOTS Workshop (2023)

Our Activity: Context

  • Introduction to Bayesian Data Analysis

  • 50 upper-level undergraduates

  • 50-minute discussion (lab)

  • Beta-Binomial model already taught in lecture

Icons of 50 different subjects drawn looking from behind their open laptops.

Our Activity: Setup

  • Teams of 4-5 students

Icons of 50 different subjects drawn looking from behind their open laptops. Gray boxes underlying groups of 5 students separate the different teams visually. Each team is sent an envelope by a mechanic.

Our Activity: Setup

  • Teams of 4-5 students

  • Letters from racing managers

Icons of 50 different subjects drawn looking from behind their open laptops. Gray boxes underlying groups of 5 students separate the different teams visually. Each team is sent an envelope by a mechanic.

Our Activity: Setup

  • Teams of 4-5 students

  • Letters from racing managers

    • Which of two tires for an upcoming race ?

Icons of 50 different subjects drawn looking from behind their open laptops. Gray boxes underlying groups of 5 students separate the different teams visually. Each team is sent an envelope by a mechanic. Below, two tires are displayed next to each other, separated by a question mark.

Our Activity: Setup

  • Teams of 4-5 students

  • Letters from racing managers

    • Which of two tires for an upcoming race ? e
    • Combine: engineers’ beliefs and racing results of team members

Icons of 50 different subjects drawn looking from behind their open laptops. Gray boxes underlying groups of 5 students separate the different teams visually. Each team is sent an envelope by a mechanic. Below, two tires are displayed next to each other, separated by a question mark. The icon of a finger points to them from the icon of a written letter plus the icon of a racing car.

Our Activity: Prior Information

Message reciting: Hi team! The race on the Eight track is approaching. This year we are going to race with the HotRod car, but we haven't finalized our choice of tires. We narrowed down the choice to the HotRod tires or the Tiny tires.
Last year, we raced with the HotRod car on a different track, the Straight track, and we were almost always faster with the Tiny tires. In fact, only 2 out of 10 times our racers finished the race faster with the HotRod tires.
Because this year the track is different, our engineers are not sure that racing with the Tiny tires would still be faster, as they might have less friction when turning. They believe it's not very likely that the HotRod tires would be faster less than 2 out of 10 times .. but that there is some chance it could actually happen up to 6 out of 10 times on the Eight track.
I would like you to collect some more data and give me some recommendations, based on what you find while playing but also based on our past experience and what our engineers believe.

Our Activity: Prior Information

Message reciting: Hi team! The race on the Eight track is approaching. This year we are going to race with the HotRod car, but we haven't finalized our choice of tires. We narrowed down the choice to the HotRod tires or the Tiny tires.
Last year, we raced with the HotRod car on a different track, the Straight track, and we were almost always faster with the Tiny tires. In fact, only 2 out of 10 times our racers finished the race faster with the HotRod tires.
Because this year the track is different, our engineers are not sure that racing with the Tiny tires would still be faster, as they might have less friction when turning. They believe it's not very likely that the HotRod tires would be faster less than 2 out of 10 times .. but that there is some chance it could actually happen up to 6 out of 10 times on the Eight track.
I would like you to collect some more data and give me some recommendations, based on what you find while playing but also based on our past experience and what our engineers believe.

Our Activity: Discussion Handout

Raw Quarto (template)

Rendered by one of the teams

Our Activity: Discussion Handout

Quarto file rendered by one of the teams

Our Activity: Learning Goals

  • practice using given information to formulate a prior distribution

  • apply the Beta-Binomial model to a fun and real-world application

  • observe that different priors for the same problem can be reasonable?

Our Activity: Setup

  • Teams receive different information based on their managers:

    • Team Danica
    • Team Lewis
    • Team Mario
  • Naturally motivates different priors

Icons of 50 different subjects drawn looking from behind their open laptops. Gray boxes underlying groups of 5 students separate the different teams visually. Each team is sent an envelope by one of three mechanics, and different mechanics correspond to differently colored envelopes  (blue, orange or yellow). Below, two tires are displayed next to each other, separated by a question mark. The icon of a finger points to them from the icon of one of three written letter (blue, orange or yellow) plus the icon of a racing car.

Our Activity: Prior Information

Figure showing three differently-colored letters, labeled 'Team Danica', 'Team Lewis' and 'Team Mario', communicating the same goal but differing prior information from engineers beliefs and past data.

Students’ perspectives

Remarks from 32 participants (open-ended questions)

22 students: Fun

17 students: Stats understanding

15 students: Interactive

14 students: Teamwork

9 students: Gamification

9 students: Data collection

> The racing game was very fun which make learning the concepts much more engaging than simply reading about a simulation in a book.

> Being able to use R and see how our race results impacted the posterior model had a positive impact on my learning.

> The activity was fun and helped me understand the process of making models.

> Helped us interact with other members of the class. Car game was fun.

Lessons we learned

18 students: Time

  • 50 minutes not enough to complete activity for all teams

  • Definitely not enough for class discussion

6 students: Seating arrangement in a row

  • can affect team discussion

Overall very promising

  • This activity really engaged students
    > I really liked it, if every discussion was like this I would have no problem going at 9:00am.

Material shared

All materials developed for the activity are available at github.com/federicazoe/bayes-games:

  • slides to guide the activity

  • discussion handout (.qmd)

  • racing team letters & more

See you at the posterior line

Cartoonish figure of three cars at the finish line of a racing track

Live eCOTS session

Tuesday, June 11th, 2:40 pm – 3:25 pm ET