Skip to main content

Statistical Modeling

  • Chapter
  • First Online:
Numerical Python

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 to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 2.

    We will see examples of this later in Chapter 15, when we consider regularized regression.

  3. 3.

    See http://vincentarelbundock.github.io/Rdatasets .

  4. 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

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Robert Johansson

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics