Did you consider withdrawal effects at all? A day without caffeine having used it the previous few days is going to be very different from one where you haven't used caffeine in months.
That's a good point. I have, but shelved them for sometime later™. If it were true that withdrawal effects are important, you'd expect the difference in placebo-caffeine scores to drop as the experiment progresses, but I haven't checked yet.
you'd expect the difference in placebo-caffeine scores to drop
I am not sure about this. I could also imagine that the difference remains similar, but instead the baseline for concentration etc. shifts downwards such that caffeine-days are only as good as the old baseline and placebo-days are worse than the old baseline.
I'm surprised you were only able to predict whether you'd taken caffeine 80% of the time. 200 mg is not a heroic dose, but on little to no tolerance it should be quite noticeable.
Blinding is powerful! Not sure where you get 80% from, do you mean the number of times when I was directionally right in the prediction?
I think they mean that beforehand you said "My prediction about the content of the pill is more accurate than random guesses80%" - meaning that you were 80% sure you would do better than a 50/50 guess of what type of pill it was throughout the trial. Then you found that you did indeed do better than 50/50, but didn't give a number and I think sludgepuddle thought you had guessed right 80% of the time.
Ah, I see. In the table is the log score of my pill predictions (-0.6). I made predictions about the accuracy of my predictions—confusing perhaps.
log score of my pill predictions (-0.6)
If did not make a mistake, this score could be achieved by e.g. giving ~55% probabilities and being correct every time or by always giving 70% probabilities and being right ~69 % of the time.
I am especially interested in testing many different substances for their effect on meditation, while avoiding negative side effects. The benefits from high meditational attainments valuable to me, and seem especially likely to benefit from chemical intervention, since the Algernon argument likely doesn't apply: Meditative attainments might've not led to a fitness advantage (even, by opportunity cost, to a fitness disadvantage), and so were likely selected against, but most of us don't care that much about inclusive genetic fitness and more about psychological well-being. Evolutionary dynamics favor being like Dschingis Khan (dozens to hundreds of offspring) over Siddharta Gautama (one son), but I'd rather attain sotāpanna than pillage and murder.
And meditative attainments are costly: they take tens to hundreds to thousands of hours to reach, which would make simple psychopharmacological interventions worthwhile. I also don't buy that they miss the point of meditation—most people already struggle enough, so some help doesn't make it a cakewalk; "reach heaven through fraud". One must be careful not to fall into the trap of taking substances that feel good but lessen sensory clarity (which I believe was the original intent behind the fifth precept, and so I'll exclude e.g. opiates from the substances to test.
Variables tracked (see more here):
The total cost of the experiment is at least 21.5€:
200mg caffeine pills, placebo pills filled with sugar, of each 25. Put each pill with a corresponding piece of paper ("C" for caffeine, "P" for placebo) into an unlabeled envelope. Used
seq 1 50 | shuf
to number the envelopes, and sorted them accordingly.Notes on the experiment:
Statistical Method
In general, I'll be working with the likelihood ratio test. For this, let vP be the distribution of values of a variable for the placebo arm, and vC the distribution of values for a variable of the caffeine arm. (I apologise for the C being ambiguous, since it could also refer to the control arm).
Then let θ0=(μ0,σ0)=MLEN(vP) be the Gaussian maximum likelihood estimator for our placebo values, and θ=(μ,σ)=MLEN(vC) be the MLE for our caffeine values.
Then the likelihood ratio statistic λ is defined as λ=2logLC(θ)LC(θ0) where LC(θ) is the likelihood the caffeine distribution assigns to the parameters θ. This test is useful here because we fix all values of θ0. See Wasserman 2003 ch. 10.6 for more.
If λ≈0, then the MLE for the placebo arm is very close to the MLE for the caffeine arm, the distributions are similar. If λ>0, then the MLE for the placebo arm is quite different from the caffeine arm (though there is no statement about which has higher values). λ<0 is not possible, since that would mean that the MLE of the placebo distribution has a higher likelihood for the caffeine data than the MLE of the caffeine distribution itself—not very likely.
Note that I'm not a statistician, this is my first serious statistical analysis, so please correct me if I'm making some important mistakes. Sorry.
Predictions on the Outcomes of the Experiment
After collecting the data, but before analysing it, I want to make some predictions about the outcome of the experiment, similar to another attempt here.
Moved here.
Analysis
We start by setting everything up and loading the data.
The mood data is a bit special, since it doesn't have timezone info, but that is easily remedied.
Summary Statistics
We can first test how well my predictions fared:
drumroll
At least this time I was better than chance:
Meditation
Merging the meditations closest (on the right) to the consumption and selecting the individual variables of interest:
So, does it help?
Indeed! Cohen's d here looks pretty good. Taking caffeine also reduces the variance of both variables:
Productivity and Creativity
We repeat the same procedure for the productivity and creativity data:
And the result is…
Again surprisingly good! The creativity values are small enough to be a fluke, but the productivity values seem cool.
In this case, though, caffeine increases variance in the variables (not by very much):
Mood
Some unimportant pre-processing, in which we filter for mood recordings 0-10 hours after caffeine intake, since
pd.merge_asof
doesn't do cartesian product:And now the analysis:
Which leads to d of ~0.27 for happiness, ~0.13 for contentment, ~-0.11 for relaxation and ~-0.14 for horniness.
Likelihood Ratios
We assume (at first) that the data is distributed normally. Then we can define a function for the gaussian likelihood of a distribution given some parameters:
And now we can compute the likelihood ratio LθLθ0 for the null hypothesis θ0=MLE(vP) for the placebo data vP, and also the result of the likelihood ratio test:
And this gives us surprisingly large values:
And, if one is interested in p-values, those correspond to (with 2 degrees of freedom each):
I find these results surprisingly strong, and am still kind of mystified why. Surely caffeine isn't that reliable!
And, the same, for mood:
And the p-values of those are:
Conclusion
Caffeine appears helpful for everything except relaxation (and it makes me hornier, which I'm neutral about). I'd call this experiment a success and will be running more in the future, while in the meantime taking caffeine before morning meditations.
Full code for the experiment here.
Predictions on the Outcome of the Experiment
Predicting the outcomes of personal experiments give a useful way to train ones own calibration, I take it a step further and record the predictions for the world to observe my idiocy.
I also recorded my predictions about the content of the pill on PredictionBook (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50).