Add statsmodels to optional dependencies
Some of the documentation uses methods from statsmodels, which isn't included in the optional dependency list.

Fixes #21911.

- [x] closes #xxxx
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
