SlideShare a Scribd company logo
1 of 146
Download to read offline
1958
1998
&
𝟐

𝜎2
=
1
𝑛
෍
𝑖=1
𝑛
𝑥𝑖 − 𝜇 2
𝜎 = 𝜎2

𝜎2
= 4
𝜎 = 2
𝜎2
= 0.57
𝜎 = 0.75
𝒙 𝒚 𝒙𝒊 − ഥ
𝒙 𝒚𝒊 − ഥ
𝒚 (𝒙𝒊 − ഥ
𝒙) ⋅ (𝒚𝒊 − ഥ
𝒚)

ഥ
𝒙
ഥ
𝒚
𝑐𝑜𝑣(𝑋, 𝑌) =
σ𝑖=1
𝑛
𝑥𝑖− ҧ
𝑥 ⋅ 𝑦𝑖− ത
𝑦
𝑛
−1 ≤
𝑐𝑜𝑣 𝑥, 𝑦
𝜎𝑥 ⋅ 𝜎𝑦
≤ 1
𝑦𝑖 𝑥𝑖
𝑦𝑖 𝑥𝑖
𝑦𝑖 = 𝛽0 + 𝛽1𝑥i + 𝜖𝑖
𝜷𝟎
𝜷𝟏
ො
𝑦𝑖 = 𝛽0 + 𝛽1𝑥i
𝝐𝒊
ො
𝑦𝑖
𝑦𝑖 ො
𝑦𝑖
𝐚𝐫𝐠 𝒎𝒊𝒏
𝜷𝟎, 𝜷𝟏
෍
𝒊=𝟏
𝒏
𝝐𝒊
𝟐
arg min
𝛽0, 𝛽1
෍
𝑖=1
𝑛
[𝑦𝑖 − (𝛽0 + 𝛽1𝑥𝑖)]2
ො
𝑦𝑖 = 𝛽0 + 𝛽1𝑥𝑖
𝑦𝑖 = ො
𝑦𝑖 + 𝜖𝑖
𝝐𝒊 = 𝒚𝒊 − ෝ
𝒚𝒊
𝜷𝟏 =
𝒄𝒐𝒗 𝒙, 𝒚
𝝈𝒙
𝟐
𝜷𝟎 = ഥ
𝒚 − 𝜷𝟏ഥ
𝒙
⇒
𝒙 𝒚 𝒙𝒊 − ഥ
𝒙 𝒚𝒊 − ഥ
𝒚 (𝒙𝒊 − ഥ
𝒙) ⋅ (𝒚𝒊 − ഥ
𝒚) 𝒙 − ഥ
𝒙 𝟐
ഥ
𝒙 ഥ
𝒚  
𝑟𝑥𝑦 =
−125
246 ⋅ 78
= −0,9 𝛽0 = 22
𝛽1 = −0.71
෍ 𝜖2 = 20.25
ො
𝑦𝑖 = 22 − 0.71 ⋅ 𝑥𝑖
𝛽1 =
𝑐𝑜𝑣 𝑥, 𝑦
𝜎𝑥
=
−125
246
= −0.51
෍ 𝜖2
= 14.48
ො
𝑦𝑖 = 19.1 − 0.51 ⋅ 𝑥𝑖
𝛽0 = ത
𝑦 − 𝛽1 ҧ
𝑥 = 14 + 0.51 ⋅ 10 = 19.1
ෝ
𝒚 = 𝟐𝟓𝟕𝟗𝟐 + 𝟗𝟒𝟓𝟎 ⋅ 𝒀𝒆𝒂𝒓𝒔𝑬𝒙𝒑𝒆𝒓𝒊𝒆𝒏𝒄𝒆
෍
𝑖=1
𝑛
𝑦𝑖 − ത
𝑦 2 ෍
𝑖=1
𝑛
ො
𝑦𝑖 − ത
𝑦 2 ෍
𝑖=1
𝑛
𝑦𝑖 − ො
𝑦 2
𝑅2
𝑹𝟐 𝒓𝟐
0 ≤ 𝑅2
≤ 1
𝑥− ҧ
𝑥
𝜎𝑥
𝛽1
𝛽1
𝛽1 𝛽1 ≠ 0 𝛽1
𝛽1 ≠ 0
𝑯𝟎: 𝛽1 = 0
𝑯𝟏: 𝛽1 ≠ 0
ො
𝑦𝑖 = 𝛽0
ො
𝑦𝑖 = 𝛽0 + 𝛽1𝑋
𝛽𝑖−0
𝑆𝐸(𝛽𝑖)
𝜷𝟎
𝜷𝟏
𝛽𝑖−0
𝑆𝐸(𝛽𝑖)
𝐸𝑆𝑆
𝑅𝑆𝑆
𝑦 = 𝛽0 + 𝛽1𝑥1 + ⋯ + 𝛽𝑝𝑥𝑝 + 𝜖𝑖
ො
𝑦𝑖
𝛽𝑗 𝑥𝑖
𝑯𝟎: 𝛽1 = 𝛽2 = ⋯ = 𝛽𝑝 = 0
𝛽𝑗 ≠ 0
𝑯𝟏: ∃𝑗: 𝛽𝑗≠ 0
ො
𝑦 = 𝛽0
ො
𝑦 = 𝛽0 + 𝛽𝑖𝑋𝑖 + … + 𝛽𝑗𝑋𝑗
≫ 𝐻0
2𝑝
𝟏. 𝟐𝟔𝟕. 𝟔𝟓𝟎. 𝟔𝟎𝟎. 𝟐𝟐𝟖. 𝟐𝟐𝟗. 𝟒𝟎𝟏. 𝟒𝟗𝟔. 𝟕𝟎𝟑. 𝟐𝟎𝟓. 𝟑𝟕𝟔
𝑦 = 𝛽0
෣
𝑝𝑟𝑖𝑐𝑒 = −22.02 + 0.13 ⋅ 𝐻𝑜𝑟𝑠𝑒𝑝𝑜𝑤𝑒𝑟 + 0.22 ⋅ 𝑊ℎ𝑒𝑒𝑙𝑏𝑎𝑠𝑒
𝛽1 ⋅ 𝑥1 𝛽2 ⋅ 𝑥2
𝑦 = 𝛽0 + 𝛽1𝑥1 + ⋯ + 𝛽𝑝𝑥𝑝
෣
𝑝𝑟𝑖𝑐𝑒 = −22.02 + 0.13 ⋅ 𝐻𝑜𝑟𝑠𝑒𝑝𝑜𝑤𝑒𝑟 + 0.22 ⋅ 𝑊ℎ𝑒𝑒𝑙𝑏𝑎𝑠𝑒
𝛽1 ⋅ 𝑥1 𝛽2 ⋅ 𝑥2
𝑥𝑖 = ቊ
1 𝑖𝑓 𝑖 𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑓𝑒𝑚𝑎𝑙𝑒
2 𝑖𝑓 𝑖 𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑚𝑎𝑙𝑒
ො
𝑦𝑖 = ቊ
𝛽0 + 𝛽1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑓𝑒𝑚𝑎𝑙𝑒
𝛽0 + 2𝛽1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑚𝑎𝑙𝑒
𝑥𝑖1 = ቊ
1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑓𝑟𝑖𝑐𝑎𝑛
0 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑛𝑜𝑡 𝑎𝑓𝑟𝑖𝑐𝑎𝑛
ො
𝑦𝑖 = 𝛽0 + 𝛽1𝑥𝑖1 + 𝛽2𝑥𝑖2 = ቐ
𝜷𝟎 + 𝜷𝟏 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑓𝑟𝑖𝑐𝑎𝑛
𝜷𝟎 + 𝜷𝟐 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑠𝑖𝑎𝑡𝑖𝑐
𝜷𝟎 𝑖𝑓 𝑡ℎ𝑒 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑐𝑎𝑢𝑐𝑎𝑠𝑖𝑐
𝑥𝑖2 = ቊ
1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑠𝑖𝑎𝑡𝑖𝑐
0 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑛𝑜𝑡 𝑎𝑠𝑖𝑎𝑡𝑖𝑐
𝑦 = 𝛽0 + 𝛽1𝑥1 + 𝛽2𝑥1
𝑛
+ ⋯ + 𝜖𝑖
𝑝 𝑋 =
𝑒𝛽0+𝛽1𝑋
1 + 𝑒𝛽0+𝛽1𝑋
𝑝 𝑋 =
𝑒𝛽0+𝛽1𝑋1+⋯+𝛽𝑝𝑋𝑝
1 + 𝑒𝛽0+𝛽1𝑋1+⋯+𝛽𝑝𝑋𝑝
መ
𝛿𝑘 𝑥 = 𝑥 ⋅
Ƹ
𝜇𝑘
ො
𝜎2
−
Ƹ
𝜇2
2 ො
𝜎2
+ 𝑙𝑜𝑔( ො
𝜋𝑘)
ෝ
𝝅𝒌
•
•
•
FEW CLUSTERS
No
distinctions
between
observations
Too many distinctions between
observations
TOO MANY CLUSTERS
Find the best balance between
information and homogenity
of data associated to each cluster
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals
Linear Regression & Cluster Analysis Fundamentals

