Quantum statistics of trapped bosons