Quantcast
Viewing all articles
Browse latest Browse all 1015

Estimating the mean and standard deviation from the median and the range

By Christos Argyropoulos

While preparing the data for a meta-analysis, I run into the problem that a few of my sources did not report the outcome of interest as means and standard deviations, but rather as medians and range of values. After looking around, I found this interesting paper which derived (and validated through simple simulations), simple formulas that can be used to convert the median/range into a mean and a variance in a distribution free fashion. With

  • a = min of the data
  • b = max of the data
  • m = median
  • n = size of the sample

the formulas are as follows:

Mean

Variance Image may be NSFW.
Clik here to view.
frac{1}{n-1} Big(a^2+m^2+b^2+frac{n-3}{2} frac{(a+m)^2+(b+m)^2}{4}-n bar{m} Big)

The following R function will carry out these calculations

f{
mns=sqrt((a*a+m*m+b*b+(n-3)*((a+m)^2+(m+b)^2)/8-n*mn*mn)/(n-1))
c(mn,s)
}

Image may be NSFW.
Clik here to view.

Related


R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more…


If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook…

…read more

Source:: r-bloggers.com


Viewing all articles
Browse latest Browse all 1015

Trending Articles