# Estimate Probability of being in a time interval

​You arrive at a bus stop in an unfamiliar part of town. Assume that buses arrive at the stop with an unknown (to you) distribution and wait in the bus stop for a few ​minutes. The wait time distribution is also unknown (to you). The history of​ bus​ arrival time and wait time in past days is available the bus stop which can be used ​find required distributions. This infomation for each of the previous days is like the following figure where the bus wait intervals in the day is marked with Red:

​Now the question is:

​What is the probability that you can take the bus as soon as you arrive the bus stop ?​​

​Here is additional details. assumptions and clarification:

• ​The log history only include the information for the past and does not include anything like when the next bus will arrive and how long it it will wait in the bus stop. This history information is like this for each bus arrival to the bus stop in the past: Bus arrived at what time (like 30min ago) and waited for how many minutes (like 10min wait)
• There is enough history information recorded to estimate required distributions.
• The distribution of your arrival to the bus stop follows Weibull distribution. i.e. you may arrive at any time to the bus stop based on Weibull distribution and you are interested to know the probability of taking the bus as soon as you arrive the bus stop. This means the bus arrival time to the bus stop should be earlier than yours and it is waiting when you arrive.
• The number of buses that arrive to the bus stop in a day is also unknown and depend to the distribution of bus arrival.
• Bus arrival time and wait time follow independent distributions.

​The simplest form of this problem is like this:

Assuming if your arrival to the bus stop is uniform, not Weibull (thanks for comment), Based on the history information you​ realize that buses arrive to bus stop every 4 hour and wait for 1 hour. The past days schedule is all similar to this picture where the red time-bar indicating the time of the day that bus was waiting in the bus stop and gray time-bar is indicating the time of the day that bus was not in the bus stop.

For this simple variation of the problem I think the question answer is so simple. The probability of taking the bus at a any random time of the day is 6/24= 0.25.

However, it is unclear for me what should I do if bus arrival time and wait time follows different but not the same distributions.

This is not a textbook or course question. I have this issue as part of my research. I have translated this question to well known Bus Stop problem so every body understand it.

• Is this a question from a course or textbook? It certainly sounds like one. Please add the [self-study] tag (you'll have to delete one of your existing tags), & read its wiki. – gung Jan 22 '15 at 22:21
• This is not a textbook or course question. I have this issue as part of my research. I have translated this question to well known Bus Stop problem so every body understand it. – ARH Jan 22 '15 at 22:24
• "The distribution of your arrival to [the] bus stop is unknown but can be anything" is subtly but importantly different from "The distribution of your arrival time is uniform." In the latter case the question can be answered exactly as suggested, but in the former case any answer between $0$ and $1$ is valid. There is not enough information to determine which one. This suggests that putting some effort into characterizing the likely arrival distribution might have some value in your research. – whuber Jan 22 '15 at 22:27
• "Your arrival time to bus stop" in my research is equivalent to "Power Failure Time" which follows Weibull distribution with known parameters. Hope it fixed the issue to understand the problem. I have had a hard time to transform the problem to a general question like this. – ARH Jan 22 '15 at 22:32
• Here's a trivial solution, assuming arrival time is uniform (please explain why this will not work): calculate the mean total time buses spend in this station. Divide this number by 24. This the probability of catching a bus as soon as you arrive. – Yair Daon Jan 23 '15 at 7:32