# Simple conditional probability question

1. Jun 22, 2012

Hello,

I'm trying to work out a conditional probability.

I have hundreds of measurements of two variables (1) Start Time and (2) Journey time.

I've created a frequency table.

https://dl.dropbox.com/u/54057365/All/forum.JPG [Broken]

How can I work out the Journey time given a start time?

P(JT | ST) = P(JT n ST)/P(ST)

How would you work out these?

For example given 8am what would be the probable journey time?

John

Last edited by a moderator: May 6, 2017
2. Jun 22, 2012

### mathman

Essentially each row is P(JT|ST). Divide each entry by the total number for the row.

If the JT is supposed to be continuous, then graph each row with some curve fit and normalize so the integral = 1 to get the probability density.

3. Jun 23, 2012

### haruspex

As mathman says, the short answer is to divide the frequency for a start time, journey time combination by the total for that start time. To do better, you need a mathematical model for the relationship, and best of all is to base that model on knowledge of the physical system.
In the present case, I would assume that the rate of progress of the journey depends on time of day. This will consist of a deterministic term r(t) and a probability distribution with zero mean. You can assume the basic shape of the distribution is fixed, but the variance will also be a function of time.
Next, find the values of r(t), at one minute steps say, which give the best fit to your data. Plot that up and find a reasonable curve to fit it. Finally, look at the error term and figure out how the variance changes with time of day. Then see if you can find a standard distribution to model it.