Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simple probability question

  1. Nov 15, 2012 #1

    I have the distance for consecutive journeys made by cars, i.e. 2 journeys made 1 after another.

    I'm looking to determine, how much more likely two consecutive journeys are going to the same distance (plus or minus a mile) than not the same distance.

    Out of 14,325 pairs of journeys I found that 5,938 were same distance (plus or minus a mile).

    5,938/14,325 = 0.41

    If some said to me that their journey was 5 miles, could I say that their next journey if 4 times more likely to 5 miles (plus or minus a mile) than not to be.

    Is that correct?

    Thank you
  2. jcsd
  3. Nov 15, 2012 #2


    User Avatar
    Gold Member

    Let me answer your question by asking you another question. If you toss a fair coin 10 times and it comes up heads every time, what is the probability that it will come up heads the next time it is tossed?
  4. Nov 15, 2012 #3


    Staff: Mentor

    So this is like a person who works 5 days a week taking 2 to 3 trips a day.

    The work to / from trips are roughly the same mileage, whereas other trips to the store, doctor/dentist... or to somewhere else will have differing mileage.

    For weekends the trips may vary in distance unless there's some planned activity like a soccer match for your kids.

    You'd have to define what a trip is like turning on the car, driving somewhere and turning off the car or is a trip going someplace and then returning to where you started...
    Last edited: Nov 15, 2012
  5. Nov 15, 2012 #4
    Yes, this a like a person who works 5 days a week taking 2 to 3 trips a day.

    It is only week day data.

    1 trip is a distance to a destination. The 2nd trip is from that destination to somewhere else.

    I just would like to know, generally speaking can I infer from this that if a trip is x miles long is the next journey 4 times more likely x miles (plus or minus a mile) than not to be. Yes/No?

    I'm trying to determine the hyperparameters for a prior distribution in a bayesian probability problem.

    I'm creating a prior distribution of journey distances for a trip given the previous trip. So for example if the previous journey was 5 miles, one might believe that the next trip will be approximately 5 miles give or take a mile.

    So judging by my prior belief I would assign a hyperparameter of 4 for 5 mile and 1 for say 20 miles. So what I am saying is that prior to observing any data, my prior belief is that given a trip is x miles long I believe that the next journey is 4 times more likely to be x miles (plus or minus a mile) than not to be.

    I don't want to use a uniform prior.

  6. Nov 15, 2012 #5


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    phinds, I'm surprised at you! That's completely unfair. If you know the coin is fair then you know there's no causative correlation between consecutive results. In the OP context, it is entirely reasonable that there would be a relationship.
    Ideally, of course, you would plug in an a priori joint distribution and see how it's affected by the data, but on the face of it the proposed means of estimation is reasonable.
    If you presume the gathered data to be typical, the question can be phrased like this:
    If I pick a datapoint at random the set, what is the probability that the next datapoint's value will be within one mile?
    That said, it might be appropriate (given enough data) to see how the strength of correlation varies as the length of journey changes.
  7. Nov 15, 2012 #6


    User Avatar
    Science Advisor

    We should get some more information from the OP regarding any issues both demonstrated data and by expert judgement regarding dependencies between the different events.

    If there is a relationship, then these things will not only provide ways to detect them but also to understand the assumptions being placed on the analysis to begin with.
  8. Nov 15, 2012 #7


    Staff: Mentor

    I know this isn't a mathematical argument but more a common practice argument.

    My thinking is in the case of a day worker there is a strong correlation between pairs of trips. However for say a trucker or a delivery guy a weak correlation or none at all.

    Also for trips in a car there would be a minimum distance that someone would decide to drive vs walk and for longer distances the time would determine whether the trip is made. Most people have a commute time limit where they decide its too long to drive and that could be one hour to two hours.

    So I would tend to use a bell curve to describe the possible trips as an assumption with the center being the trips to and from work.

    how are the trips paired together for the correlation?
  9. Nov 16, 2012 #8

    Thanks for the replies.

    The trips are paired given their order.

    For example if the raw data was


    Then the paired data is


    I'm not interested in how the relationship varies with distance. At this stage I'm just looking for a rough starting poitnt for the prior hyperparameters.

    Can I confirm, just very broadly speaking that given the above calculation resulting in 0.4, implies that given a trip is x miles long, the next journey is approximately 4 times more likely to be x miles than not to be.

  10. Nov 16, 2012 #9


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I don't follow that calculation. Isn't it 40% same versus 60% different?
  11. Nov 16, 2012 #10
    Yes, that is my question, so 0.4 implies 40% same versus 60% different. I wasn't sure of that.

    But how do you determine how much more likely it is? twice as likely, 3 times as likely?

  12. Nov 16, 2012 #11
    Is it even possible to infer how much more likely it is?
  13. Nov 16, 2012 #12
    Is the calculation:

    (Fraction of journeys that were the same) / (Fraction of journeys that were not the same)


    5,938/14,325 = 0.414

    8,387/14,325 = .585


    0.414 / .585 = 0.7 times more likely
  14. Nov 16, 2012 #13


    User Avatar
    Gold Member

    Yeah, my first thought after I posted that was DOH ! and I should have gone back and deleted it but got caught up in something else
  15. Nov 16, 2012 #14
    Regarding the OP: you're right from one point of view and not necessarily right from another :-) If your problem is viewed in the frequency framework, then OK. However, from the Bayesian viewpoint, it may be wrong.

    It's the same thing like the dispute that the sun will rise tomorrow. According to frequentist statistics, it will with probability 1. The Bayesian probability however reserves some little probability it will not.
  16. Nov 16, 2012 #15
    okay, so if we take a frequency approach for now, is the above calculation that resulted in 0.7 correct?

  17. Nov 16, 2012 #16
    I think so. You even don't need the above fractions, the ratio follows directly from 5938/8387. But be careful about its interpretation, especially if you want to talk about probability!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook