Abstract
In the previous chapter, we covered basic statistical concepts and methods. In this chapter we build on the foundation laid out in the previous chapter and explore statistical modeling, which deals with creating models that attempt to explain data. A model can have one or several parameters, and we can use a fitting procedure to find the values of the parameter that best explains the observed data. Once a model has been fitted to data, it can be used to predict the values of new observations, given the values of the independent variables of the model. We can also perform statistical analysis on the data and the fitted model and try to answer questions such as if the model accurately explains the data, which factors in the model are more relevant (predictive) than others, and if there are parameters that do not contribute significantly to the predictive power of the model.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
The statsmodels library originally started as a part of the SciPy stats module but was later moved to a project on its own. The SciPy stats library remains an important dependency for statsmodels.
- 2.
We will see examples of this later in Chapter 15, when we consider regularized regression.
- 3.
- 4.
Logistic regression belongs to the class of model that can be viewed as a generalized linear model, with the logistic transformation as link function, so we could alternatively use sm.GLM or smf.glm.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Robert Johansson
About this chapter
Cite this chapter
Johansson, R. (2019). Statistical Modeling. In: Numerical Python . Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4246-9_14
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4246-9_14
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4245-2
Online ISBN: 978-1-4842-4246-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books