More Related Content

Similar to Linear Regression & Cluster Analysis Fundamentals

SUEC 高中 Adv Maths (Sin and Cos Rule)
SUEC 高中 Adv Maths (Sin and Cos Rule)SUEC 高中 Adv Maths (Sin and Cos Rule)
SUEC 高中 Adv Maths (Sin and Cos Rule)tungwc
 
Cheatsheet - Fórmulas de Física para Física General y Física de Ingenieros
Cheatsheet - Fórmulas de Física para Física General y Física de IngenierosCheatsheet - Fórmulas de Física para Física General y Física de Ingenieros
Cheatsheet - Fórmulas de Física para Física General y Física de IngenierosJose Perez
 
SUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptxSUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptxtungwc
 
SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...
SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...
SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...tungwc
 
SUEC 高中 Adv Maths (2 Roots Part 2)
SUEC 高中 Adv Maths (2 Roots Part 2)SUEC 高中 Adv Maths (2 Roots Part 2)
SUEC 高中 Adv Maths (2 Roots Part 2)tungwc
 
SUEC 高中 Adv Maths (Locus) (Part 1).pptx
SUEC 高中 Adv Maths (Locus) (Part 1).pptxSUEC 高中 Adv Maths (Locus) (Part 1).pptx
SUEC 高中 Adv Maths (Locus) (Part 1).pptxtungwc
 
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersiaPenjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersiabisma samudra
 
