adding test for variance and implementation for descrete random variables