The linear regression model

365 Data Science · Beginner ·📐 ML Fundamentals ·8y ago

Key Takeaways

Introduces linear regression models for predicting continuous outcomes

Full Transcript

hi it is time for the actual introduction of regressions let's start with some dry Theory a linear regression is a linear approximation of a causal relationship between two or more variables regressions models are highly valuable as they are one of the most common ways to make inferences and predictions the process goes like this you get sample data come up with a model that explains the data and then make predictions for the whole population based on the model you have developed there is a dependent variable labeled y being predicted and an independent variable labeled X1 X2 and so forth these are the predictors Y is a function of the X variables and the regression model is a linear approximation of this function the easiest regression model is the simple linear regression Y is equal to Beta 0 + beta 1 * x + Epsilon let's see what these values mean Y is the variable we are trying to predict and is called the dependent variable X is the independent variable when using regression analysis we want to predict the value of y provided we have the value of x but to have a regression Y Must depend on X in some causal way Whenever there is a change in X such change must translate into a change in y think about the following equation the income a person receives depends on the number of years of education that person has received the dependent variable is income while the independent variable is the years of education there is a causal relationship between the two the more education you get the higher income you are likely to receive this relationship is so trivial that it is probably the reason you are watching this course right now you want to get a higher income so you are increasing your education now let's pause for a second and think about the reverse relationship what if education depends on income this would mean the higher your income the more years you spend educating yourself putting High tuition fees aside wealthier individuals don't spend more years in school and high school and college take the same number of years no matter your tax bracket therefore a causal relationship like this one is faulty if not plain wrong hence it is unfit for regression analysis let's go back to the original example income is a function of Education the more years you study the higher income you will receive this sounds about right all right what we haven't mentioned so far is that in our model there are coefficients beta 1 is the coefficient that stands before the independent variable it quantifies the effect of education on income if beta 1 is 50 then for each additional year of Education your income would grow by 50 $50 in the USA the number is much bigger somewhere around $3 to $5,000 so for each additional year you spend on education your yearly income is expected to rise by $3 to $5,000 and that's not considering higher education or tailored courses like this one the other two components are the constant beta0 and the error Epsilon in this example you can think of the constant beta zero as the minimum wage no matter your education if you have a job you will get the minimum wage this is a guaranteed amount so if you never went to school and plug in an education value of zero years in the formula the regression will predict that your income will be the minimum wage makes sense right the last term is Epsilon this represents the error of estimation the error is the actual difference between the observed income and the income the regression predicted on average across all observations the error is zero if you earn more than what the regression has predicted then someone earns less than what the regression has predicted everything evens out all right the original formula was written with Greek letters what does this tell us it was the population formula but we know statistics is all about sample data in practice we use the linear regression equation equation it is simply y Hat = B 0 + B1 * X you heard it right the Y here is referred to as y hat whenever we have a hat symbol it is an estimated or a predicted value B 0 is the estimate of the regression constant beta 0 while B1 is the estimate of beta 1 and X is the sample data for the independent variable for more videos like this one please subscribe

Original Description

🥳Access all 365 Data Science courses 100% for free — November 6–21! ➡ https://bit.ly/43aatiY 👉🏻 Download Our Free Data Science Career Guide: https://bit.ly/2PShWNt It is time for the actual introduction of regressions! Let's start with some dry theory. A linear regression is a linear approximation of a causal relationship between two or more variables. Regressions models are highly valuable as they are one of the most common ways to make inferences and predictions. The process goes like this: you get sample data, come up with a model that explains the data and then make predictions for the whole population based on the model you have developed. There is a dependent variable labeled Y being predicted and an independent variable labeled x1 x2 and so forth these are the predictors Y is a function of the X variables and the regression model is a linear approximation of this function. The easiest regression model is the simple linear regression y is equal to beta 0 plus beta 1 times X plus Epsilon. Let's see what these values mean. Y is the variable we are trying to predict and is called the dependent. Variable X is the independent variable. When using regression analysis we want to predict the value of y provided. We have the value of x but to have a regression Y must depend on X in some causal way. Whenever there is a change in X such change must translate into a change in Y. ► Consider hitting the SUBSCRIBE button if you LIKE the content: https://www.youtube.com/c/365DataScience?sub_confirmation=1 ► VISIT our website: https://bit.ly/365ds 🤝 Connect with us LinkedIn: https://www.linkedin.com/company/365datascience/ 365 Data Science is an online educational career website that offers the incredible opportunity to find your way into the data science world no matter your previous knowledge and experience. We have prepared numerous courses that suit the needs of aspiring BI analysts, Data analysts and Data scientists. We at 365 Data Science are committe
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from 365 Data Science · 365 Data Science · 11 of 60

