Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an exponential distribution with a mean pollutant concentration of 3.1 mg/L per day

How can I determine the probability that the pollutant concentration will exceed 6 mg/L within 3 days? I need to use a Monte Carlo simulation for a period of 100 days.

Please let me know if you can help.



share|cite|improve this question

The probability background: Let random variable $X$ have exponential distribution with parameter $\lambda$ has density function $\lambda e^{-\lambda x}$ (for $x\ge 0$).

The random variable $X$ has cumulative distribution function $1-e^{-\lambda x}$, again for $x\ge 0$, and $0$ for $x\lt 0$. It follows that $\Pr(X\gt x)=e^{-\lambda x}$. The mean of a random variable with this distribution is $\dfrac{1}{\lambda}$. It follows that in your case $\lambda=\dfrac{1}{3.1}$.

Let random variables $X_1, X_2, X_3, X_4, \dots$ be the concentrations on days $1, 2,3,4,\dots$. We have $$\Pr(X_i \le 6)=1-e^{-6/3.1}.$$ If we assume independence, which is physically very unreasonable, then the probability we are at or below $6$ for $3$ consecutive days is $(1-e^{-6/3.1})^3$. Thus the probability we are over $6$ for at least one of these $3$ days is $$1-(1-e^{-6/3.1})^3.$$

Simulation: It was shown above that we can (under unreasonable assumptions) find explicitly the required probability. But that may not be what you are being asked to do. You are asked, perhaps in addition to the probability stuff above, or perhaps without the probability stuff, to simulate the results from sampling independently $100$ times from an exponential with mean $3.1$.

Probably you are intended to start from independent random variables $U_1,U_2,U_3,U_4,\dots$ that have uniform distribution on $[0,1)$. Most random number generators will produce pseudo-random sequences of this type.

You may know that if $U$ is uniform on $[0,1)$, then $$X=-\frac{1}{\lambda}\ln(1-U)$$ has exponential distribution with parameter $\lambda$. Or maybe you have been given a general recipe for simulating a random variable with cumulative distribution function $F(x)$. You can find information about the general process in this Wikipedia article, and probably in your course materials.

For your simulation, you need to generate a string of pseudo-random numbers $u_1,u_2,\dots,u_{100}$, and as you generate them, let $x_i=-3.1\ln(1-u_i)$. This will simulate independent sampling from an exponential with mean $3.1$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.