Mpc 006 - 02-02 types of correlation
Mpc 006 - 02-02 types of correlationMpc 006 - 02-02 types of correlation
Mpc 006 - 02-02 types of correlationVasant Kothari
 
derivatives part 1.pptx
derivatives part 1.pptxderivatives part 1.pptx
derivatives part 1.pptxKulsumPaleja1
 
Ecuacion diferencial de la forma u=ax+bx+c
Ecuacion diferencial de la forma u=ax+bx+cEcuacion diferencial de la forma u=ax+bx+c
Ecuacion diferencial de la forma u=ax+bx+cEduardo Pila
 
Mpc 006 - 02-01 product moment coefficient of correlation
Mpc 006 - 02-01 product moment coefficient of correlationMpc 006 - 02-01 product moment coefficient of correlation
Mpc 006 - 02-01 product moment coefficient of correlationVasant Kothari
 
Functions of severable variables
Functions of severable variablesFunctions of severable variables
Functions of severable variablesSanthanam Krishnan
 
DERIVATIVES implicit function.pptx
DERIVATIVES implicit function.pptxDERIVATIVES implicit function.pptx
DERIVATIVES implicit function.pptxKulsumPaleja1
 
SUEC 高中 Adv Maths (2 Roots Part 1)
SUEC 高中 Adv Maths (2 Roots Part 1)SUEC 高中 Adv Maths (2 Roots Part 1)
SUEC 高中 Adv Maths (2 Roots Part 1)tungwc
 