1 Population vs Sample
Population vs Sample
365 Data Science
2 Data Science & Statistics: Levels of measurement
Data Science & Statistics: Levels of measurement
365 Data Science
3 Statistics Tutorials: Mean, median and mode
Statistics Tutorials: Mean, median and mode
365 Data Science
4 Skewness
Skewness
365 Data Science
5 What is a distribution?
What is a distribution?
365 Data Science
6 The Normal Distribution
The Normal Distribution
365 Data Science
7 Central limit theorem
Central limit theorem
365 Data Science
8 Student's T Distribution
Student's T Distribution
365 Data Science
9 Type I error vs Type II error
Type I error vs Type II error
365 Data Science
10 Hypothesis testing. Null vs alternative
Hypothesis testing. Null vs alternative
365 Data Science
The linear regression model
The linear regression model
365 Data Science
12 Simple linear regression model. Geometrical representation
Simple linear regression model. Geometrical representation
365 Data Science
13 INDEX and MATCH application of the two functions separately and combined [Advanced Excel]
INDEX and MATCH application of the two functions separately and combined [Advanced Excel]
365 Data Science
14 INDIRECT Excel Function: How it works and when to use it [Advanced Excel]
INDIRECT Excel Function: How it works and when to use it [Advanced Excel]
365 Data Science
15 VLOOKUP and MATCH another useful functions combination [Advanced Excel]
VLOOKUP and MATCH another useful functions combination [Advanced Excel]
365 Data Science
16 VLOOKUP COLUMN and ROW - Handle large data tables with ease [Advanced Excel]
VLOOKUP COLUMN and ROW - Handle large data tables with ease [Advanced Excel]
365 Data Science
17 The ELIF keyword [Python Fundamentals]
The ELIF keyword [Python Fundamentals]
365 Data Science
18 Working with Tuples in Python
Working with Tuples in Python
365 Data Science
19 Database Terminology - A Beginners Guide
Database Terminology - A Beginners Guide
365 Data Science
20 Relational Database Essentials
Relational Database Essentials
365 Data Science
21 Database vs Spreadsheet - Advantages and Disadvantages
Database vs Spreadsheet - Advantages and Disadvantages
365 Data Science
22 Conditional Statements and Loops
Conditional Statements and Loops
365 Data Science
23 Backpropagation – The Math Behind Optimization
Backpropagation – The Math Behind Optimization
365 Data Science
24 Monte Carlo: Forecasting Stock Prices Part I
Monte Carlo: Forecasting Stock Prices Part I
365 Data Science
25 Monte Carlo: Forecasting Stock Prices Part II
Monte Carlo: Forecasting Stock Prices Part II
365 Data Science
26 Monte Carlo: Forecasting Stock Prices Part III
Monte Carlo: Forecasting Stock Prices Part III
365 Data Science
27 365 Data Science Online Program
365 Data Science Online Program
365 Data Science
28 Data frames - Creating a data frame
Data frames - Creating a data frame
365 Data Science
29 Data Science & Statistics: Slicing a matrix in R
Data Science & Statistics: Slicing a matrix in R
365 Data Science
30 Data frames in R - Exporting data in R
Data frames in R - Exporting data in R
365 Data Science
31 Data frames in R - Transforming data PART II
Data frames in R - Transforming data PART II
365 Data Science
32 Data Frames in R - Subsetting a data frame
Data Frames in R - Subsetting a data frame
365 Data Science
33 Data Science & Statistics: Matrix arithmetic in R
Data Science & Statistics: Matrix arithmetic in R
365 Data Science
34 Data Science & Statistics: Indexing an element from a matrix
Data Science & Statistics: Indexing an element from a matrix
365 Data Science
35 Data Frames in R - Extending a data frame
Data Frames in R - Extending a data frame
365 Data Science
36 Data Science & Statistics: Creating a matrix in R FASTER
Data Science & Statistics: Creating a matrix in R FASTER
365 Data Science
37 Data Science & Statistics: Creating a Matrix in R
Data Science & Statistics: Creating a Matrix in R
365 Data Science
38 Data frames - Importing data in R
Data frames - Importing data in R
365 Data Science
39 Data frames in R - Getting a sense of your data
Data frames in R - Getting a sense of your data
365 Data Science
40 Data frames in R - Transforming data PART I
Data frames in R - Transforming data PART I
365 Data Science
41 Data frames in R - Import a CSV in R
Data frames in R - Import a CSV in R
365 Data Science
42 Data Science & Statistics: Matrix operations in R
Data Science & Statistics: Matrix operations in R
365 Data Science
43 Data Science & Statistics: Matrix recycling in R
Data Science & Statistics: Matrix recycling in R
365 Data Science
44 Tableau vs Excel: When to use Tableau and when to use Excel
Tableau vs Excel: When to use Tableau and when to use Excel
365 Data Science
45 Download Tableau: Learn how to download Tableau Public
Download Tableau: Learn how to download Tableau Public
365 Data Science
46 Connecting data sources: Useful tips when connecting data sources to Tableau
Connecting data sources: Useful tips when connecting data sources to Tableau
365 Data Science
47 The Tableau interface: See how to navigate through the Tableau interface
The Tableau interface: See how to navigate through the Tableau interface
365 Data Science
48 Tableau data visualization: Create your first Tableau visualization!
Tableau data visualization: Create your first Tableau visualization!
365 Data Science
49 Duplicating sheets: This is how to duplicate a sheet in Tableau
Duplicating sheets: This is how to duplicate a sheet in Tableau
365 Data Science
50 Build a table in Tableau: The steps needed to create a simple table in Tableau
Build a table in Tableau: The steps needed to create a simple table in Tableau
365 Data Science
51 Custom fields in Tableau: Using Tableau operators to create custom fields
Custom fields in Tableau: Using Tableau operators to create custom fields
365 Data Science
52 Custom fields in Tableau: Add calculations to tables through custom fields
Custom fields in Tableau: Add calculations to tables through custom fields
365 Data Science
53 Totals in Tableau: Learn how to display subtotals and totals in Tableau
Totals in Tableau: Learn how to display subtotals and totals in Tableau
365 Data Science
54 Gross Margin calculation in Tableau
Gross Margin calculation in Tableau
365 Data Science
55 What is a filter in Tableau: Set up a filter in Tableau to specify the data you want to show
What is a filter in Tableau: Set up a filter in Tableau to specify the data you want to show
365 Data Science
56 Joins in Tableau: Inner, outer, left, or a right join in Tableau
Joins in Tableau: Inner, outer, left, or a right join in Tableau
365 Data Science
57 Building a Tableau dashboard: Three types of charts you want to have in a Tableau dashboard
Building a Tableau dashboard: Three types of charts you want to have in a Tableau dashboard
365 Data Science
58 Creating great looking charts in Tableau: Real life Exercise on charts in Tableau
Creating great looking charts in Tableau: Real life Exercise on charts in Tableau
365 Data Science
59 Joins in Tableau: Choose the correct join type
Joins in Tableau: Choose the correct join type
365 Data Science
60 How to make a data check in Tableau: A quick data check is better than no data check
How to make a data check in Tableau: A quick data check is better than no data check
365 Data Science

Related AI Lessons

10 Python Concepts You Must Know Before Calling Yourself Advanced
Learn 10 essential Python concepts to take your skills to the advanced level and stand out as a developer
Medium · AI
10 Python Concepts You Must Know Before Calling Yourself Advanced
Learn 10 crucial Python concepts to elevate your skills from intermediate to advanced and become a proficient developer
Medium · Data Science
10 Python Concepts You Must Know Before Calling Yourself Advanced
Learn 10 essential Python concepts to take your skills to the advanced level and stand out as a developer
Medium · Programming
10 Python Concepts You Must Know Before Calling Yourself Advanced
Learn 10 essential Python concepts to take your skills to the advanced level and separate yourself from beginner developers
Medium · Python
Up next
Is Python Dead in 2026?| Truth About Python in AI Era | 90 Days Roadmap @FameWorldEducationalHub
FAME WORLD EDUCATIONAL HUB
Watch →