---
title: "2"
source: "2.docx"
converted: "2026-10-01 10:26:06 +0800"
converter: "MarkForge (mdconvert)"
engine: "MarkItDown"
---

COVID-19 Spread in Malaysia Using SIR Model

Nur Nadiah Az-zahraa Mohamed Sharfudeen[[1]](#footnote-2)\*, Nurul Najihah Mohamad

1,2Department of Computational & Theoretical Sciences (CTS), Kuliyyah of Science, International Islamic University Malaysia (IIUM), 25200 Kuantan, Pahang, Malaysia.

|  |  |  |
| --- | --- | --- |
| ARTICLE INFO |  | ABSTRACT |
| *Article history:*  Received 12 March 2025  Revised 14 May 2025  Accepted 18 May 2025  Published 1 September 2025 |  | The COVID-19 pandemic had a significant impact globally. Negative impacts include the total number of losses in overall population size and economic decline. This study focuses on applying the simple Susceptible-Infected-Recovered (SIR) model to analyze COVID-19 cases in Malaysia for a time span of 100 days, from 1/5/2024 up to 8/8/2024. The key parts to gain the result can be divided into two which are data collection of daily COVID-19 cases in Malaysia from the website of Ministry of Health and solving the differential equations using R studio. From the SIR Model, the findings provide the estimation of transmission rate (𝛽), recovery rate (𝛾), and a basic reproduction number ($R\_{0}$), along with the graph of trends of COVID-19 in Malaysia for 100 days. From the values gained, this study aims to construct a Markov chain transition matrix to explain the disease spread more effectively. |
| *Keywords:*  COVID-19  SIR Model  Markov Chain Model  Mathematical Modelling  Basic Reproduction Number  Transition Probability Matrix  *DOI:*  [10.24191/jcrinn.v10i1](https://dx.doi.org/10.24191/jcrinn.v10i2.513).513 |  |

1. introduction

According to Achmad et al. (2021), COVID-19 is an emerging infectious disease, first found in late 2019, with the first patient being diagnosed on 31st December 2019 in Wuhan, China. Since then, it has been spreading rapidly across the country and eventually all over the world. The COVID-19 epidemic in Malaysia started with a small-sized outbreak of 22 cases in January 2020, mainly from imported cases. The first wave was quickly replaced by an even more significant outbreak, primarily secondary to local transmission, which led to 651 cases (Salim et al., 2020).

Salim et al. (2020) reported that there were three epidemic forecasting models used to make predictions for COVID-19 cases in Malaysia. The three models are the curve-fitting model with a probability density function and skewness effect, the stochastic model, and a system dynamic model. The stochastic process, which is modeled using Markov Chain, predicted a peak on May 20 and May 31, 2020, with 630,000 to 800,000 infections if the Movement Control Order (MCO) measure persists.

The pandemic has shown the necessity for continuous investigation and intervention to prevent the spread of the virus and the management of long-term effects. Hence, this study intends to see the spreading of COVID-19 in Malaysia by modeling it using a simple compartmental SIR model, where the parameters for the model are estimated from the real data.

1. literature review
   1. Disease spread simulation

According to Viboud et al. (2021), disease spread simulation is the application of mathematical or computational models to simulate and study the spread of infectious diseases in a population. These simulations are used to forecast the evolution of a disease in time, to assess the effects of different public health interventions, and to inform decision-making processes to control outbreaks in a proper way.

A cornerstone in disease spread model is the disease transmission dynamics, the field of research on how diseases move from one individual to another individual. Based on the website of CDC (Centers for Disease Control and Prevention, 2021) in 2021, disease transmission dynamics includes a consideration of factors involved in contact frequency, disease transmission probability, and number of new cases produced by one infected person that may occur.

An important number in the disease transmission dynamic is the basic reproduction number ($R\_{0}$). It is the number that provides us the measure of how many new infections one infected individual can transmit to another individual (WHO, 2020). For example, if $R\_{0}$ = 2, the minimum transmission by an infected individual is two cases per transmissions.

* 1. Previous study

Among the contributions in this field in the context of the COVID-19 pandemic, the paper by F. M. Omar, M. A. Sohaly, and H. El-Metwally (2024) provides a closed-form expression to estimate the Mean First Passage Times (MFPTs). MFPTs are also important in characterizing the time course of basic reproduction number $(R\_{0})$ that describes the mean time for an infected individual to give the virus to the susceptible compartment. The use of this formula provides a more accurate estimate of the time for transmission events to take place, therefore improving the accuracy of virus spread forecasts. On the other hand, the authors also propose a state reduction approach to reduce the calculation of MFPTs, and the modelling process is more efficient by choosing a small number of states or steps. This method not only simplifies the computation but also makes it possible to perform faster and more realistic simulations. Additionally, they investigate whether the system's dynamics change significantly when new stages are introduced, such as distinct stages of infection and recovery lead to different relative levels and explain how such level changes lead to larger or smaller overall rates of virus transmission.

Another study by Wang andMustafa (2023) have introduced an innovative Markov Chain Model designed for studying infectious diseases. This model is interesting because of its simplicity and efficiency, it can be controlled only by four parameters, even though it runs in an infinite state space. This advancement makes the model a versatile tool for analyzing complex disease dynamics without the need for extensive computational resources. Its streamlined design allows its use in democratized and usable ways in the context of many infectious disease settings, such as pandemic, i.e., COVID-19.

Moreover, the authors have performed many simulations methodology to cope with heterogenous infection distribution in various areas. By applying this method to six regions with high transmission rates, their study effectively analyses how varying regional characteristics influence disease spread. Their numerical study, based on a COVID-19 application as a case study, shows that it is possible to replicate the transmission dynamics that are characteristic of related infectious diseases using the model. This ability illustrates the power of the model to account for the dynamics of real-world disease transmission and its potential to improve epidemic prediction and public health plans.

* 1. Relationship between Markov chain model and SIR model

In this study, the disease spread model based on the SIR Model is constructed. SIR (Susceptible-Infected-Recovered) is a mathematical model that explains the population-level patterns of infectious diseases (Zenian et al., 2022). In Markov Chain Model, the principle of transition probabilities is applied to the stochastic version of SIR Model. Since transition probabilities are typically represented in a transition matrix, let’s set up a transition probability matrix in the context of SIR Model. Firstly, a transition diagram of the three states in the SIR Model is formed:

Susceptible

Infected

Recovered

$$γI$$

$$βIS$$

Fig. 1. The transition diagram of the three states in SIR Model

In this transition diagram, both the birth rate and death rate are assumed to be zero. The phase of moving from susceptible to infected state is represented by 𝛽𝐼𝑆 where 𝛽 is the transmission rate, 𝐼 is the number of individuals currently in the infected state and 𝑆 is the number of individuals currently in susceptible state. The term 𝑆𝐼 represents total number of potential interactions between the individuals in susceptible state and infected state. If 𝛽𝐼𝑆 increases, the number of new infections in unit times also increases (Morris and Bjørnstad (2020)).

Logically, when the transmission rate is high, the infection is spreading faster, even with limited interactions between individuals in susceptible state and recovered state. On the other hand, observing the transition from infected state to recovered state, the transition is represented as 𝛾𝐼 where 𝛾 is the recovery rate that is proportional to the number of infected individuals 𝐼. It is crucial to understand that when the recovery rate is high, the rate of change from infective state to recovered state is high or the number of infective states moving to recovered state is bigger. The spread of the disease, 𝛽𝐼𝑆 is non-linear since it depends on both state susceptible and infected, unlike the recovery phase, 𝛾𝐼 that is linear since it depends only on the infective phase (Bjørnstad, 2022). The balance between both transmission rate and recovery rate determines the basic reproduction number of a disease, $R\_{0}$:

$$ R\_{0}=\frac{β}{γ} (1)$$

Second step to construct a transition probability matrix for the SIR Model is listing all the probabilities in event. The key is to calculate the probability of moving from each state to another state. Since there are three states of “Susceptible”, “Infected”, and “Recovered”, the matrix is supposed to be a 3 × 3 matrix. In Markov Chain Model, 𝑃𝑖𝑗 is known as the probability of moving or transitioning from initial state 𝑖 to final state 𝑗. Therefore, listing the 9 probabilities of changing from the three states in SIR Model:

1. $ P\_{SS}$: the probability of susceptible individuals remains susceptible.
2. $ P\_{SI}$: the probability of susceptible individuals becomes infected.
3. $P\_{SR}$: the probability of susceptible individuals to recovered.
4. $ P\_{IS}$: the probability of infected individual becomes susceptible.
5. $ P\_{II}$: the probability of infected individuals stays infectious.
6. $ P\_{IR}$: the probability of infected individuals to recovered.
7. $ P\_{RS}$: the probability of recovered individuals become susceptible.

(viii) $P\_{RI}$: the probability of recovered individuals become infectious.

(ix) $P\_{RR}$: the probability of recovered individuals remains recovered.

Arranging these 9 probabilities into a matrix 𝑃:

$$ P=\left[\begin{matrix}P\_{SS}&P\_{SI}&P\_{SR}\\P\_{IS}&P\_{II}&P\_{IR}\\P\_{RS}&P\_{RI}&P\_{RR}\end{matrix}\right] $$

1. METHODOLOGY
   1. Research design

This study implement the use of the SIR Model, which is originally considered as a deterministic model. This study is also non-experimental since existing data is used to model and predict outcomes of COVID-19 spread in Malaysia. According to Tang et al. (2021), in the SIR Model, the rate of change of the three states of “Susceptible”, “Infected”, and “Recovered” are depending on the factors of time. Therefore, in this research, the independent variable is time(t) in days. Meanwhile, the dependent variables are *S(t), I(t)* and *R(t)*, which the number of susceptible, infected, and recovered individuals at time t.

* 1. Data collection

The real-world data of COVID-19 in Malaysia is gathered from the official website of Info Centre by Ministry of Health (MOH). The data provide daily case reports with columns on region, number of people infected per day, number of people recovered per day, and number of deaths per day. The data has a time span of 100 days, from 1/5/2024 until 8/8/2024. The data is arranged according to the three states in SIR Model with number of infected individuals and number of recovered individuals per day. According to D´Ebarre (2019), to determine the number of susceptible per day, the number of infected individuals and recovered individuals is subtracted from the total number of population (*N*).

* 1. Model building

Three different states in SIR Model:

*S(t)*: Number of susceptible individuals at time t,

*I(t)*: Number of infected individuals at time t,

*R(t)*: Number of recovered individuals at time t.

Let the number of populations be $N$, therefore:

$ N=S\left(t\right)+I\left(t\right)+R \left(t\right). $ $(2)$

The rate of changes of each state can be written as three different equations:

$\frac{dS}{dt}=- \frac{βS\left(t\right)I\left(t\right)}{N} ,$ $(3)$

$ \frac{dI}{dt}= \frac{βS\left(t\right)I(t) }{N}-γI(t)$ , $(4)$

$ \frac{dR}{dt}= γI\left(t\right),$ $(5)$

where $β$ is transmission rate and $γ$ is recovery rate.

* 1. Transition probability matrix

The agent-based modelling of the SIR Model will be explored. Agent-based modelling can be defined as computational simulations that attempt to model the behaviour of the individual within the environment (Singh, 2024). Firstly, computing the fractions of the three populations in susceptible, infected, and recovered as:

$$ s\left(t\right)= \frac{S(t)}{N} (6)$$

$$ i\left(t\right)= \frac{I(t)}{N} (7)$$

$$ r\left(t\right)= \frac{R(t)}{N} (8)$$

Then,

$s\left(t\right)+i\left(t\right)+r\left(t\right)=1$. (9)

Therefore, the rate of changes of each three states would become:

$\frac{ds}{dt}=- βsi$, $ s\left(0\right)= \frac{S(0)}{N} $ $(10)$

$\frac{di}{dt}= βsi-γi$, $i\left(0\right)= \frac{I(0)}{N} $ $(11)$

$\frac{dr}{dt}= γi, r\left(0\right)= \frac{R(0)}{N} $ $(12)$

To implement an agent-based simulation, assume the non-linear term is linear. Therefore, the rate of changes can be written in matrix such as:

$ \frac{d}{dt}\left[ \begin{matrix} s \\ i \\ r \end{matrix}\right] =A\left[\begin{matrix} s \\ i\\ r\end{matrix} \right] $ (13)

$A = \left[\begin{matrix}-βi&0&0\\βi&-γ&0\\0&γ&0\end{matrix}\right]$ (14)

Matrix *A* is the rate of change for a continuous time Markov Chain. Meanwhile, the matrix *P* is a simplified version of the transition probability matrix for SIR Model or the discrete-time Markov Chain. To prove the relationship between rate matrix *A* and transition matrix *P*, an exponential relationship between the two matrices is built, since matrix *A* is continuous to matrix *P*:

$P=e^{A ∆t}$ (15)

For small $∆t$, the exponential can be approximated by the first-order Taylor expansion:

$e^{A ∆t}=I +A ∆t$ (16)

Where $I$ = identity matrix and $A∆t$ = scales of rate matrix *A* by the time step $∆t$. Solving the first-order Taylor expansion:

$A∆t$ = $\left[\begin{matrix}-βi∆t&0&0\\βi∆t&-γ∆t&0\\0&γ∆t&0\end{matrix}\right]$ (17)

$P = \left[\begin{matrix}1&0&0\\0&1&0\\0&0&1\end{matrix}\right] + \left[\begin{matrix}-βi∆t&0&0\\βi∆t&-γ∆t&0\\0&γ∆t&0\end{matrix}\right]$ (18)

$P = \left[\begin{matrix}1-βi∆t&0&0\\βi∆t&1-γ∆t&0\\0&γ∆t&1\end{matrix}\right]$ (19)

Next, it is important to understand that in the matrix *A*, it is an off-diagonal entries, which means the matrix represents the flows into a state. In matrix *P*, each rows represents the probabilities of leaving the state. Therefore, the diagonal term will remain the same, that is $P\_{SS}=1-βi∆t , P\_{II =} 1-γ∆t,$ and $P\_{RR =} 1$. On the other hand, the off-diagonal terms will switch position with its opposite diagonal in the matrix, $P\_{IS =} βi∆t$ will move to $P\_{SI }$ position and $P\_{RI}=γ∆t$ will move to the position of $P\_{IR}$ . Hence, the transition probability matrix *P* is ~~now~~:

$P = \left[\begin{matrix}1-βi∆t&βi∆t&0\\0&1-γ∆t&γ∆t\\0&0&1\end{matrix}\right]$ (20)

1. Result and discussion
   1. Estimation of transmission rate$\left(β\right)$ and recovery rate$\left(γ\right)$

For this section, to obtain the estimation of transmission rate(β) and recovery rate(γ), R-programming language has been used (see Appendix 1). The coding is attached as in the Appendix 1.  The results show the value of the transmission rate$, β = 0.006827$, recovery rate,$ γ=0.005924$, and basic reproduction number $,R\_{0}=1.15242$. The value of transmission rate and recovery rate are closed to each other, indicating that during the 100 days, the rate of individuals getting infected from COVID-19 in Malaysia is close to the rate of its recovery. In short, the spread of the virus is in stable state since the infection and recovery rate operate at a similar pace. The basic reproduction number, $R\_{0}=1.15242$, which is slightly above 1, which it indicates that the COVID-19 disease is still spreading in Malaysia but a lower rate. However, intervention steps still need to be taken since one infected individual can infect the virus over one other person.

According to Zenian et al. (2022), on the research of ‘*the SIR Model for COVID-19 in Malaysia*’ from January 2020 until June 2021, the values of transmission rate and recovery rate obtained were $β=0.0162$ and $γ=0.0069$ with a basic reproduction number, $R\_{0}=2.35$. This occur since the cases of COVID-19 in Malaysia during 2020 to 2021 were still high and there was still limited knowledge about the virus and still fewer prevention strategies announced by the government.

![](data:image/png;base64...)

Fig. 2. The SIR model graph for $R\_{0}=1.15242$

Fig. 2 illustrates the SIR Model on the COVID-19 pandemic in Malaysia from 1/5/2024 to 8/8/2024. The blue line represents the susceptible population of the 100 days period. Initially, the entire population is at the susceptible state except for those who are already infected before the first day, thus the curve begins at the maximum value of *N* = 31 400 000 minus the initial number of infected individuals. As the epidemic progress, the number of individuals in the susceptible state decreases gradually since some will move to the infected state. However, it will never reach zero since some individuals remain unexposed to the disease.

The red line represents the curve for the number of infected individuals, it is observed that the curve rises as the number of susceptible individuals decreases, indicating that the virus is spreading when both susceptible and infected individuals encounter each other. The number of infections proceed to increase until it reaches a peak value when it is about 50 days of the epidemic, this could happen due to the celebration of Eid al-Adha since the infection raises during the middle of June until early of July. After reaching the peak, the number of infected individuals starts to decline since more individuals are moving to recovered state. The green line, that is the curve for number of recovered individuals begins to increase slowly until it nearly approaches $N.$

* 1. Transition probability Matrix

For each time step, transition probability matrix *P* is:

$$ P \left(t\_{i+1}\right)=\left[\begin{matrix}1-β\frac{I\left(t\_{i}\right)}{N}&β\frac{I\left(t\_{i}\right)}{N}&0\\0&1-γ&γ\\0&0&1\end{matrix}\right] $$

$$P \left(t\_{i+1}\right)=\left[\begin{matrix}1-0.006827\frac{I(t\_{i})}{34 100 000}&0.006827\frac{I(t\_{i})}{34 100 000}&0\\0&0.994076&0.005924\\0&0&1\end{matrix}\right] $$

Using the computed values of $I(t\_{i})$ from the simulation, the matrix *P* can be solved by finding the maximum value of the transition probability of moving from susceptible state to infected state, $P\_{SI}$ .The simulation result shows that the value of maximum transition probability from susceptible state to infected state, $P\_{SI}$ = 0.006825. Therefore, the final solution of matrix *P* is:

$$ P \left(t\_{i+1}\right)=\left[\begin{matrix}0.993175&0.006825&0\\0&0.994076&0.005924\\0&0&1\end{matrix}\right] $$

This matrix P provides the probabilities of the various transitions between states *S, I,* and *R* for each. The first row is transitions from the susceptible state, with the probability of remaining susceptible is 0.993175, which is remarkably high because most of the time an individual is not exposed to the infection due to the low fraction of infected individuals, $.$ The probability of flow from susceptible to infected is$ $0.006825. The value is tiny since at this stage, the exposure to infected individuals is limited. The probability of moving from susceptible state to infected state is near to the transmission rate,$ β$ = 0.006827 since for small time steps, the probability of infection is proportional to the transmission rate. The likelihood of the infection is determined by the contact between susceptible and infected individuals, therefore, the higher the probability of transition from susceptible to infected state, the higher the transmission rate, $β.$ The second row gives a probability of remaining infected that is moderately high at 0.994076 with most infected individuals remain in this state for more than one time step. The probability of transitioning to the recovered state is 0.005924, which directly reflects the recovery rate, $γ$ = 0.005924. The third row is the transitions from the recovered state. The model assumes permanent immunity since the individuals that reach the recovered state remain there forever with probability 1, and there are no transitions back to either the susceptible or infected states as denoted by the zeros in the first and second column.

1. CONCLUSION

The findings indicate that the spread of COVID-19 was relatively kept under control during 2024, since lower rate of basic reproduction number implies lower transmission of the virus in the country. To minimize the basic reproduction number $R\_{0}$, it is a must to minimize the value of $β$ and S while maximize the value of γ.

In this study, the Markov Chain Model is employed to estimate the transition probabilities between the epidemiological states of susceptible, infected, and recovered individuals. The estimated probability of transitioning from the susceptible to the infected state is 0.006825, indicating a relatively low likelihood of new infections. Conversely, the probability of transitioning from the infected to the recovered state is 0.005924, which, while still low, is comparatively higher than the infection rate. These findings suggest a downward trend in the number of active COVID-19 cases in Malaysia.

The findings suggest that in 2024, Malaysia had approached the stable disease control of COVID-19. This is due to the intervention strategy practices such as MCO, the use of my Sejahtera app, and massive vaccination program. Although progress has been made, continued awareness is necessary, as the virus still poses a risk of community transmission.

1. Acknowledgements/Funding

The authors would like to express their gratitude to the Department of Computation and Theoretical Sciences, Kulliyyah of Science, International Islamic University Malaysia (IIUM), Kuantan, Pahang for the support and facilities provided.

1. Conflict of interest statement

The authors agree that there is no conflict of interests regarding publication of this paper.

1. Authors’ contributions

**Nur Nadiah Az-zahraa Mohamed Sharfudeen**: Collected the data, prepared literature review, wrote the research methodology, made revision for result and finding. **Nurul Najihah Mohamad**:Conceptualisation and supervision, format analysis, writing-review and editing, validation.

1. References

Achmad, A. L. H., Mahrudinda, N., & Ruchjana, B. N. (2021). Stationary distribution Markov chain for Covid-19 pandemic. *Journal of Physics Conference Series*, *1722*(1), 012084. <https://doi.org/10.1088/1742-6596/1722/1/012084>

Bjørnstad, O. N. (2022). *Epidemics: Models and data using R*. Springer. [https://doi.org/10.1007/978-3-031-12056-5](%20https%3A//doi.org/10.1007/978-3-031-12056-5)

Centers for Disease Control and Prevention (CDC). (2021). Understanding the basics of epidemiology. World Health Organization (WHO).

D´ebarre, F., & Bonhoeffer, S. (2019). *SIR models of epidemics Level 1 module in Modelling course in population and evolutionary biology* (701-1418-00). Theoretical Biology Institute of Integrative Biology ETH Z¨urich.

Morris, S. E., & Bjørnstad, S. O. N. (2020). *shinySIR: Interactive plotting for infectious disease models*. ResearchGate. <https://www.researchgate.net/publication/349952415_shinySIR_Interactive_Plotting_for_Mathematical_Models_of_Infectious_Disease_Spread>

Omar, F. M., Sohaly, M. A., & El-Metwally, H. (2024). Susceptible-exposed-infectious model using Markov chains. *Journal of Nonlinear Mathematical Physics*, *31*(1). <https://doi.org/10.1007/s44198-024-00167-3>

Salim, N., Chan, W. H., Mansor, S., Bazin, N. E. N., Amaran, S., Faudzi, A. a. M., Zainal, A., Huspi, S. H., Hooi, E. K. J., & Shithil, S. M. (2020*).* COVID-19 epidemic in Malaysia: Impact of lockdown on infection dynamics. *medRxiv (Cold Spring Harbor Laboratory)*. <https://doi.org/10.1101/2020.04.08.20057463>

Singh, A. (2024, June 18). *Agent based modeling: Techniques and applications*. BuiltIn. https://builtin.com/articles/agent-based-modeling

Tang, J., Bahnfleth, W., Bluyssen, P., Buonanno, G., Jimenez, J., Kurnitski, J., Li, Y., Miller, S., Sekhar, C., Morawska, L., Marr, L., Melikov, A., Nazaroff, W., Nielsen, P., Tellier, R., Wargocki, P., & Dancer, S. (2021). Dismantling myths on the airborne transmission of severe acute respiratory syndrome coronavirus-2 (SARS-CoV-2). *Journal of Hospital Infection*, 110, 89–96. <https://doi.org/10.1016/j.jhin.2020.12.022>

Viboud, C., Simonsen, L., & Flores, J. (2021). Disease surveillance and modelling in the time of COVID-19. Journal of Infectious Diseases, *224*(1), 1-3. <https://doi.org/10.1093/infdis/jiab227>

Wang, C., & Mustafa, S. (2023b). A data-driven Markov process for infectious disease transmission. *PLoS ONE*, *18*(8), e0289897. <https://doi.org/10.1371/journal.pone.0289897>

Zenian, S. (2022). The SIR model for COVID-19 in Malaysia. *Journal of Physics Conference Series*, *2314*(1), 012007. <https://doi.org/10.1088/1742-6596/2314/1/012007>

APPENDIX 1: Estimation of transmission rate$\left(β\right)$ and recovery rate$\left(γ\right)$

![](data:image/png;base64...)

|  |  |
| --- | --- |
| ![A picture containing text, clipart  Description automatically generated](data:image/png;base64...) | © 2025 by the authors. Submitted for possible open access publication under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). |

1. \* Corresponding author. *E-mail address*: nadiahsharfudeen@gmail.com [↑](#footnote-ref-2)
