This study investigates the impact of the soil rigidity on the mechanical behaviour for linear and nonlinear pipelines. The work is based on the results of a series of mechanical finite element analyses based on the VanMarcke and artificial neural network (ANN). The numerical model is validated based on the literature. Different simulations have been generated to obtain data response of the pipe based on displacement. The predicted results using ANN are compared with VanMarcke to prove the effectiveness and the importance of the probabilistic analysis. The analysis proves that the variation of the coefficient of subgrade reaction can induce a significant displacement of the pipe. The results prove that ANN serves a major role in the evolution of the real displacement of the pipeline and allows us to obtain more precise and interesting results based on both linear and nonlinear cases.