A stochastic model of the resistive switching mechanism in bipolar oxide-based resistive random access memory (RRAM) is presented. The distribution of electron occupation probabilities obtained is in agreement with previous work. In particular, a low occupation region is formed near the cathode. Our simulations of the temperature dependence of the electron occupation probability near the anode and the cathode demonstrate a high robustness of the low occupation region. The RESET process in RRAM simulated with our stochastic model is in good agreement with experimental results.