【1.3.1】疫苗的保护率

一、Beta分布

$f(x;\alpha,\beta) = \frac{1}{B(\alpha,\beta)}x^{\alpha-1}(1-x)^{\beta-1}$

Beta分布有两个正数参数：α>0和β>0，这两个参数共同决定了Beta分布的形状。

Beta分布的期望均值为：

$E[X] = \frac{\alpha}{\alpha+\beta} \\$

Beta分布在Bayes推断中可以作为一个先验概率分布。比如，我们曾经掷硬币100次，49次正面朝上，51次反面朝上，那么我们可以认为掷硬币正面朝上的概率分布为 Beta(49,51)

curve(dbeta(x,49,51))


curve(dbeta(x,49+100,51+900))


$\frac{\alpha}{\alpha + \beta} = \frac{149}{149+951} = 0.135$

二、疫苗保护率

2020年12月，BNT在《新英格兰医学杂志》上发布了其疫苗实验数据，如下：

三、疫苗保护率

$Vaccine\ Efficacy = 100 \times (1-IRR)$

$IRR = \frac{疫苗组发病率}{对照组发病率}$

$IRR = \frac{8/17411}{162/17511} = 0.04966$

$Efficacy = 100\times(1-IRR) = 95\%$

四、 I型错误

$P(VaccineEfficacy ＞ 30%) = 0.9999$

五、先验概率

$(Posterior \ beliefs) \propto (Prior \ beliefs) \times (Likelihood \ of \ observed \ data )$

$Prior \ beliefs = constant \times \theta^{ \alpha-1}(1- \theta)^{ \beta-1 }$

$Likelihood \ of \ observed \ data = \binom{n}{k} \theta^{k}(1-\theta)^{n-k }$

$Posterior \ beliefs \propto \theta^{\alpha+k-1}(1-\theta)^{\beta+n-k-1}$

$k \sim Binomial(n,\theta)$

$\theta \sim Beta(\alpha,\beta)$

$\frac{\alpha}{\alpha+\beta} = 0.01$

curve(dbeta(x,0.010101,1), xlab="Incidence Rates")


六、似然函数

$Vaccine\ Incidence\ Rate \sim Beta(0.010101+8, 1+17411-8)$

$Placebo\ Incidence\ Rate \sim Beta(0.010101+162, 1+17511-162)$

curve(dbeta(x,0.010101+8, 1+17411-8), col = "red", xlim=c(0,0.02), xlab="Incidence Rates", ylab="Density")
curve(dbeta(x,0.010101+162, 1+17511-162), col = "black", add=TRUE)
legend(0.015, 2000, legend=c("Vaccine","Placebo"), col=c("red","black"), lty=1)


【注：图中横坐标非0-1】