Book Image

Mastering Python for Data Science

By : Samir Madhavan
Book Image

Mastering Python for Data Science

By: Samir Madhavan

Overview of this book

Table of Contents (19 chapters)
Mastering Python for Data Science
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
7
Estimating the Likelihood of Events
Index

Chapter 6. Performing Predictions with a Linear Regression

Linear regression analysis is the most widely used of all statistical techniques: it is the study of linear, additive relationships between variables. It's widely used in various industries to create models, which will help in a business. For example, in the retail industry, there are various factors affecting the sale of a product. These factors could be the price, promotions, or seasonal factors, to name a few. A linear regression model helps in understanding the influence of each of these factors on the sales of a product as well as to calculate the baseline sales, which is basically the number of sales of this product in the event that there were no external factors, such as price, promotions, and so on.

In the preceding chapter, you were introduced to linear regression along with an example of a simple linear regression. In this chapter, you'll learn how to create the following:

  • A simple linear regression model

  • A multiple linear...