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 become active or inactive 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 in order to achieve load levelling and/or peak shaving in order to minimise the fluctuation between off-peak and peak energy demand. An effective approach is proposed to model and administer the behaviour of source nodes in this grid 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 stochastic models developed based on the Box-Jenkins method predict the most efficient state of the electrical energy flow between a distribution network and nodes and minimises the peak demand and off-peak consumption of acquiring electrical energy from the main grid. The performance of the models is validated against the autoregressive moving average (ARIMA) and the Markov chain models used in previous work. The results demonstrate that the proposed method outperforms both the ARIMA and the Markov chain model in terms of forecast accuracy. Results are presented, the strengths and limitations of the approach are discussed, and possible future work is described.