In gasoline engines, the spark timing is often advanced to increase fuel economy under certain heavy load engine operating conditions. As a compromise between the risk of knock and the power output, spark timing is regulated at the boundary where a low knock probability is tolerated. Due to the stochasticity of binary knock events, it is necessary to have a large number of engine cycles for probability estimations, which can slow down the response speed of a controller to operating condition changes. To speed up the spark timing regulation and to reduce the spark timing variance, in this article, a knock probability feedforward map learning method and a spark timing control method are proposed under a unified framework. A learning method that applies the beta distribution is the key contribution of this work. The beta distribution in the map learning part is used to describe knock probabilities with uncertainties and to determine the next engine operating condition for sampling and map learning. In the spark timing method, the beta distribution is applied in the conventional control method to adjust the control gains. The proposed methods are experimentally validated on a test bench equipped with a production Toyota 1.8 L, 4-cylinder SI engine.