calculate mean of geometric distribution