In the current research, a smart grid is considered as a network of distributed interacting nodes represented by renewable energy sources, storage and loads. The source nodes connect or disconnect in a stochastic manner due to the intermittent nature of natural resources such as wind and solar irradiance. Prediction and stochastic modelling of electrical energy flow is a critical task in such a network to achieve load levelling and/or peak shaving in order to minimise the fluctuation between off peak and peak energy demand. The behaviour of source nodes in this grid is modelled and administered through a scheduling strategy control algorithm using the historical data collected from the system. The stochastic model predicts future power consumption/injection to determine the power required for storage components. The proposed stochastic model based on Box-Jenkins method satisfies two major objectives. It predicts the most efficient state of electrical energy flow between a distribution network and nodes as well as minimising the peak demand and off peak consumption of deriving electrical energy from the main grid. MATLAB/Simulink is deployed to simulate the platform. The performance of the models is validated against autoregressive moving average (ARIMA) and Markov Chain models. The results demonstrate that the proposed method outperforms both ARIMA and Markov Chain model. Results are presented, the strengths and limitations of the approach are discussed, and possible future work is described.