Similar to Linear Regression & Cluster Analysis Fundamentals (20)

SUEC 高中 Adv Maths (Sin and Cos Rule)
SUEC 高中 Adv Maths (Sin and Cos Rule)SUEC 高中 Adv Maths (Sin and Cos Rule)
SUEC 高中 Adv Maths (Sin and Cos Rule)
 
P1 tarea3 cevallos_alejandro
P1 tarea3 cevallos_alejandroP1 tarea3 cevallos_alejandro
P1 tarea3 cevallos_alejandro
 
Cheatsheet - Fórmulas de Física para Física General y Física de Ingenieros
Cheatsheet - Fórmulas de Física para Física General y Física de IngenierosCheatsheet - Fórmulas de Física para Física General y Física de Ingenieros
Cheatsheet - Fórmulas de Física para Física General y Física de Ingenieros
 
Taller 1 parcial 3
Taller 1 parcial 3Taller 1 parcial 3
Taller 1 parcial 3
 
SUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptxSUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptx
 
SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...
SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...
SUEC 高中 Adv Maths (Biquadratic Equation, Method of Changing the Variable, Rec...
 
Integral calculus
Integral calculusIntegral calculus
Integral calculus
 
SUEC 高中 Adv Maths (2 Roots Part 2)
SUEC 高中 Adv Maths (2 Roots Part 2)SUEC 高中 Adv Maths (2 Roots Part 2)
SUEC 高中 Adv Maths (2 Roots Part 2)
 
Euler's and picard's
Euler's and picard'sEuler's and picard's
Euler's and picard's
 
SUEC 高中 Adv Maths (Locus) (Part 1).pptx
SUEC 高中 Adv Maths (Locus) (Part 1).pptxSUEC 高中 Adv Maths (Locus) (Part 1).pptx
SUEC 高中 Adv Maths (Locus) (Part 1).pptx
 
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersiaPenjelasan Integral Lipat dua dan Penerapan pada momen inersia
Penjelasan Integral Lipat dua dan Penerapan pada momen inersia
 
Calculo
CalculoCalculo
Calculo
 
Mpc 006 - 02-02 types of correlation
Mpc 006 - 02-02 types of correlationMpc 006 - 02-02 types of correlation
Mpc 006 - 02-02 types of correlation
 
derivatives part 1.pptx
derivatives part 1.pptxderivatives part 1.pptx
derivatives part 1.pptx
 
Ecuacion diferencial de la forma u=ax+bx+c
Ecuacion diferencial de la forma u=ax+bx+cEcuacion diferencial de la forma u=ax+bx+c
Ecuacion diferencial de la forma u=ax+bx+c
 
Mpc 006 - 02-01 product moment coefficient of correlation
Mpc 006 - 02-01 product moment coefficient of correlationMpc 006 - 02-01 product moment coefficient of correlation
Mpc 006 - 02-01 product moment coefficient of correlation
 
Functions of severable variables
Functions of severable variablesFunctions of severable variables
Functions of severable variables
 
Instrumental Variables
Instrumental VariablesInstrumental Variables
Instrumental Variables
 
DERIVATIVES implicit function.pptx
DERIVATIVES implicit function.pptxDERIVATIVES implicit function.pptx
DERIVATIVES implicit function.pptx
 
SUEC 高中 Adv Maths (2 Roots Part 1)
SUEC 高中 Adv Maths (2 Roots Part 1)SUEC 高中 Adv Maths (2 Roots Part 1)
SUEC 高中 Adv Maths (2 Roots Part 1)
 

More from Stefano Dalla Palma

Introduction to Mutation Testing
Introduction to Mutation TestingIntroduction to Mutation Testing
Introduction to Mutation TestingStefano Dalla Palma
 
Introduction to Machine Learning concepts
Introduction to Machine Learning conceptsIntroduction to Machine Learning concepts
Introduction to Machine Learning conceptsStefano Dalla Palma
 
Apache Mahout Architecture Overview
Apache Mahout Architecture OverviewApache Mahout Architecture Overview
Apache Mahout Architecture OverviewStefano Dalla Palma
 
An Empirical Study on Bounded Model Checking
An Empirical Study on Bounded Model CheckingAn Empirical Study on Bounded Model Checking
An Empirical Study on Bounded Model CheckingStefano Dalla Palma
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingStefano Dalla Palma
 
VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...
VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...
VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...Stefano Dalla Palma
 
Detecting controversy in microposts: an approach based on word similarity wit...
Detecting controversy in microposts: an approach based on word similarity wit...Detecting controversy in microposts: an approach based on word similarity wit...
Detecting controversy in microposts: an approach based on word similarity wit...Stefano Dalla Palma
 

More from Stefano Dalla Palma (11)

Design for Testability
Design for TestabilityDesign for Testability
Design for Testability
 
Introduction to Mutation Testing
Introduction to Mutation TestingIntroduction to Mutation Testing
Introduction to Mutation Testing
 
Artificial Neural Networks
Artificial Neural NetworksArtificial Neural Networks
Artificial Neural Networks
 
Decision Tree learning
Decision Tree learningDecision Tree learning
Decision Tree learning
 
Introduction to Machine Learning concepts
Introduction to Machine Learning conceptsIntroduction to Machine Learning concepts
Introduction to Machine Learning concepts
 
Apache Mahout Architecture Overview
Apache Mahout Architecture OverviewApache Mahout Architecture Overview
Apache Mahout Architecture Overview
 
An Empirical Study on Bounded Model Checking
An Empirical Study on Bounded Model CheckingAn Empirical Study on Bounded Model Checking
An Empirical Study on Bounded Model Checking
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional Modelling
 
VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...
VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...
VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assis...
 
Detecting controversy in microposts: an approach based on word similarity wit...
Detecting controversy in microposts: an approach based on word similarity wit...Detecting controversy in microposts: an approach based on word similarity wit...
Detecting controversy in microposts: an approach based on word similarity wit...
 
Prolog in a nutshell
Prolog in a nutshellProlog in a nutshell
Prolog in a nutshell
 

Recently uploaded

VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 

Recently uploaded (20)

VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 

Linear Regression & Cluster Analysis Fundamentals

  • 1.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. &
  • 10.
  • 11.
  • 12.
  • 14.  𝜎2 = 4 𝜎 = 2 𝜎2 = 0.57 𝜎 = 0.75
  • 15.
  • 16. 𝒙 𝒚 𝒙𝒊 − ഥ 𝒙 𝒚𝒊 − ഥ 𝒚 (𝒙𝒊 − ഥ 𝒙) ⋅ (𝒚𝒊 − ഥ 𝒚)  ഥ 𝒙 ഥ 𝒚
  • 17. 𝑐𝑜𝑣(𝑋, 𝑌) = σ𝑖=1 𝑛 𝑥𝑖− ҧ 𝑥 ⋅ 𝑦𝑖− ത 𝑦 𝑛
  • 18.
  • 19. −1 ≤ 𝑐𝑜𝑣 𝑥, 𝑦 𝜎𝑥 ⋅ 𝜎𝑦 ≤ 1
  • 20.
  • 21.
  • 22. 𝑦𝑖 𝑥𝑖 𝑦𝑖 𝑥𝑖 𝑦𝑖 = 𝛽0 + 𝛽1𝑥i + 𝜖𝑖 𝜷𝟎 𝜷𝟏 ො 𝑦𝑖 = 𝛽0 + 𝛽1𝑥i 𝝐𝒊 ො 𝑦𝑖
  • 23.
  • 24.
  • 25.
  • 26. 𝑦𝑖 ො 𝑦𝑖 𝐚𝐫𝐠 𝒎𝒊𝒏 𝜷𝟎, 𝜷𝟏 ෍ 𝒊=𝟏 𝒏 𝝐𝒊 𝟐 arg min 𝛽0, 𝛽1 ෍ 𝑖=1 𝑛 [𝑦𝑖 − (𝛽0 + 𝛽1𝑥𝑖)]2 ො 𝑦𝑖 = 𝛽0 + 𝛽1𝑥𝑖 𝑦𝑖 = ො 𝑦𝑖 + 𝜖𝑖 𝝐𝒊 = 𝒚𝒊 − ෝ 𝒚𝒊 𝜷𝟏 = 𝒄𝒐𝒗 𝒙, 𝒚 𝝈𝒙 𝟐 𝜷𝟎 = ഥ 𝒚 − 𝜷𝟏ഥ 𝒙 ⇒
  • 27. 𝒙 𝒚 𝒙𝒊 − ഥ 𝒙 𝒚𝒊 − ഥ 𝒚 (𝒙𝒊 − ഥ 𝒙) ⋅ (𝒚𝒊 − ഥ 𝒚) 𝒙 − ഥ 𝒙 𝟐 ഥ 𝒙 ഥ 𝒚   𝑟𝑥𝑦 = −125 246 ⋅ 78 = −0,9 𝛽0 = 22 𝛽1 = −0.71 ෍ 𝜖2 = 20.25 ො 𝑦𝑖 = 22 − 0.71 ⋅ 𝑥𝑖 𝛽1 = 𝑐𝑜𝑣 𝑥, 𝑦 𝜎𝑥 = −125 246 = −0.51 ෍ 𝜖2 = 14.48 ො 𝑦𝑖 = 19.1 − 0.51 ⋅ 𝑥𝑖 𝛽0 = ത 𝑦 − 𝛽1 ҧ 𝑥 = 14 + 0.51 ⋅ 10 = 19.1
  • 28. ෝ 𝒚 = 𝟐𝟓𝟕𝟗𝟐 + 𝟗𝟒𝟓𝟎 ⋅ 𝒀𝒆𝒂𝒓𝒔𝑬𝒙𝒑𝒆𝒓𝒊𝒆𝒏𝒄𝒆
  • 29.
  • 30. ෍ 𝑖=1 𝑛 𝑦𝑖 − ത 𝑦 2 ෍ 𝑖=1 𝑛 ො 𝑦𝑖 − ത 𝑦 2 ෍ 𝑖=1 𝑛 𝑦𝑖 − ො 𝑦 2
  • 32.
  • 33.
  • 34.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. 𝛽1 𝛽1 𝛽1 𝛽1 ≠ 0 𝛽1 𝛽1 ≠ 0 𝑯𝟎: 𝛽1 = 0 𝑯𝟏: 𝛽1 ≠ 0 ො 𝑦𝑖 = 𝛽0 ො 𝑦𝑖 = 𝛽0 + 𝛽1𝑋 𝛽𝑖−0 𝑆𝐸(𝛽𝑖)
  • 42.
  • 43. 𝑦 = 𝛽0 + 𝛽1𝑥1 + ⋯ + 𝛽𝑝𝑥𝑝 + 𝜖𝑖 ො 𝑦𝑖 𝛽𝑗 𝑥𝑖
  • 44.
  • 45.
  • 46. 𝑯𝟎: 𝛽1 = 𝛽2 = ⋯ = 𝛽𝑝 = 0 𝛽𝑗 ≠ 0 𝑯𝟏: ∃𝑗: 𝛽𝑗≠ 0 ො 𝑦 = 𝛽0 ො 𝑦 = 𝛽0 + 𝛽𝑖𝑋𝑖 + … + 𝛽𝑗𝑋𝑗 ≫ 𝐻0
  • 47.
  • 48.
  • 49. 2𝑝 𝟏. 𝟐𝟔𝟕. 𝟔𝟓𝟎. 𝟔𝟎𝟎. 𝟐𝟐𝟖. 𝟐𝟐𝟗. 𝟒𝟎𝟏. 𝟒𝟗𝟔. 𝟕𝟎𝟑. 𝟐𝟎𝟓. 𝟑𝟕𝟔
  • 51.
  • 52.
  • 53. ෣ 𝑝𝑟𝑖𝑐𝑒 = −22.02 + 0.13 ⋅ 𝐻𝑜𝑟𝑠𝑒𝑝𝑜𝑤𝑒𝑟 + 0.22 ⋅ 𝑊ℎ𝑒𝑒𝑙𝑏𝑎𝑠𝑒 𝛽1 ⋅ 𝑥1 𝛽2 ⋅ 𝑥2
  • 54. 𝑦 = 𝛽0 + 𝛽1𝑥1 + ⋯ + 𝛽𝑝𝑥𝑝
  • 55. ෣ 𝑝𝑟𝑖𝑐𝑒 = −22.02 + 0.13 ⋅ 𝐻𝑜𝑟𝑠𝑒𝑝𝑜𝑤𝑒𝑟 + 0.22 ⋅ 𝑊ℎ𝑒𝑒𝑙𝑏𝑎𝑠𝑒 𝛽1 ⋅ 𝑥1 𝛽2 ⋅ 𝑥2
  • 56.
  • 57.
  • 58. 𝑥𝑖 = ቊ 1 𝑖𝑓 𝑖 𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑓𝑒𝑚𝑎𝑙𝑒 2 𝑖𝑓 𝑖 𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑚𝑎𝑙𝑒 ො 𝑦𝑖 = ቊ 𝛽0 + 𝛽1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑓𝑒𝑚𝑎𝑙𝑒 𝛽0 + 2𝛽1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑚𝑎𝑙𝑒
  • 59. 𝑥𝑖1 = ቊ 1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑓𝑟𝑖𝑐𝑎𝑛 0 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑛𝑜𝑡 𝑎𝑓𝑟𝑖𝑐𝑎𝑛 ො 𝑦𝑖 = 𝛽0 + 𝛽1𝑥𝑖1 + 𝛽2𝑥𝑖2 = ቐ 𝜷𝟎 + 𝜷𝟏 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑓𝑟𝑖𝑐𝑎𝑛 𝜷𝟎 + 𝜷𝟐 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑠𝑖𝑎𝑡𝑖𝑐 𝜷𝟎 𝑖𝑓 𝑡ℎ𝑒 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑐𝑎𝑢𝑐𝑎𝑠𝑖𝑐 𝑥𝑖2 = ቊ 1 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑎𝑠𝑖𝑎𝑡𝑖𝑐 0 𝑖𝑓 𝑖𝑡ℎ 𝑖𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑖𝑠 𝑛𝑜𝑡 𝑎𝑠𝑖𝑎𝑡𝑖𝑐
  • 60.
  • 61. 𝑦 = 𝛽0 + 𝛽1𝑥1 + 𝛽2𝑥1 𝑛 + ⋯ + 𝜖𝑖
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68. 𝑝 𝑋 = 𝑒𝛽0+𝛽1𝑋 1 + 𝑒𝛽0+𝛽1𝑋
  • 69.
  • 70. 𝑝 𝑋 = 𝑒𝛽0+𝛽1𝑋1+⋯+𝛽𝑝𝑋𝑝 1 + 𝑒𝛽0+𝛽1𝑋1+⋯+𝛽𝑝𝑋𝑝
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89. መ 𝛿𝑘 𝑥 = 𝑥 ⋅ Ƹ 𝜇𝑘 ො 𝜎2 − Ƹ 𝜇2 2 ො 𝜎2 + 𝑙𝑜𝑔( ො 𝜋𝑘) ෝ 𝝅𝒌
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 120. Too many distinctions between observations TOO MANY CLUSTERS
  • 121. Find the best balance between information and homogenity of data associated to each cluster