Modeling and Optimizing State-Based Electricity Consumption Distributions in Dodoma Region, Tanzania Using Hidden Markov Models
Abstract
The aim of this study is to model and optimize state-based Electricity Consumption Distributions in Dodoma Region, Tanzania using Hidden Markov Models. The research is specifically aimed at the identification of hidden consumption states, and the determination of the best number of hidden states to enhance the state distributions identification. A quantitative approach was utilized based on monthly TANESCO electricity demand time series data for the years 2010-2025. The estimation involved the calculation of state transition probabilities, model diagnostics testing, and evaluation of forecasting performance based on different hidden state configurations. Model selection was based on extensively documented statistical criteria, namely the Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC). Empirical results revealed that a three-state HMM achieved the best performance with the lowest AIC (5492.480) and BIC (5707.104) values relative to models of two to ten states. The diagnostic tests concluded that segmenting the series into latent states improved statistical attributes such as normality, homoscedasticity, and stationarity that otherwise failed in the original unsegmented data. For instance, State 1 residuals were homoscedastic (Breusch-Pagan p = 0.22), and State 3 demonstrated stationarity (ADF p ≈ 0.01), enhancing interpretability and model fit. These findings show that three states bring optimal fit for prediction, and each state fulfils the assumption of homoscedasticity, as all states follow a normal distribution. The study recommends that energy policymakers and utility providers integrate HMM-based forecasting approaches to improve decision-making in regions with dynamic and complex electricity usage patterns.
Keywords
Full Text:
PDFReferences
R. Fachrizal, M. Shepero, D. van der Meer, J. Munkhammar, and J. Widén, “Smart charging of electric vehicles considering photovoltaic power production and electricity consumption: A review,” eTransportation,vol. 4, p. 100056, 2020, doi:10.1016/j.etran.2020.100056.
African Development Bank, “An outlook of Tanzania’s energy demand, supply, and cost by 2030,” African Development Bank (AfDB), Tech. Rep., 2022.
B. J. Dye, “Unpacking authoritarian governance in electricity policy: Understanding progress, inconsistency and stagnation in tanzania,” Energy Research & Social Science,vol. 80, p. 102209, 2021, doi:10.1016/j.erss.2021.102209.
M. Haruna, B. Ilembo, and J. Lwaho, “Forecasting hydropower production in Tanzania using the SARIMA model,”Journal of Science, Innovation and Creativity, vol. 4, no. 1, pp. 26–39, 2025, doi:10.58721/jsic.v4i1.958.
L. Rabiner, “A tutorial on hidden markov models and selected applications in speech recognition,” Proceedings of the IEEE,vol. 77, no. 2, pp. 257–286, 1989, doi:10.1109/5.18626.
W. Zucchini and I. L. MacDonald, Hidden Markov models for time series: an introduction using R.Chapman and Hall/CRC, 2009.
M. Aquino-Baleytó, V. Leos-Barajas, T. Adam, M. Hoyos-Padilla, O. Santana-Morales, F. Galván-Magaña, R. González-Armas, C. G. Lowe, J. T. Ketchum, and H. Villalobos, “Diving deeper into the underlying white shark behaviors at Guadalupe Island, Mexico,” Ecology and Evolution,vol. 11, no. 21, pp. 14 932–14 949, 2021, doi:10.1002/ece3.8178.
M. Chavan, S. Joshi, D. Patil, V. Kale, P. Kharat, and M. Kasar, “Time series analysis in electrical load forecasting,” Panamerican Mathematical Journal, vol. 35, no. 1, pp. 210–219, nov 2024, doi:10.52783/pmj.v35.i1s.2307.
J. Zhou, T. Peng, C. Zhang, and N. Sun, “Data pre-analysis and ensemble of various artificial neural networks for monthly streamflow forecasting,” Water,vol. 10, no. 5, 2018, doi:10.3390/w10050628.
D. Vora, N. Zade, P. Patwa, A. Kushwaha, G. Agrawal, and A. Sharma, “Temporal energy consumption exploration and time series forecasting of electricity dynamics,” in 2024 IEEE Pune Section International Conference (PuneCon),2024, pp. 1–6, doi:10.1109/PuneCon63413.2024.10895847.
R. Glennie, T. Adam, V. Leos-Barajas, T. Michelot, T. Photopoulou, and B. T. McClintock, “Hidden markov models: Pitfalls and opportunities in ecology,” Methods in Ecology and Evolution,vol. 14, no. 1, pp. 43–56, 2023, doi:10.1111/2041-210X.13801.
A. Poritz, “Hidden markov models: a guided tour,” in ICASSP-88., International Conference on Acoustics, Speech, and Signal Processing,1988, pp. 7–13, vol.1, doi:10.1109/ICASSP.1988.196495.
H. Shen, Z. Wang, X. Zhou, M. Lamantia, K. Yang, P. Chen, and J. Wang, “Electric vehicle velocity and energy consumption predictions using transformer and markov-chain monte carlo,” IEEE Transactions on Transportation Electrification,vol. 8, no. 3, pp. 3836–3847, 2022, doi:10.1109/TTE.2022.3157652.
H. Kaur and S. Ahuja, “Time series analysis and prediction of electricity consumption of health care institution using arima model,” in Proceedings of Sixth International Conference on Soft Computing for Problem Solving,K. Deep, J. C. Bansal, K. N. Das, A. K. Lal, H. Garg, A. K. Nagar, and M. Pant, Eds. Singapore: Springer Singapore, 2017, pp. 347–358.
M. N. Azimi and S. F. Shahidzada, “A correcting note on forecasting conditional variance using ARIMA vs. GARCH model,” International Journal of Economics and Finance,vol. 11, no. 5, pp. 145–153, 2019, doi:10.5539/ijef.v11n5p145.
B. T. McClintock, B. Abrahms, R. B. Chandler, P. B. Conn, S. J. Converse, R. L. Emmet, B. Gardner, N. J. Hostetter, and D. S. Johnson, “An integrated path for spatial capture–recapture and animal movement modeling,” Ecology, vol. 103, no. 10, p. e3473, 2022, doi:10.1002/ecy.3473.
J. Lee and B. S. Hwang, “Energy demand pattern analysis in south korea using hidden markov model-based classification,” Asian Economic Journal, vol. 38, no. 3, pp. 404–428, 2024, doi:10.1111/asej.12338.
B. Hegde, Q. Ahmed, and G. Rizzoni, “Velocity and energy trajectory prediction of electrified powertrain for look ahead control,” Applied Energy, vol. 279, p. 115903, 2020, doi:10.1016/j.apenergy.2020.115903.
I. Ullah, R. Ahmad, and D. Kim, “A prediction mechanism of energy consumption in residential buildings using hidden markov model,” Energies, vol. 11, no. 2, 2018, doi:10.3390/en11020358.
J. Smith, “Technical skills and expertise in auditing: A comprehensive review,” Auditing & Accountability Journal,vol. 35, no. 4, pp. 117–136, 2022.
P. Twesigye, “Structural, governance, & regulatory incentives for improved utility performance: A comparative analysis of electric utilities in tanzania, kenya, and uganda,” Utilities Policy,vol. 79, p. 101419, 2022, doi:10.1016/j.jup.2022.101419.
H. M. Malik, N. Salem, and M. S. AlSabban, “A comparative study on the performance of hidden markov model in appliance modeling,” in 2021 5th International Conference on Power and Energy Engineering (ICPEE),2021, pp. 145–152, doi:10.1109/ICPEE54380.2021.9662546.
M. Awad and R. Khanna, Hidden Markov Model.Berkeley, CA: Apress, 2015, pp. 81–104, doi:10.1007/978-1-4302-5990-95.
M. Boo, F. Argüello, J. D. Bruguera, R. Doallo, and E. L. Zapata, “High-performance vlsi architecture for the viterbi algorithm,” IEEE Transactions on Communications,vol. 45, no. 2, pp. 168–176, 1997, doi:10.1109/26.554365.
DOI: https://doi.org/10.37905/jjom.v8i2.34047
Copyright (c) 2026 Eliasi M Jeremiah, Ramkumar T Balan, Jairos K Shinzeh

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Jambura Journal of Mathematics has been indexed by
Jambura Journal of Mathematics (e-ISSN: 2656-1344) by Department of Mathematics Universitas Negeri Gorontalo is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Powered by Public Knowledge Project OJS.
Editorial Office
Department of Mathematics, Faculty of Mathematics and Natural Science, Universitas Negeri Gorontalo
Jl. Prof. Dr. Ing. B. J. Habibie, Moutong, Tilongkabila, Kabupaten Bone Bolango, Gorontalo, Indonesia
Email: [email protected].


















