0

I have a big problem trying to implement Monte Carlo Method to this function:

D=log(T)

Where T is a measured time, so T>0, and, obviously, it has a normal distribution.

I have 10 measured values of T in the experiment, so I calculate:

m_T (mean of T)  = 3.0 seconds
s_T (standard deviation of T)= 1.5 seconds

And, with this parameters I simulate T and, then, D:

T = Normal(m_T, s_T)
D=log(Normal(m_T, s_T)

But in D the program returns an error. When I depurate I find that the error is because Normal (m_T, s_T) have some NEGATIVE values, so log(NEGATIVE) crash!

I’m blocked, I don’t know how to continue… any suggestion? Thank you very much!

Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
Shivoham
  • 23
  • 1
  • 6

2 Answers2

1

By definition, the normal distribution always yields a finite probability for negative values. Then what you have measured (time) has not strictly a normal distribution.

A truncated normal distribution assigns a probability of 0 to every value that do not fall in a certain bound, but by ignoring values below 0 your will modify the mean and variance of the distribution.

Javier
  • 12,100
  • 5
  • 46
  • 57
0

A couple of comments:

  1. obviously, it has a normal distribution. This isn't obvious in the slightest. What might be better would be to use a Log Normal distribution. I strongly suspect that a truncated normal isn't what you are after. Using your parameters, we get the figure are the end. Notice that it has a rather high probability at x=0.

  2. Instead, you want to use Log-Normal, exponential, or some other more suitable distribution. You can match the moments from the true distribution to your observed values or use their maximum likelihood estimators.

enter image description here

csgillespie
  • 59,189
  • 14
  • 150
  • 185
  • You an Javier are right, thank you very much! Now I doubt between truncated normal or lognormal. I think that truncated normal makes more sense, because 'time' is normal but its domain is t>=0 (i.e. normal-truncated) but it never behave in the exponential way. – Shivoham Mar 11 '13 at 10:20