One objective of this paper is to estimate the parameters p,d,q of an autoregressive fractionally integrated moving average ARFIMA (p,d,q) stochastic model by minimizing the squares of the residuals using a Bayesian global optimization techniques. We consider bilinear model, too because it is the simple extension of linear model, defined by adding a bilinear term to traditional ARMA model. Therefore, the second objective of the paper is to estimate parameters of a bilinear time series.