Goals

This slideshow will outline the “placebo effect” and its role in the world via statistical modeling.

We will also test some hypotheses and see if they pass.

What Even Is a “Placebo Effect”?

This is a question probably rolling through your mind now.

The placebo effect is a named condition. This happens when a patient takes some sort of “dummy” medication, and their brain convinces the body that the medication is the cure while it really is not. Solely in appearance, the person would seem to be getting better.

set.seed(123)
realCure <- rnorm(100, mean = 5, sd = 2)
placebo <- rnorm(100, mean = 2, sd = 2)
library(ggplot2)
df <- data.frame(
  different_groups = rep(c("Real Cure", "Placebo"), each = 100),
  improvementScores = c(realCure, placebo)
)
ggplot(df, aes(x = improvementScores, fill = different_groups)) +
  geom_density(alpha = 0.5) +
  labs(title = "Symptom Improvement in Treatment vs. Placebo")

Hypothesis Test

\[ H_0: \mu_{\text{realCure}} = \mu_{\text{placebo}} \\ H_A: \mu_{\text{realCure}} > \mu_{\text{placebo}} \]

t.test(realCure, placebo, alternative = "greater")
## 
##  Welch Two Sample t-test
## 
## data:  realCure and placebo
## t = 12.769, df = 197.35, p-value < 2.2e-16
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
##  2.956386      Inf
## sample estimates:
## mean of x mean of y 
##  5.180812  1.784906

Boxplot Comparison (ggplot plot #2)

ggplot(df, aes(x = different_groups, y = improvementScores, fill = 
                 different_groups)) + geom_boxplot() +
  labs(title = "Scores of Increasing Health Categorized by Group")

library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
df$dosage <- rep(seq(1, 100), 2)

plot_ly(df, x = ~dosage, y = ~improvementScores, 
        z = ~as.numeric(different_groups), type = "scatter3d", 
        mode = "markers", color = ~different_groups)
## Warning in eval(expr, data, expr_env): NAs introduced by coercion
## Warning: Ignoring 200 observations

Conclusion

As we can see, the placebo effect allows people to get better by a substantial amount, even if there is not a proper cure available to be given.

However, we can tell that via this trial, the real treatment does outdo the placebo as so:

\[ \text{} \bar{x}_{\text{proper cure}} - \bar{x}_{\text{placebo}} \approx 3 \]

Thus, our hypotheses from the start of the presentation have failed.