This analysis suffers from a fairly clear confounder: since you are basing the data on which days you actually listened to music, there might be a common antecedent that both improves your mood and causes you to listen to music. As a silly example, maybe you love shopping for jeans, and clothing stores tend to play music, so your mood will, on average, be better on the days you hear music for this reason alone.
An intention-to-treat approach where you make the random booleans the explainatory variable would be better, as in less biased and suffer less from confounding. It would also give you less statistical power, but such is the cost of avoiding false conclusions. You may need to run the experiment for longer to counterbalance.
It appears that listening to music, in the short-term: [...] makes earworms play in my mind for slightly less of the time
Whenever I suffer from an earworm, my solution has for a long time been to just play and listen to that song once, sometimes twice. For some reason, this satisfies my brain and it drops it. Still counter-intuitive, but you might want to try it.
On a completely separate note:
Both response variables were queried by surprise, 0 to 23 times per day (median 6), constrained by convenience.
How was this accomplished, technically? I've long wanted to do similar things but never bothered to look up a good way of doing it.
For a while, I thought music was harmful, due largely to pervasive and arbitrary earworms. More recently, I started to find that earworms are ephemeral and lawful. A contrarian belief held like the former for years gets stuck as part of my identity, but maybe I should find the truth.
"Music is harmful" is hard to measure and verify. "Listening to music is harmful" is both easier to measure and more readily useful, for you can make a randomised controlled trial out of it.
Methods
Given that I deliberately listen to music only on rare occasion, it's easy, in my case, to let a column of random booleans in a spreadsheet dictate whether I listen to music each day. Sometimes I forgot to listen to music when the spreadsheet said I should, and sometimes I heard a lot of incidental music on days when the spreadsheet said I should abstain. To account for both cases, I kept a record of whether I actually did listen to music each day. Whether I actually listened to music is the explanatory variable, which ended up 50% correlated (phi coefficient) with whether the random boolean generator said I should.
The response variables are my mood — -1 to 1 — and the song stuck in my head — one of four categories:
Both response variables were queried by surprise, 0 to 23 times per day (median 6), constrained by convenience.
Analysis
I ran the experiment over 51 days. In all analysis here, I exclude three long intervals (11 days, 5 days, 4 days) of consecutive musical abstention due to outside constraints, leaving 31 days to examine.
Given these measurements, we can find the effects of listening to music by comparing the averages from days with music to those from days without music. It seems plausible that the effects of music lag or persist past the day of listening. Perhaps the better averages to compare would come from
What kind of harm do I expect to see from listening music?
Results
What does my data say about all that?
It appears that listening to music, in the short-term:
Result 1 makes sense, but deserved testing, just to be sure. Results 2 and 3 go against my intuition. I'm less sure what to make of result 4, especially given that it's harder to measure — judging an accidental earworm as "recent" depends on a threshold of recency, which I left ambiguous, and on my memory of what songs I've heard recently, which can mess up on occasion.
Intention-to-treat analysis
If I take the original random boolean in the spreadsheet as the explanatory variable, I get some slightly different results. I did this tabulation later, by suggestion of kqr, so here I have 36 days recorded, instead of 31.
Seen this way, the effect of listening to music on my mood is ambiguous, but listening to (intending to listen to) music still decreases how much of the time I get earworms, as well as how much time I get accidental earworms. Listening to music also decreases how much my accidental earworms follow songs I heard recently.