midterm review Flashcards
Define Simple Linear Regression
A dependent variable (ex. Y) is predicted from one independent variable (ex. X) based on a linear relationship
Define Regression
The relation/dependency of & between 2 variables
SLR equation
y = a + βx
Define Residuals
The differences between the real data & the line
Goal with SSR
To find THE line that minimizes the SSR
Define Stock “Beta”
Beta is a risk measure of stock investment, calculated as the coefficient of the market return
When |β| > 1…
Stock is riskier & its returns have greater volatility (change unpredictable)
When |β| < 1…
Stock is less risky & its returns swing less than market returns
Monthly return formula
Monthly return = (Current month-end price - Last month-end price)/Last month-end price
Basic set-up for lm() function
regression_analysis_result_name <- lm(Y ~ X, data)
How to calculate SD manually
- (y-µ)^2
- square all results from step 1 + divide by count
How to manually calculate Q1 & Q3
- split dataset into 2 halves
- find the median of each half
How to find IQR
Q3-Q1
How to calculate Lower & Upper Whisker
LW = Q1 - 1.5IQR
UW = Q3 + 1.5IQR
How to calculate Extreme Lower & Upper Whisker
eLW = Q1 - 3IQR
eUW = Q3 + 3IQR