We extend results by Stotland and Di Ventra on the phenomenon of resistive switching aided by noise. We further the analysis of the mechanism underlying the beneficial role of noise and study the EPIR (Electrical Pulse Induced Resistance) ratio dependence with noise power. In the case of internal noise we find an optimal range where the EPIR ratio is both maximized and independent of the preceding resistive state. However, when external noise is considered no beneficial effect is observed.