Hello Shg,

Thank you for your reply. I think I can adapt your code for my application.

You seem to have a good understanding of probability theory.

Would you mind if I ask you a speculative question about copula functions? I understand that this is an excel help forum but I'd be grateful for any comments on a problem that I have.

So I have 4 variables:

1. The time a car departure from home

2. Distance travelled during the day

3. The number of trips made during the day

4. Arrival time back home

Each variable has a different distribution.

I am trying to build the variables's joint distribution using a copula function because they are all correlated to a degree. I am then using this for a Monte Carlo simulation of an individuals daily travel patterns.

Here is the correlation matrix.

https://dl.dropbox.com/u/54057365/All/matrix.JPG
Notice distance is negatively correlated with depart time indicating that the later an individual leaves home the short the distance that they will travel.

However, when I test the significance of all the correlations, I find that one of the correlations is not significantly different from zero (the test statistic is 1.96) .

https://dl.dropbox.com/u/54057365/All/matrix1.JPG
This tells me that arrival time and departure time are not correlated.

My question is: If one of the correlations is not significantly significant can you still use a copula function? because arrival time is correlated with the other 2 variables.

I have been trying to find an example of such a situation online all day but to no avail.

I would greatly appreciate any comments

John