When dealing with a suspected sensor problem, don't replace ANYTHING until
you're sure you've pinpointed the problem. In other words, don't jump to
conclusions and assume a particular sensor is bad just because you found a
fault code for the sensor circuit. The only thing a fault code tells you
is that a fault has occurred in a circuit. It might be the sensor or it
might be a wiring or connector problem. There's no way to know until you've
done additional testing.
To track down the problem, check for fault codes, then follow the step-by-step diagnostic procedure in the corresponding diagnostic chart to isolate the fault by a process of elimination. You may also need more information than the year, make, model and engine size to find the correct replacement. Because of differences in emission calibrations, you may also have to refer to the vehicle's VIN number and/or the original equipment part number on the old sensor.
On applications where manual "flash codes" are not provided to read fault codes, a scan tool must be used to access the onboard computer's memory. Diagnosing sensor problems may also require a digital multimeter and a breakout box to perform wiring circuit checks.
If there is no fault code or you're dealing with an intermittent problem, try watching the various sensor's outputs on an oscilloscope. A scope can show intermittent glitches that occur so briefly that they won't show up on a digital volt meter or scan tool.
Another technique that can help you pinpoint sensor problems more quickly is to use a tool that generates simulated sensor signals. If the system responds correctly when a simulated signal is substituted for the real thing, then the problem is a bad sensor. No change means the problem is either in the wiring or something else.