This paper goes into detail about the most common arrival prediction algorithm– using the published schedule. This algorithm is not perfect, but it is a substantial improvement on the schedule alone:
This scheme was found to systematically underestimate the remaining waiting time by 6.2{8472c33f139a04d7902a1525cca677786370fef6b48c8e38f5cec86fa878d628} on average. The provision of real-time information yields a waiting time estimate that is more than twice closer to the actual waiting times than the timetable is. This difference in waiting time expectations is equivalent to 30{8472c33f139a04d7902a1525cca677786370fef6b48c8e38f5cec86fa878d628} of the average waiting time.
Oded Cats* & Gerasimos Loutos. Real-Time Bus Arrival Information System: An Empirical Evaluation. Journal of Intelligent Transportation Systems, 2015