Visualizing oneway ANOVA

I spent a little while over this winter break expanding upon how I might use Shiny to help demonstrate and familiarize students with statistical concepts in music education research methods courses. In general, it seems to me that clear explanations are needed, practice examples are good, but “live” manipulable demos are really, really great.

I built an app that allows students to visualize and manipulate a hypothetical experimental scenario so that they can see how the oneway ANOVA procedure partitions variation into “group (i.e., model)” and “residual” sources or more colloquially, “between” and “within” group sources. The plot at the top shows stripcharts of three groups of hypothetical experimental participants in blue, and a single stripchart of all of the hypothetical participants at once in red. Below the strip chart are controls for manipulating the data.

Students can play with the means of three groups and watch the between sums of squares go up and down. When students manipulate the standard deviations of the groups, they’ll see the within sums of squares go up and down. The numbers corresponding to the between, within, and total sums of squares appear reactively in the sub-title of the plot on top.

Below the controls are (a) a corresponding ANOVA table that updates reactively with each change the student makes and (b) a density plot to depict the overlap among the groups a bit more clearly.

This app is similar in design to “this ANOVA handout” I use in my courses.

Click this link or the image below to access the app:

https://petemiksza.shinyapps.io/Visualizing_oneway_ANOVA/

http://js-170-95.jetstream-cloud.org:3838/oneway_ANOVA/

Let me know what you think if you have a moment or have any suggestions if you’d like to use this or something like it and I can be of help.

 

PS…

I’ve updated the previous “standard error of the mean” app I built to be cleaner and easier to use (see the previous post)

Advertisements

 Vince Guaraldi’s Music from “A Charlie Brown Christmas”

A Festive Analysis

It’s the holiday season and catchy tunes are in the air! Vince Guaraldi’s score to A Charlie Brown Christmas stands out even among the many, many traditional favorites that appear on the radio these months.

Offered here is an analysis of the tracks from this album using the data provided by Spotify and the R package “spotifyR”. The variables that are involved in the analyses are labeled and described as follows (more info can be found by clicking here: Spotify Developer Page

  • “danceability”
    • How suitable the track is for dancing, based on tempo, rhythmic stability, beat strength, and regularity
  • “track popularity”
    • An accounting of how often the tracks are played (updated relatively often)
  • “tempo”
    • Estimated tempo in beats per minute (BPM)
  • “energy”
    • Perceptual measure of intensity and activity
  • “valence”
    • Degree of musical “positiveness” conveyed by a track

CBKableDataSummary

But Can You Dance To It?

The Peanuts kids dance a bit in the show, but what does spotify think about it?

CBdanceability

Are the Tunes You Can Dance To More Popular?

Do people listen to the songs that are easier to dance to more than they do those that are harder to dance to?

CBprediction

What are the Emotional Signatures of the Tunes?

How do these tunes match up with common indicators of musical affect, valence (e.g., the degree of positiveness or negativeness present) and arousal (e.g., the amount of energy present)?

CBcircumplex