Robots are expected to be operated in environments where they coexist with humans, such as shopping malls and offices. Both the safety and efficiency of a robot are necessary in such environments. To achieve this, pedestrian behaviour should be accurately predicted. However, the behaviour is uncertain and cannot be easily predicted. This paper proposes a probabilistic method of determining pedestrian trajectory based on an estimation of pedestrian behaviour patterns. The proposed method focuses on the specific behaviour of pedestrians around the robot. The proposed model classifies the behaviours of pedestrians into definite patterns. The behaviour patterns, distribution of the positions of the pedestrians, and the direction of each behaviour pattern are determined by learning through observation. The behaviour pattern of a pedestrian can be estimated correctly by a likelihood calculation. A robot decides to move with an emphasis on either safety or efficiency depending on the result of the pattern estimation. If the pedestrian trajectory follows a known behaviour pattern, the robot would move with an emphasis on efficiency because the pedestrian trajectory can be predicted. Otherwise, the robot would move with an emphasis on safety because the behaviour of the pedestrian cannot be predicted. Experimental results show that robots can move efficiently and safely when passing by a pedestrian by applying the proposed method.