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

My First Data Visualization Toy

I made a toy!

I made a fun little web app for visualizing some interesting things about sampling distributions and the standard error of a mean (pictured below). The app allows you to change parameters with the sliders on the left to see how sample size and standard deviation affect the standard error of a mean — and how sampling distributions of the mean approach normality as the number of samples drawn from a population increases.

You can play with it at this link (or click the picture): 

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

semAPP

I built this app in R

I’ve recently been enjoying learning about the possibilities that the free, open-source statistical computing and graphics language “R” offers. It’s an amazingly flexible platform for organizing, visualizing, and analyzing data. Working in R requires acquiring some fluency with basic programming language. However, there is an astounding amount of free learning resources available on the web in the form of websites, books, blogs, tutorials, etc. There are also great web-based courses (https://www.datacamp.com/) that often have free trials.

The program can be downloaded here:

https://www.r-project.org/

Many recommend also using R Studio, a platform to help organize workflow when using R. The free version of R-Studio is what I use, and I’m fairly sure it has all that most of the folks in music education would likely every need.

https://www.rstudio.com/

More to the point… …R Studio has an integrated web app builder called “shiny“. Shiny makes building data visualization tools and web-based dashboards for exploring data fairly straight-forward. The apps that are produced with shiny are built in roughly the same type of code that is used to run analyses and make plots in R in general.

https://www.rstudio.com/products/shiny/

Why R?

Music ed research folks may wonder why use R instead of say, SPSS, or another commercial statistical package? Well, that could probably be a rather lengthy discussion of pros and cons. However, here’s a short list of some simple things that R is nice for:

  • It’s free and open-source with an immense community of users and developers which keeps it well-documented and up-to-date, as well as relevant to the needs of contemporary analysts.
  • The R community is very helpful. You could google almost any kind of problem you may be having and would be likely to find a few forums where people offer solutions.
  • It’s modular such that there is a package or more than a few packages to do any kind of data wrangling or analyses or plotting you’d ever want to do. For example, there was a point when I would toggle back and forth between SPSS, Stata, and Lisrel depending on what sorts of analyses I was doing. Now I can do it all in R.
  • The graphing capabilities are very impressive. It’s fairly easy to get nice-looking, presentation and/or publication ready figures and you can customize any aspect of a graph.
  • Organizing the coding for analyses with code in scripts allows you to create a very clear reproducible record of all of the work you do to arrive at your results in any given project. This saves lots of time in the long run and is good scientific practice in general.

 

 

The IU JSOM Music and Mind Lab: A Year in Review

Last year included the first full academic year of Music and Mind Lab meetings and activities at the IU Jacobs School of Music. I thought I’d post a quick note about some of the fun and exciting things we were able to do together as we begin looking forward to another productive year.

IU - MusicAndMind-Banner.jpg

Some quick background (visit the MaML Website)

The lab was overseen last year by co-directors Pete MikszaFrank Diaz (Dept. of Music Education) and Daphne Tan (Dept. of Music Theory). Dr. Tan will be shifting to a role of “collaborator” this year as she transitions to a new position at the University of Toronto – she will be sorely missed! The student lab members include undergraduates and graduate students from a variety of disciplines and academic specializations: music education, music theory, musicology, music performance, cognitive science, psychological and brain sciences, and telecommunications. Our goal is to produce original research that will contribute to a general understanding of the role of music in the human condition.

Recent events

Guest speakers and presentations featured heavily in our activities this past year along with sessions devoted to faculty and students’ research interests. We were fortunate to have some truly brilliant people join us and share their research. Last year’s special topics and guests included the following:

  • Musical improvisation as a way of knowing
    • Andrew Goldman, Presidential Scholar in Society and Neuroscience, Columbia University
  • Working as a lab in the cognitive humanities
    • Fritz Breithaupt, Professor of Germanic Studies, Indiana University, Bloomington
  • Rhythm and movement
    • Justin London, Andrew W. Mellon Professor of Music, Cognitive Science, and the Humanities, Carleton College
  • Music, empathy, and cultural understanding
    • Eric Clarke, Heather Professor of Music; Professorial Fellow, Wadham College, University of Oxford, UK
  • Music, trauma, and the Polyvagal Theory
    • Jacek Kolack, Postdoctoral Research Fellow, Kinsey Institute, Indiana University, Bloomington
  • The neuroscience of musical skill learning
    • Anna Kalinovsky, Assistant Research Scientist, Gill Center for Bimolecular Science, Indiana University, Bloomington
    • Grigory Kalinovsky, Professor of Music (Violin), Jacobs School of Music, Indiana University, Bloomington

Ongoing projects

Although just getting started, our lab group has been quite productive in generating projects with interdisciplinary connections throughout IU and completing research that has found its way into the world as conference presentations and journal articles. Our most recent project involves a collaboration between Drs. Tan, Diaz, and I on the topic of musical communication. We are investigating the nature of expressive vocal performance. Broadly speaking, we are studying the ways singers prepare and produce performances to be evocative of specific emotive intentions. We are also interested in how inducing a mindful state will impact their singing and, ultimately, how these performances will be received by listeners. We’ve collected a good deal of data and are excited about the potential for this project going forward.

How students are involved

Students can participate as investigators or contributors. Investigators typically come to the lab with some prior experience in empirical research and are expected to co-design, propose, and lead projects. Contributors primarily serve support roles. They are expected to participate in weekly meetings and discussions, and help to manage projects and collect data. Through their participation, contributors can gain the experience necessary to be investigators in future projects.

Coda

All in all, I’m happy to say the Music and Mind Lab provides an exciting intellectual space for those at Indiana University who are curious about intersections between their musical and scientific interests. I’m hopeful that this group will continue to grow and look forward to a productive ’17-’18 school year!

Take some time to learn about the Jacobs School of Music if you’re interested in joining us.

Music & Mind Emblem CROPPED

A SNAAP-Shot of the Career Landscape for Music Educators

I’m excited to report that a recent study I worked on with doctoral student, Lauren Hime, has been featured by the National Association for Music Education on their association blog. We investigated the employment status, job satisfaction, and financial status of music education program alumni using data from a nation-wide, multi-institutional survey of collegiate music program alumni conducted by the Strategic National Arts Alumni Project (SNAAP).

The post highlights findings pertaining to (a) the time it takes to secure a position upon graduation, (b) job satisfaction, (c) whether music education alumni continue to perform while teaching, (d) the typical student loan debt incurred, and (e) reported salary ranges.

The blog post can be accessed at the link below:

A formal report of the research that is featured in the blog has been published in the journal, Arts Education Policy Review. The full report also includes data from alumni of music performance degrees and findings regarding all participants’ perceptions of their collegiate experience.

  • Miksza, P. & Hime, L. (2015). Undergraduate music program alumni’s career path, retrospective institutional satisfaction, and financial status. Arts Education Policy Review, 116, 176-188.

2016 IMEA Presentation

Hello!

Click below for slides from my presentation today at the Indiana Music Educator’s Professional Development Conference…

The science of music performance skill acquisition:
Planning, executing, and reflecting for achievement

Presentation slides

All the best,

Pete Miksza

Motivation: Growth, self-beliefs, and attributions, oh my…

This week I had the pleasure of giving an invited talk for the IU student chapter of the National Association of Teachers of Singing (IU SNATS). I’m fortunate to have the opportunity to work with extremely fine singers and committed vocal pedagogues on a regular basis in my courses and very much enjoyed speaking with the students of IU SNATS.

The talk I gave was on issues related to motivation for learning. I’ve attached a pdf of the powerpoint to this post via the image below. You’re welcome to download it to see the range of topics we discussed if you’re curious. The powerpoint also includes some basic texts and resources for reading about motivation in general and motivation in music learning more specifically. There is also a slide that includes links to some interesting web-resources for exploring these ideas further.

Miksza - Motivation presentation for IU SNATS - 2015

What was particularly enjoyable for me was that the talk gave me a chance to step back and think broadly about how several theoretical perspectives could be synthesized to address the components of music learning that are often heavily impacted by student motivation. The following set of reflective questions captures some of these components:

  • What drives you to choose to engage in learning in the first place?
  • What kinds of things contribute to the “degree” of energy you invest in this learning process?
  • What kinds of things contribute to the “degree” of quality and deliberateness you will apply to your learning process? In other words, the degree to which you’ll try to approach learning situations critically, thoughtfully, creatively, etc.
  • What will help you persist when you inevitably hit roadblocks and find yourself at a learning tableau or dipping into a negative attitude state?
  • What will stop you from giving up if learning gets tough?

I framed the main part of the discussion by describing how human needs for self-growth, flow, intrinsic satisfaction, and self-determination can lead people to seek out new experiences, work for mastery, and find personal meaning in their experiences. We also spent some time thinking about how social contexts created through teachers’ behaviors, studios/classrooms/rehearsal rooms, learning environments in general, etc. can serve to either support or thwart someone as they strive to satisfy these needs. The following points are a sample of what was addressed:

Contexts can be supportive or not…

  • Balancing the amount of structure/scaffolding provided and opportunities for independent work/decision making is important
  • Providing informational instruction (clues and ways to achieve objectives) vs. controlling rules (specific ways to do things) makes a difference
  • Giving opportunities to make choices vs. emphasizing interpersonal control in general is critical
  • Communicating evaluations as opportunities for improvement vs. as how something ‘should’ have been performed

We then moved through a cyclical set of motivational beliefs that have been shown to be related to learning in compelling ways. The powerpoint linked to this post includes summary points of some of the implications for pedagogy that each theoretical perspective suggests.

  • Mindset (Dweck)
    • Beliefs that abilities can be either fixed- or growth–oriented…
  • Self-efficacy (Bandura)
    • An individual’s beliefs in their own ability to produce an intended outcome on a specific task
  • Achievement goal orientations (Elliot)
    • The reasons why people aim to be competent and how they frame their own goals
  • Attributions (Weiner)
    • How the reasons people give for their successes and failures can impact their motivation and achievement in the future

We then ended the discussion by talking about some common motivational problems students experience and some general ideas for how to help them.

If a student’s needs are not met

  • The environment must feel like a safe place – physically and psychologically – this clearly has much larger ramifications for situations involving poverty, violent crime, discrimination, and/or harassment, etc.
  • Employ active approaches to help students develop positive feelings of competence and autonomy for the sake of esteem and self-determination
  • Employ active approaches to help students form productive relationships with each other
  • Provide preparation for students for how to interact with civility in a community
  • Employ active approaches to reducing the stressfulness of potentially competitive and high-stakes environment

If students are amotivated or lacking in apparent intrinsic motivation

  • Interventions can require altering the social context to help students integrate values of the environment to their own self
  • Make connections between activities and the students’ life goals and values
  • Make connections between activities and the values the students’ peer group recognize
  • Make connections to the values of the students’ significant others e.g., those they regard highly as role models
  • Provide opportunities for choice and for the student to feel in control of the environment
  • Give a secure foundation for building a sense of readiness – do not “throw into the fire”
  • Steer students away from performance-based goal orientations and towards mastery-oriented ideals (i.e., self-improvement)

If students demonstrate learned helplessness or self-handicapping

  • Vary goals according to individual students’ needs
  • Structure learning with an emphasis on short-term goals and develop them with the students
  • Provide frequent opportunity to acquire mastery and frequently document and display evidence of their growth (to them, not the class)
  • Teach students to avoid comparisons with others and encourage mastery goal orientations
  • Make it safe to ask for help by building it into the learning process as a required step
  • Do not over-assist and inadvertently communicate your belief in their lack of ability
  • Consider cooperative learning approaches