2025-02-07

Introduction

  • A technique in statsictics to predict outcomes or unknown values based on independent variable.

  • The indepedent variable or predictor is the the input

  • The dependent variable is the unknown value that is dependent on the indepedent variable

  • It is a simple mathematical model that is easy to interpret.

  • It is used in various applications and industries to predict outcomes

Pratical Applications

  • Circuit Analysis

  • Stock Market

  • Disease Control

  • Machine learning and Artifical Intelligence

Math Theory

  • Simple Regression is another word for linear regression

  • The mathematical formula \(y=mx+b\), \(m\) is the slope and \(b\) is the y-intercept of the line

  • Another version of the formula is \(y = b0 + b1*x + e\) \(b0\) is the intercept of the line \(b1\) is the slope of the line \(e\) is the error term or residual erros

Circuit Analysis: First Formula Model

Problem: Find the resistance(R) by using current(I) and voltage(V) values

Using the formula \(y= mx+ b\) , m = slope and b = y-intercept

voltage current
5 1
10 2
15 3
20 4
25 5
30 6

Voltage vs Current Plot

\(m = slope = \frac{\Delta V}{\Delta I} = 5\)

Circuit Analysis: Second Formula Model

Using the formula \(y=b0+b1*x + e\)

voltage current
1.0 1
1.2 3
1.3 4
5.1 5

Second Formula Model: Scatter Plot

Using the second technique, we try to find a model for the data.

Correlation of variables

  • Correlation coefficient measures the relationship between the two variables: strong or weak association

  • Compute the correlation for the voltage and current

I = \(\frac{1}{R}\) * E + 0

I = y, \(\frac{1}{R}\) = b1 , E = b1

cor(resistance$voltage, resistance$current)
## [1] 0.9392853

Find y-intercept

  • Find the y-intercept
model <- lm(current ~ voltage,  data=resistance)
model
## 
## Call:
## lm(formula = current ~ voltage, data = resistance)
## 
## Coefficients:
## (Intercept)      voltage  
##      2.9684       0.5761

The model equation is \(I = 2.9684 + b1 *0.5781\)

Graph model equation

## `geom_smooth()` using formula = 'y ~ x'

Conclusion

  • Simple Regression or linear regression is a simple mathematical model that can be used to predict outcomes in various industries.

  • It is widely used in engineering disciplinces such as electrical engineering to find relationships between current and voltage and AC, alternate current, applications.

  • It is a powerful math technqiue that desrves more recognition

Sources