How do I calculate the standard deviation here?

33 Views Asked by At

My main goal is to calculate the sampling variance. But I will start with the standard deviation. I am doing a meta-analysis and need to calculate the variance for EACH effect size (prevalence in this case) in each study.

For example, I have 10 positive cases out of 1000 people that were tested. This gives a prevalence of 0.01 (or 1%). How do I find the standard deviation from this information?

1

There are 1 best solutions below

0
On

This is an exercise in Bayesian parameter estimation, related to these calculations. Your prevalence estimate is of the parameter $p$ in a Bernoulli distribution, with a random person scoring $1$ if they're a case and $0$ otherwise. If $k$ people in a sample of $n$ are cases, $p$'s PDF on $[0,\,1]$ is adjusted by Bayes's theorem from the prior $1$ to the posterior $\frac{p^k(1-p)^{n-k}}{\operatorname{B}(k+1,\,n-k+1)}$. So the mean of $p^\ell$ is$$\int_0^1\frac{p^{k+\ell}(1-p)^{n-k}dp}{\operatorname{B}(k+1,\,n-k+1)}=\frac{\operatorname{B}(k+\ell+1,\,n-k+1)}{\operatorname{B}(k+1,\,n-k+1)}=\frac{(k+\ell)!(n+1)!}{k!(n+\ell+1)!}.$$In particular,$$\Bbb Ep=\frac{k+1}{n+2},\,\Bbb Ep^2=\frac{(k+1)(k+2)}{(n+2)(n+3)}$$and$$\sigma_p^2=\frac{(k+1)(k+2)}{(n+2)(n+3)}-\frac{(k+1)^2}{(n+2)^2}=\frac{(k+1)(n-k+1)}{(n+2)^2(n+3)}$$(you'll want to double-check those calculations).