Basic statistics from samples