Statistics for Energy management in microgrids with plug-in electric vehicles, distributed energy resources and smart home appliances