I think int overflow will be an issue here, even though `nPos` and `nObs` are `Long`. For massive RDDs of more than about 2 billion elements this could fail. Better to make the values `Double` to be safe since they're used that way.