how easy is it to install a new O2 sensor?

2015 Mazda3
The mechanic I know will do it for $100. I already have the parts. I really hate having to go under my car without a car lift that's why I probably don't even want to try installing it myself.
2014 Mazda3 S GT auto, 2008 MX5 6-speed
Most likely, you will need ramps and a special socket tool that you can borrow from an auto parts store. I've replaced a couple in Hondas and it was fairly easy with the tool and a socket wrench set. Sometimes the upper sensor can be replaced without the use of ramps but doing the lower one in a non-SUV is tough or impossible, depending upon the sensor's location.