Objects Oriented Programming OOP
Objects Oriented Programming OOP
We represent x0 as 1
In terms of code for crea�ng the value of x0, StatModel uses
the method add constant
Steps 5:
Crea�ng Regression
We can get the predicted value of GPA for any SAT score now by calcula�ng or tracing the value from
the regression line
OLS is the most common method for es�ma�ng linear
regression equa�on,
OLS is the most
common method for
es�ma�ng linear
regression equa�on
Don’t just jump into regression for analysis, Cri�cal thinking is crucial
tools that let you determine factors that affect the outcome of your
predicted outcome.
In the case of GPA score; gender, finance, and marital status may
affect the GPA score of students
Step 2
The variable Rand 1,2,3 we added affected
the value of R-Square and it Adjustable R-
Square. We added information but lost
value.
Out Conclusion about the varable rand 1,2,3 is to drop
that variable.
Tes�ng for significant with F-sta�s�c
In conclusion
If the mean of the normality is not zero then the line is not a
best fi�ng one. In real life, it is usual to violate this part of
assup�ons.
Example Poor man and Rich men spending habity lead to Heteroscedas�city
Step 1
Step 2
Step 3
Step 4
Print out these
data
data.describe()
Step 5
Create Regression mode
The Comparism with the old data give a significant difference
Step 6
Plot Yhat_yes and Yhat_no model
Step 7
Change the color of the student that atended to green and red
for those that did not atend class
Let create a new data frame and organize it in the same way as x
Note: We didn’t get an error as the dimension is already a mul�ple linear regression, Sklearn is design to
work perfectly with arrays.
Print adjusted_r2
Features Selce�on