Evolutionary game theory assumes that players replicate a highly scored players strategy through genetic inheritance. However, when learning occurs culturally, it is often difficult to recognize someones strategy just by observing the behaviour. In this work, we consider players with memory-one stochastic strategies in the iterated prisoners dilemma, with an assumption that they cannot directly access each others strategy but only observe the actual moves for a certain number of rounds. Based on the observation, the observer has to infer the resident strategy in a Bayesian way and chooses his or her own strategy accordingly. By examining the best-response relations, we argue that players can escape from full defection into a cooperative equilibrium supported by Win-Stay-Lose-Shift in a self-confirming manner, provided that the cost of cooperation is low and the observational learning supplies sufficiently large uncertainty.