There are $S$ individuals who are susceptible to infection, and $I$ who are infectious. $S + I = N$, where $N$ is the total size of the population.
Each infectious transmit the disease to a susceptible after an exponentially distribution time with mean $\lambda$. This results in the susceptible individual becoming an infectious individual ($S -1$ and $I + 1$).
Is it correct to write the rate of change in $S$ as:
$${dS \over dt } = -\lambda SI.$$
I know this is the SIR model. What I am trying to do here is to understand how to generalize the deterministic version in the wiki article to a stochastic version where the waiting time before infection is transmitted is exponentially distributed.
Call $\Sigma_t$ and $\Phi_t$ the random variables describing the number of susceptible and infectious individuals at time $t$. The hypothesis sustaining the SIR models is, first, that every individual is constantly in contact with every other one and, second, that each contact between an infected individual and a susceptible one causes the transmission of the disease with some given, constant, probability.
Thus, the probability that each susceptible individual becomes infected by a given infected individual during the time interval $(t,t+s)$ is $\lambda s+o(s)$ when $s\to0$, for some parameter $\lambda$ which describes the frequency of the individual encounters times the probability that a given encounter does cause the infection. The probability that each susceptible individual becomes infected during the same time interval is $\lambda s\Phi_t+o(s)$ since $\Phi_t$ encounters may happen to this susceptible individual, independently. This implies that $\Sigma_t$ becomes $\Sigma_t+1$ after a random time which is the minimum of $\Sigma_t\Phi_t$ independent random times, each exponential with parameter $\lambda$. Thus, $\Sigma_t$ becomes $\Sigma_t+1$ after an exponential random time with parameter $\lambda\Sigma_t\Phi_t$. Finally, when $\Sigma_t$ becomes $\Sigma_t+1$, $\Phi_t$ becomes $\Phi_t-1$.
Turning to the expectations $S(t)=\mathbb E(\Sigma_t)$ and $I(t)=\mathbb E(\Phi_t)$, one sees that $\Sigma_t+\Phi_t=N$ is constant, hence $\lambda\Sigma_t\Phi_t=\lambda\Sigma_t(N-\Sigma_t)$, and that $$ S'(t)=-\lambda\mathbb E(\Sigma_t\Phi_t),\qquad I'(t)=\lambda\mathbb E(\Sigma_t\Phi_t). $$ Thus, in full rigor, $$ S'(t)\ne-\lambda S(t)I(t),\qquad I'(t)\ne\lambda S(t)I(t), $$ and in fact, Cauchy-Schwarz inequality $\mathbb E(\Sigma_t^2)\gt\mathbb E(\Sigma_t)^2$ implies that $$ S'(t)\gt-\lambda S(t)I(t),\qquad I'(t)\lt\lambda S(t)I(t). $$ Of course, in the limit $N\to\infty$ of large populations, one can expect that $\Sigma_t\approx S(t)$ and $\Phi_t\approx I(t)$, recovering the usual deterministic approximation.