Transcript link

Metodi Quantitativi per Economia, Finanza
e Management
Lezione n°8
Test F per la verifica di ipotesi sulla
differenza tra medie
Si prende in considerazione la scomposizione della varianza; qui


H0: le medie sono tutte uguali tra loro
H1: esistono almeno due medie diverse tra loro
La statistica test da utilizzare, sotto l’ipotesi H0, si distribuisce
come una F di Fisher con (c-1,n-1) gradi di libertà. Tende a
crescere all’aumentare della varianza tra medie e al
diminuire della variabilità interna alle categorie. Cresce
inoltre all’aumentare dell’ampiezza campionaria.
Test F per la verifica di ipotesi sulla
differenza tra medie
La regione di rifiuto cade nella coda di destra della distribuzione,
cioè è caratterizzata da valori relativamente elevati di F; se
il livello di significatività è 5%, si rifiuta per F> F0,95
0.8
0.7
0.6
0.5
0.4
0.3
0.2
Regione di rifiuto
0.1
0
0
0.7
1.4
2.1
2.8
3.5
4.2
4.9
Test F per la verifica di ipotesi
sulla differenza tra medie
Report
Measures of Association
Produzione artigianale
Età
18-25
26-35
36-50
Over 50
Total
Mean
5.01
5.53
6.00
6.09
5.55
Eta
N
78
55
41
47
221
Std. Deviation
2.224
2.609
2.098
2.320
2.352
Produzione
artigianale * Età
Eta Squared
.191
.036
ANOVA Table
Produzione
artigianale * Età
Between Groups
Within Groups
Total
(Combined)
Sum of
Squares
44.296
1172.356
1216.652
df
3
217
220
Mean Square
14.765
5.403
F
2.733
Sig.
.045
Produzione artigianale
Età
18-25
26-35
36-50
Over 50
Total
Mean
5.01
5.53
6.00
6.09
5.55
N
78
55
41
47
221
Std. Deviation
2.224
2.609
2.098
2.320
2.352
ANOVA Table
Produzione
artigianale * Età
Between Groups
Within Groups
Total
(Combined)
Sum of
Squares
44.296
1172.356
1216.652
df
3
217
220
Mean Square
14.765
5.403
F
2.733
Sig.
.045
Report
Attenzione a bis ogni s pecifici
Età
18-25
26-35
36-50
Over 50
Total
Mean
4.05
4.53
5.00
5.83
4.73
N
78
53
41
47
219
Std. Deviation
2.772
2.791
2.837
8.168
4.536
ANOVA Table
Attenzione a bisogni
s pecifici * Età
Between Groups
Within Groups
Total
(Combined)
Sum of
Squares
97.921
4387.641
4485.562
df
3
215
218
Mean Square
32.640
20.408
F
1.599
Sig.
.191
Univariate Analysis
Nominal
Ordinal
Quantitative
Distribution
X
X
X
Mode
X
X
X
Percentiles
Moments
Shape
X
X
X
X
Bivariate Analysis
Objective
To describe the relationship between two variables
jointly.

qualitative variables: Analysis of Connection

quantitative variables: Analysis of Correlation

mixed variables: Analysis of Variance
Bivariate Analysis
Connection
Correlation
ANOVA
Descriptive
Tools
Contingency
Table
Scatter Plot
Means by
Classes
Descriptive
Indexes
Chi-Square
Kramer's V
Linear
Correlation
Coeffcient
Spearman
Coefficient
Statistical
Test
Chi-Square
test
Null
Hypothesis
Statistical
Indipend.
t-Test
No linear
relation
F-Test
Indipend. by
mean
Modelling
visiting_starbucks(Q25) = 1.299 + .437*starbucks_appeals_atmosphere –
0.281*characteristic_rate_brand + 0.676*socialization factor
+ 0.978*spend_actual


In our interpretation, we cannot make a straightforward connection
between importance of brand of coffee bought for home consumption and
expected frequency of visiting Starbucks. What we can infer is that there is
some negative correlation with brand loyalty. In addition, the variable that
incorporated the rating of the appeal of the atmosphere in Starbucks has
the highest explanatory power of the variability in the dependent variable,
which means that the atmosphere is one of the strong aspects of
Starbucks to be leveraged in the Italian market.
The other two factors that have significant explanatory power are actual
spending per coffee and socialization, which are positively correlated
with expected frequency of visiting Starbucks. The latter means that
people who on average spend more per coffee expect to visit Starbucks
more if given the opportunity, which is logical considering the higher level
of prices there. People that score high on the socialization factor, meaning
they like to sit and spend time with friends while drinking coffee, also
expect higher frequency of visits.
Starbucks can successfully apply its international established image of a
place for meeting friends as a strategy for penetrating the Italian market.
Multivariate Analysis
Objective
To describe the relation between more than two variables
jointly, in terms of:

Analysis of Dependence




Y Quantitative , X Quantitative: Multiple Linear Regression
Y Quantitative , X Qualitative: Conjoint Analysis
Y Qualitative , X Quantitative: Discriminant Analysis
Analysis of Inter-Dependence


Classification, X Quantitative: Cluster Analysis
Reduction of Dimensions, X Quantitative: Factor Analysis
Factor Analysis
12 Assign to each one of the following options a percentage of: Where do you usually use internet? (Sum percentages =100 )
a. Home
b. Work
c. University
0%
13 What do you use internet for?
1
a.
b.
c.
d.
e.
f.
Sources of information
Work
Friendship
Buy and sell
University
Organizing events
Low
2
3
Medium
4 5 6
High
7 8 9
Factor Analysis
Factor Analysis
If the information is spread among many correlated variables:

