3. Quantitative Methods Flashcards

1
Q

Sum of Squared Errors (Definition)

A

Difference between Yi and Ŷ (observation and estimate)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Sum of Squared Regression (Definition)

A

Difference between Ŷ and Mean of Y (regression and best descriptive estimator)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

SSR (#Degrees of Freedom)

A

k (# parameters of X estimated in the regression)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SSE (#Degrees of Freedom)

A

n-k-1 (N - estimators of X - intercept)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SST (#Degrees of Freedom)

A

(n-1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Mean Squared of Regression (Formula)

A

MSR = SSR/k

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Mean Squared of Error (Formula)

A

MSE = SSE/(n-k-1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Squared Error of Estimate (SEE Formula)

A

SSE = √MSE

The lower, the more accurate the model is

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

F Test

A

F = MSR / MSE (testar a diferença entre a regressão em comparação com o erro)

DF @ K numerator (horizontal)
DF @ N-K-1 denominator (vertical)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Regression Assumptions

A
  1. Linearity
  2. Homoscedasticity (var ε same across observations). Muita ou pouca VOL.
  3. Pairs X and Y are independent (if not, there is serial correlation)
  4. a. Residuals are independently distributed
  5. b. Residuals’ distribution is Normal
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

B0 (Intercept Test)

A

T-Test = (B1 est - B1 hipótese) / SB1

One-tail or Two-tails @ df = (n-k-1), as I am using error as a denominator

Sb1 = SEE / Sum of Sqaures of (Obs X - Mean X)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Dummy Variable

A

Y = b0 + b1*Dummy

Dummy = 0 or 1

If Dummy = 0, then Y = b0 = mean

If Dummy = 1, then Y = b0 + b1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Confidence Interval (Formula)

A

Interval = Ŷ ± T-Critical * Sf

Ŷ = Calculate using regression
Sf = Std Error of Forecast =
Sf = SEE² * [1 + 1/n * [(X-Mean)²/(n-1*Sx²)]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

R² (Formula)

A

R² = SSR/SST = Measure of Fit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Regression Types

A
  1. Log-Lin = lnY = b0+b1X1
  2. Log-Log = lnY = b0 + b1*(lnX1)
  3. Lin-Log = Y = b0 + b1*(lnX1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Multiple Regression Assumptions

A
  1. X e Y are linear
  2. IVs (X) are not random
  3. E (ε | X1, X2, Xk) = 0
  4. E (ε²) = Variância e é igual para todas as observações
  5. E (erro1, erro2) = 0, erro não é correlacionado
  6. Erro é distr. ~N
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

F-statistic for Multiple (Hypothesis)

A

H0: B1 = B2 = B3 = 0
H1: At least one ≠ 0

One-Tailed Test @
DF Numerator = K = Horizontal
DF Denominator = (N-K-1) = Vertical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

R² Adjusted (Formula)

A

Adj. R² = 1 - [(n-1)/(n-k-1)] * [1-R²]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Multicolinearity (Definition)

A

B1 e B2 t-tests are not relevant, but F-test is

Reason: Two IVs are highly correlated
Detection: ↑ R² and ↑ F-test, but ↓ B0
Correction: Omit one variable
Consequence: ↑ SE = ↓ F test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Heteroskedasticity (Definition)

A

Var of ε changes across observations

Unconditional: Var (ε) NOT correlated w/ IVs
Conditional: Var (ε) IS correlated w/ IVs

Correction:

  • Robust Std Errors
  • Generalized Least Squares
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Heteroskedasticity (Test)

A

Breusch Pagan Test (OH NO)

H0: NO conditional
H1: Conditional

Test = n * R²*ε @ Chi Squared Table

Regress the error on the IVs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Hansen Method (Definition)

A

Preferred if (i) SC or (ii) SC + Heteroskedasticity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Serial Correlation (Definition)

A
  • Errors are explained by similar reasons
  • ↓ SEE = ↑ F-test
  • Violates Independence of Pairs (X and Y)
  • Se o erro anterior é positivo, chance do erro seguinte ser positivo é de fato mais alta
  • If IV = Y lagged, then B0 will not be valid
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Test for Serial Correlation

A

Durbin Watson (Deutsche Welle)

H0: DW = 2 (No Correl)
H1: DW ≠ 2 (Correl)

Test = 2*(1-r)
DF = K and N items

Correction: (i) Modified SEs,

(ii) Modify Regression Equation
(iii) Include seasonal term

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Hansen or White Method (Criteria)
If only Hetero: White SEs If only SC: Hansen If both: Hansen is preferred
26
Standard Error of Residuals (Formula)
SE Residuals = 1 /√T, where T = # observations
27
Misspecifications of Model (List)
1. Data Mining 2. Functional Form (Linear, Log, Diff Samples) 3. Parsimonious IVs 4. Examine violations before accepting 5. Tested out of sample
28
Logit Regressions
Ln (Odds) = B0 + B1X1 + BnXn + ε Estima a máxima chance de o sample ter acontecido Slope = Chg Log Odds of event happening
29
Odds (Formula)
Odds = p % / (1 - p) ln (p/(1-p)) = b0+b1X1 + ε p = (e^A) / (1 + e^A), onde A = equação
30
Time Series Analysis
Yt = B0 + B1t + εt, where IV is Time Often have Serial Correlation, so test for Durbin Watson
31
AR Model (Concept)
Xt = B0 + B1Xt-1 + ε (AR1) - Regress X in its past values - Se B1 < 1, modelo é mean reverting - Não pode usar DW - Tem que usar t = Autocorrel / (1 /√T)
32
AR (2) Model Structure
AR(2) Model Y(t) = b0 + b1* y(t-1) + b2*y(t-2)
33
Covariance Stationary Model
(a) Mean = fixa (b) Variance = constante (c) Cov(Yt,Yt-s) Todos constantes e finitos
34
Mean Reverting Level (Formula)
Xt = b0 / (1 - b1)
35
Compare 2 models (in terms of forecasting power)
- In-Sample forecasts: Predicted v. Observed - Out of Sample: Use RMSE = √(Soma Act - Forecast)²/ n RMSE = menor melhor
36
Random Walk (Definition)
- X is explained by a sum of errors - AR model where B0 = 0 and B1 = 1, then not mean reverting level - No Mean Reverting - No Cte Variance
37
Random Walk w/ Drift (Definition)
- Intercept is not ZERO (B0 ≠ 0) | - B1 is still 1
38
Seasonality (Definition)
- One of autocorrelation tests for IVs in AR model will be very significative - Correction: include a seasonal lag
39
ARCH Model (Definition)
- It means testing to check if an AR model has conditional heteroskedasticity - Is ε correlated to X1, X2? This is the question
40
ARCH Model (Steps)
1. Regress ε² (Var) on a1 *ε² (t-1) 2. Test for a1 = 0 / a1 ≠ 0 3. H0 is good. H1 means it has Cond. Hetero 4. If it has CH, use Generalized Least Squares
41
Regression using > 1 Time Series (concept)
Y (Time Series #1) = f (X = other Time Series #2)
42
Many Time Series: when can I use?
- If BOTH ARE cov stationary, or | - If BOTH are NOT, but ARE cointegrated (share a common trend)
43
Big Data Learning Types
- Supervised: Labeled Data | - Unsupervised: Data is NOT labeled
44
Big Data Variables (Types)
- Feature (Input) | - Target (Output)
45
Big Data Problem Categories
- Regress (Continuous Target) | - Classification (Categorical / Order)
46
Overfit Problem (Definition)
- Treat noise as parameter
47
Samples Used to Test Model (Types)
1. Training Sample 2. Validation Sample 3. Test Sample
48
Big Data Error (Types)
Bias Error: Underfitting (acertar pouco in-sample) Variance Error: Overfit (acerta d+ in-sample, ruim na hora de generalizar) Base Error: Noise
49
Complexity Problem Solving
1. Reduce Complexity 2. Cross Validation (invert training and validation samples) 3. K-Fold Cross Validation: let (n-1) and test in the last one to avoid sample error
50
Supervised Learning Methods
- CART - K-nearest neighbors - LASSO (elimina IVs + hyperparameter) - Penalized Regression (hyperparemeter) - SVM - Calvin Klein Luan Panisson
51
Unsupervised Learning Methods
- PCA (reduce dimensionality) - Clustering - Neural Networks (desdobra em Deep Learning Nets e Reinforcement Learning)
52
Regress & Classification Methods (which work for both)
- Neural Networks - Deep Learning Nets - Reinforced Learning
53
Regression Methods
Not Linear: - CART - Random Forest - Neural Nets Linear: Regression
54
Classification Methods
Labeled: - Complex: CART, Random Forest - Normal: KNN, SVM Unlabeled: - Complex: Neural Nets - Normal: K-means (# categories known) or Hierarchical Clustering
55
Structured Data Cleasing (Processes)
- Incomplete - Inconsistent - Inaccurate - Invalid - Non-Uniform - Duplicate
56
Unstructured Data Cleasing (Processes)
- Remove HTML tags - Lowercase - Remove stop words - STEM - Lemmarize
57
Big Data Projects Steps
1. Conceptualize 2. Data Collection 3. Data Preparation (Clean, Wrangle) 4. Data Exploration 5. Model Training
58
Stem (Definition)
Data Cleansing: - From all derived to root word - Connection / Connecting -> Connect (root)
59
Lemmatize (Definition)
Data Cleansing: - Remove endings if the base is in a dictionary - More costly and advanced - Takes context / speech to change data
60
Data Processing / Wrangle (Types)
- Structured: Extract, Filter, Aggregate, Convert (Trim, Scale, Normalize) - Unstructured: Tokenize, Bag of Words
61
Tokenization (Definition)
Data Preprocessing: | - Text -> Key words
62
Document Term Matrix (Type)
Rows: Text Words Columns: Words to be Analyzed (token defined previously)
63
Bag of Words (Definition)
- Created after data is cleansed and structured | - Pack of words
64
Data Exploration (Types)
- Structured: - Data Visualize - Feature Selection - Engineering OHE (convert classification into dummy) - Unstructured: - Feature Selection: word counts, frequency, cloud - Engineering: number length, N-gram (multi-word pattern), name entity recognition, part of speech
65
Big Data Properties
1. Variety (↑): Níveis de estrutura 2. Velocity (↑): Latência 3. Volume (↑): Terabytes 4. Veracity (↓): fake news
66
Order of Model Training Table
P (Vertical): 1 / 0 A (Horizontal): 1/0 Lembrar: Paulo Amora ``` H0 = class = 0 Ha = class ≠ 0 (ou seja, 1) ```
67
Precision (Formula)
Precision (→): TP / (TP + FP) | Error #1 is bad
68
Recall / Sensitivity (Formula)
Recall (↓): TP / (TP+FN) Error #2 is bad HIV = Não rejeitar H0, H0 false
69
Accuracy (Formula)
Accuracy = (TP + TN) / (TP + TN + FP + FN) All True / All Possibilities
70
Receiver Operating Characteristic (ROC)
Chart about all POSITIVES (+) X-axis: FPR = FP / (FP + TN exact opposite) Y-axis: TPR = TP / (TP + FN exact opposite) Highest area under chart = better