O que é Regressão Linear?
Linear regression is a fundamental statistical technique used to model the relationship between a dependent variable (often called the response variable) and one or more independent variables (also known as predictors or features). This method assumes a relação linear, meaning that changes in the independent variable(s) result in proportional changes in the dependent variable.
Regressão Linear Simples vs. Múltipla
In its simplest form, linear regression involves one independent variable and is referred to as regressão linear simples. The relationship is expressed mathematically as:
y = β0 + β1x + ε
Aqui, y is the dependent variable, x is the independent variable, β0 represents the y-intercept, β1 represents the slope of the line, and ε é o termo de erro.
Quando há múltiplas variáveis independentes, o método é chamado de regressão linear múltipla, and the equation expands to:
y = β0 + β1×1 + β2×2 + … + βnxn + ε
Aplicações da Regressão Linear
A regressão linear é amplamente utilizada em diversos campos, como economics, biology, engineering, and ciências sociais for tasks like forecasting and determining relationships between variables. It provides insights that can help in decision-making by quantifying how a change in one or more predictors affects the outcome.
Premissas principais
Para que a regressão linear produza resultados válidos, certas premissas devem ser atendidas, incluindo:
- Linearidade: A relação entre as variáveis dependente e independente é linear.
- Independência: As observações são independentes umas das outras.
- Homocedasticidade: Variância constante dos erros em todos os níveis da(s) variável(is) independente(s).
- Normalidade: Os resíduos (erros) do modelo devem ser aproximadamente distribuídos normalmente.
Conclusão
Apesar de sua simplicidade, a regressão linear é uma ferramenta poderosa em análise estatística and machine learning, often serving as a good starting point for more complex modeling.