we may have several different problems.







Apparent information;
Miss- understanding;
Difficulties in the interpretation phase;
Robustness of the results;
Efficiency of the estimates;
Degrees of freedom;
…..
Factor Analysis
The high number and the correlation between variables
lead to analysis problems:
=> it’s necessary to reduce their number, however
making sure not to loose any valuable information.
The Factor Analysis (FA) is a multivariate technique used
to perform the analyses of correlation between
quantitative variables.
Considering a data matrix: X(nxp), with “n” observations
and “p” original variables, the use of the FA allows to
summarize the information within a restricted set of
transformed variables (the so called Factors or
latent factors).
Factor Analysis
We used the Factor Analysis in order to summarize and reduce the different variables
into a lower number trying to loose the least number of information possible.
VARIABLES OF ANALYSIS
•
Reasons that drive you to check facebook?
–
–
–
–
–
–
–
–
Make new friends
Keep in touch with friends
Reconnect with old classmates
Have news about products
Share photos and videos
Curiosity
Discuss interest and hobbies
Plan Parties and events
•
Which features do you use?
–
–
–
–
–
Wall
Photo & Video
Private Messaging
Events Creation
Group Affiliation
Number of starting variables= 13
37
Factor Analysis
Final Factors
48
Analisi fattoriale
Quando le variabili considerate sono numerose spesso
risultano tra loro correlate.
Numerosità e correlazione tra variabili porta a difficoltà di
analisi => ridurre il numero (semplificando l’analisi)
evitando, però, di perdere informazioni rilevanti.
L’Analisi Fattoriale E’ una tecnica statistica multivariata per
l’analisi delle correlazioni esistenti tra variabili
quantitative.
A partire da una matrice di dati nxp con p variabili originarie,
consente di sintetizzare l’informazione in un set ridotto di
variabili trasformate (i fattori latenti).
Analisi fattoriale
Perché sintetizzare mediante l’impiego della tecnica?
Se l’informazione è “dispersa” tra più variabili correlate
tra loro, le singole variabili faticano da sole a
spiegare il fenomeno oggetto di studio, mentre
combinate tra loro risultano molto più esplicative.
Esempio: l’attrattività di una città da cosa è data? Dalle
caratteristiche del contesto, dalla struttura
demografica della popolazione, dalla qualità della
vita, dalla disponibilità di fattori quali capitale, forza
lavoro, know-how, spazi, energia, materie prime,
infrastrutture, ecc.
I fattori latenti sono “concetti” che abbiamo in mente ma
che non possiamo misurare direttamente.
Analisi fattoriale
Le ipotesi del Modello Fattoriale
Variabili Quantitative x1, x2, ......, xi, ......... xp
Info
Var
xi
xi
xi
=
=
=
i = 1, ........., p
k << p
Corr (UFi , UFj) = 0
Corr (CFi , CFj) = 0
Corr (CFi , UFj) = 0
Info condivisa +
Communality +
f(CF1, ....,CFk)
Info specifica
Var specifica
+
UFi
CFi = Common Factori
UFi = Unique Factori
per i ^= j
per i ^= j
per ogni i,j
Analisi fattoriale
Factor Loadings & Factor Score Coefficients
xi
=
li1CF1 + li2CF2 + .... + likCFk + UFi
li1, li2,........,lik
factor loadings
i = 1, ........., p
significato fattori
CFj
=
sj1x1 + sj2x2 + .............. + sjpxp
sj1, sj2,........,sjp
factor score coeff.
j = 1, ....., k << p
costruzione fattori
Analisi fattoriale
Metodo delle Componenti Principali
Uno dei metodi di stima dei coefficienti (i LOADINGS) è il
Metodo delle Componenti Principali.
Utilizzare tale metodo significa ipotizzare che il patrimonio
informativo specifico delle variabili manifeste sia minimo,
mentre sia massimo quello condiviso, spiegabile dai
fattori comuni.
Per la stima dei loadings si ricorre agli autovalori e agli
autovettori della matrice di correlazione R: di fatto i
loadings coincidono con le correlazioni tra le variabili
manifeste e le componenti principali.
Analisi fattoriale
Metodo delle Componenti Principali

I fattori calcolati mediante il metodo delle CP sono
combinazioni lineari delle variabili originarie
CPj = sj1x1 + sj2x2 + .............. + sjpxp

Sono tra loro ortogonali (non correlate)

Complessivamente spiegano la variabilità delle p variabili
originarie

Sono elencate in ordine decrescente rispetto alla variabilità
spiegata
Analisi fattoriale
Metodo delle Componenti Principali
Il numero massimo di componenti principali è pari al numero delle
variabili originarie (p).
La prima componente principale è una combinazione lineare delle p
variabili originarie ed è caratterizzata da varianza più elevata, e
così via fino all’ultima componente, combinazione sempre delle
p variabili originarie, ma a varianza minima.
Se la correlazione tra le p variabili è elevata, un numero k<<p (k
molto inferiore a p )di componenti principali è sufficiente
rappresenta in modo adeguato i dati originari, perché riassume
una quota elevata della varianza totale.