Statistics for Microgrid Enabling Towards the Implementation of Active Distribution Systems: Planning, Operation, and Energy Trading