Complete Easy Notes from All Presentations
SECTION 1: CORRELATION & SIMPLE LINEAR REGRESSION
Correlation means how two variables move together.
If both increase or decrease together it is positive correlation.
If one increases and the other decreases it is negative correlation.
Correlation value ranges from -1 to +1.
Correlation coefficient r formula:
r = Cov(X,Y)/(σxσy)
Regression is used to predict one variable from another.
Equation: Y = β0 + β1X + ε
β0 = intercept, β1 = slope, ε = error.
Assumptions:
Linearity, independence, normal error, constant variance.
Difference:
Correlation only shows relation.
Regression predicts values.
Applications:
Sales prediction, medical prediction, agriculture, social science.
SECTION 2: EXPLORATORY DATA ANALYSIS (EDA)
EDA means exploring data before applying tests.
It helps to find patterns, errors, missing values and structure.
Aims:
Maximize insight.
Find outliers.
Extract important variables.
Develop valid models.
EDA vs CDA:
EDA has no hypothesis.
CDA tests hypothesis.
Steps of EDA:
Ask questions.
Create new variables.
Use graphs.
Handle missing values.
Decide transformations.
Types of Data:
Continuous: height, weight.
Categorical: gender, disease stage.
Summarizing Data:
Frequency tables.
Bar charts.
Histograms.
Boxplots.
Scatterplots.
Histogram shows distribution.
Boxplot shows median and outliers.
Scatterplot shows relationship.
Lattice graphics in R are used for multivariate plots.
Density plots compare distributions.
QQ plot checks normality.
SECTION 3: INTERPOLATION & EXTRAPOLATION
Interpolation finds value between known points.
Extrapolation finds value outside range.
Linear interpolation uses straight line.
Polynomial interpolation uses high degree equation.
Spline interpolation uses many low degree polynomials.
Cubic spline:
Degree 3 polynomial.
Smooth first and second derivatives.
Natural spline means second derivative at boundaries = 0.
Difference between interpolation & approximation:
Interpolation uses given points.
Approximation allows choosing points.
Hunt method:
Used to find correct interval quickly in table.
Starts with random point and hunts then bisects.
Advantages of spline:
More accurate.
Smooth curve.