Compute data statistics