Ambiguity of query terms has been a long-standing problem in information retrieval field, which becomes more serious in Web searching. A method for automatic query expansion based on query logs obtained from users?daily usage is suggested. This model establishes probabilistic relationship between terms in documents and in user queries through statistical learning from the log, and selects high-related expansion terms based on Bayesian theory. These expansion terms are added into the original query to formulate a new one in order to improve the effectiveness of retrieval. Experimental results show that this technique is more adaptive to Web searching, and can improve the precision of document retrieval markedly compared with conventional ones.