2 Beschreibende
Statistik
2.1 Grafische
Darstellung en
Streudiagramm. a
„Funktioniert"
nichtimmer!
0.60 0.64
0.68 0.72
0.76 0.80
0.350.400.450.500.550.600.65
log(Länge)
log(Breite)
0.60 0.64
0.68 0.72
0.76 0.80
0.350.400.450.500.550.600.65
log(Länge)
log(Breite)
DreiDimensionen b :Echtz
eit-Drehung
MehrereV c ariab
lein zwei
Dimensionen:
inkl.Aesthetik:
•
E.T ufte(1983,
1990,1997).
W.Cle
•
veland:
„trellis"-Grafik.
S library(trellis) >
R library(lattice) >
Streudiagramm-Matr d ix.
pairs >
Sepal.Length
4.55.05.56.06.57.07.5 2.02.53.03.54.0
Sepal.Width Petal.Length
1234567
4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0
0.51.01.52.02.5
1 2 3 4 5 6 7
Petal.Width
e
coplot >
2.03.04.0
4.5 5.5 6.5 7.5 4.5
5.5 6.5 7.5 4.5
5.5 6.5 7.5
2.03.04.0
4.5 5.5 6.5 7.5
2.03.04.0
4.5 5.5 6.5 7.5 4.5
5.5 6.5 7.5
Sepal.Length
Sepal.Width
1 2
3 4
5 6
Given : Petal.Length
setosa
versicolor
virginica
Given : Species
2.2 Dynamische
Grafik
Dynamischeg a rafische
Elemente.
Darstellungen„be
•
wegen"
Interaktionen:
•
identifyS >
brush >
Linked b Views
. brushing wirkt
sichin versch.
Fenster naus
2.3 Kennzahlen
Mittelwer a t
= x
1 n n
P x
i=1 (j) i
(empirische) Var
ianz
c var h
(
X
) j
= i
2
s 1 =
− n 1 X
n i=1
(
x
) j i
−
(
x
) j 2
Kov b arianz
d cov h
(j
X ,X
)i
(k)1 =
− n 1 X
n
(
i=1 (x
) j i
−
(j
x )(x
) k () i
−
(k
x )
).
Korrelation
b ρ h
(j
X ,X
)i
(k)d cov = h
(j
X ,X
)i X h
(k)c var i
) (jX h c var p
i
(k).
Mittelwer c t,V
arianz, Kov
arianz, Korrelation
math.einf
− →
acheResultate
aber nichtrob
ust gegenA
usreisser!
Robuste
− →
Methoden,Rg-2d
Rangkorrelation. d
2.4 Matrix-Notation
Daten-Matrix b
= x
(1)
x x
1(2)
..
1.
(m)
x
1
(1)
x x
2(2)
..
2.
(m)
x
2 . . . .
(1)
x x
n(2) n
..
.
(m)
x
n
Sepal-Blätter Länge Nr.
Breite
1 5.1
3.5 4.9 2
3.0 4.7 3
3.2 4.6 4
3.1
Var c iable:
Spalte ,
j
Vektor
(j
x
=
)
(1)
x
1 (1)
x
. . . 2 (1)
x
n
,
(2)
x
=
3.5 3.0 3.2 3.1
Beobachtung:Zeile
i x
=
i
(1)
x
i (2)
x
i
..
.
(m)
x
i
, x
=
34 h 7 . 3.2 i
T
x
=[
i (1)x
,x
i (2),.
i..
(m)
,x ]
i,
T
x
=[4
37 . 3 , 2] .
(Tfür
„transponier t")
Mittelwer d
P
t.x
i (j) i
T
=1
(j
x
, ) T
1
, =[1 1,..., 1]
(j
x
=
) 11
nx
T (j )T
x
1
= 1
nx
T 1=
[1,
41, 1, 1]
5.1
3.5 4.9
3.0 4.7
3.2 4.6
3.1
=[4 , .825
3.2]
Zentrier e teDaten.
x
=
c− x x 1
.
Tx
=
c 5. 1 3.
5 3. 9 4.
0 3. 7 4.
2 3. 6 4.
1
−
1 1 1 1
[4.825, 3.2]
=
5 1 . . 3
5 3. 9 4.
0 3. 7 4.
2 3. 6 4.
1
−
4 825 . . 3
2 3.2 3.2 3.2 4.825 4.825 4.825
=
0.275
0
.3 0 − 0.075
.2 0.125 −
0 .1 0 − 0.225 −
.
Kov f arianz
d cov h
(j
X ,X
)i
(k) 1 − n=
x
1 (j) c
x
T (k) cd cov h
(1)
X
(2)
,X
= i
1 − n
[0.275,
10.075, 0. −
− 125, 0.225]
0.3 − 0 0.2 0.1 −
= 0.03
1 − n
x
1 T cx
c
=
c var
h
(1)
X d cov i
h
(1)
X
(2)
,X i d cov ...
h
(1)
X
(m)
,X
i
(m),X
(2)X h d cov ... i
(2)X h c var i
(1),X
(2)X h d cov
i
. . . . . .. . .
...
d cov h
(
X
) m (1)
,X d cov i
h
(
X
) m (2)
,X i c var ...
h
(
X
) m
i
c var = h i X b =
|
Σ
c var h i X b =
|
Σ
:V arianz- Kov
arianz-Matr ix
|
b Σ
1 − n
=
1
0.275 h 0.075
0 −
− .125
0.225 − 0 0.2 − 0.3
0.1
i 0.275
0.3 − 0.075
0.2 0.125 −
0 . 0 − 225 . 0 −
1
= 0.0492 h
0.0300 0.0300
0.0467 i .
Kov arianzmatr ixist
symmetrisch
var >
b
gh ρ
(
X
) j (
,X
) k
= i b ρ
=
jk| c
Σ
jk jj | c
Σ
q| c
Σ
kk
Korrelationsmatr
− →
ix
cor >
Sepal.Length
1 0.743 Sepal.Width
1 0.178 0.267 Petal.Length
1 0.332 0.233 0.278 Petal.Width
1
Sepal.Length Sepal.Width
Petal.Length Petal.Width
Einfachste h Kov
arianzmatr ix=
Einheitsmatrix
= I
1 ... 0
0 ... 1 0
0
. . .. . .
0 ... 0
1
Var ianzen
=1, unkorrelier
t.
2.5 LineareT
ransformationen undPr
ojektionen
Linearkombinationen a von
Var iablen.
BeispielIr is:
log(Blattfläche)= Konstante +log(Länge)
+log(Breite)
„For m"=log(Breite)
-log(Länge)
= Y + a
b X
1+
(1)b X
2oder (2)
y
=
i+ a b x
1 (1) ib + x
2 (2) i.
y
=
i+ a
T
b x
i
3
y
− = 0.1+
[1, 1]
4.7 h . 3 2 i
=7
.8
Mittelwer b tv
on
?
Y
= y + a
1 n
X b
ix
1 (1) ib + x
2 (2) ia =
1
+
n
b
1
X x
i (1) ib +
2
X x
i (2) ia = + b
1 1 n
X x
i (1)+
ib
1 2 n
X x
i (2) ia = b +
x
1+
(1)b x
2=
(2)+ a
T
b
x
Var c ianzv
on
?
Y
c var h i Y
1 − n
=
1
X (y
i−
i) y
2
1 − n
=
1
X
i
+ a
1
b
(1)
x +
i 2b
(2)
x
−
ia ( b +
x
1+
(1) 2b
(2)
x )
2
1 − n
=
1
X
i
b (
1 (1)x
−
i (1)x
b )+
(x
2 (2)−
i (2)x
)
2
1 − n
=
1
2
b
1
X (
i (1)x
−
i (1)x
2
) b +2
b
1 2X (x
i (1) i−
(1)
x
(2)
)(x
−
i (2)x
)
b +
2 2
X (
i (2)x
−
i (2)x
2
)
b =
2 1
c var h
(1)
X +2 i b
b
1d cov
2h
(1)
X
(2)
,X + i
2
b c var
2h
(2)
X i
= b [ ,b
1]
2c var h
(1)
X d cov i
h
(1)
X
(2)
X
i i
(2)X h c var i
(2)X
(1)X h d cov
b h
1
b
2
i b =
b
T|
Σ
b
Projektion d Cosinus-Satz fürein
bel.Dreiec k:
Skalarprodukt
T
b x
=Seitenlänge i
Seitenlänge
×
cos(Zw.wink
×
el)
T
b x
=
ik kk b x k
ih cos b,x i
i,
k
(k c
:Länge desV
ektors
=W
c
urzel
k
ausk c p =
T
c
)
c
b
1i
x
1
e x
i
i
ib,x h ∠
HH HH HH HH
HH HH
B B B B B B B B B
b
1i
x
1
e x
i
i
ib,x h ∠
HH HH HH HH
HH HH
B B B B B B B B B
e x
=„Projektion" i
von
x
aufRichtung i
von
b
Länge
k x k
ih cos b,x i
ib = x
T/
ik k b
Wähle so,dass
b k
k b
.Dann
=1
ist
y
=
i Tb
x
=Längen i
derProjektionen der
x
auf i
.
b
Für
=2 m
:
= b cos h
h i β
h sin
i β
i
LineareT e ransf
ormation.
= Y + a
B
= X
− h 0 0.1 i + 1 h
1 1 −
1 i X
Mittelwer f ts-Vektor
= y + a
B
.
x
Var ianzen
der
(k
Y
:er )
ledigt.K ovar ianz?
d cov h
(1)
Y
(2)
,Y
= i
T
b
|
Σ
1b
. 2
c var h i Y B =
c var h i X
T
B
= 1 h
1 1 −
1 0 ih
0492 . . 0
0300 0.0467 0.0300
1 ih
1 1 − 1
i
= 0 h
.0208
0.0128 .0128 0
0.0751 i .
T
B
transponier teMatr
ix .
B
Herleitung g eleganter:
= y a 1
+
T TxB
=
1 1 1 1
[a, 0]+
5.1
3.5 9 . 4
. 3
0 3.2 3.1 4.7 4.6
h
− 1
1 1 1
i
T
y
1
= 1
ny
T 1=
1
n1
T Ta
1
+ 1
nxB
T=
T 1 n Tna
x + B
T T= y + a
B x
=
− h 0
.1 0
i + 1 h
1 1 −
1 4.825 ih
3.2 i
= 7.925 − h
1.625 i .
c
y y =
1 −
T
y a =1
+
T TxB
1( −
T
a x +
B
T)=
Tx ( 1 −
T
x B )
T
x = B
c Tc var h i Y
1 − n
= y
1 T cy
=
c 1 − nBx
1 T cx B
c=
Tc var B h i X
T
B
muss
B
nichtquadr atischsein.
Spezialfall
= B
T
b
Zwei h Transf
ormationen.
∗
Y a =
+
∗∗
B X,
∗∗
Y a =
+
∗∗∗∗
B
∗
Y
∗∗
Y a =
+
∗∗∗∗
B
∗
a B +
B
∗∗X
∗e a = B +
X e
c var h
∗∗
Y
= i
∗∗
B c var h
∗
Y B i
∗∗
=
T∗∗
B
∗
B c var h i X
∗
B B
T∗∗
T
B = c var e h i X e B .
TMansieht:
e B
=(
T∗∗
B
∗
B
T
) B =
T ∗
∗∗
B
wieaus T
Lin.Alg.bekannt.
DieIdentität. i Transf ormation,
diegar nichtsv
erändert?
= X
0 0
. . .
0
+
1 ... 0
0 ... 1 0
0
. . .. . .
0 ... 0
1
(1)
X
(2)
X
. . .
(m)
X
=0 I +
X.
Rücktr j ansfor
mation,in verse Matrix.
= X
−
B (Y
1− )= a
"
2
1 1 −
2 2
1
21
#
(1)
Y
(2)
Y h − a 0 i ,
−
B
Inverse 1
von ,
B
−
B B
1I =
Inverse kannes
nur zuquadr
atischenMatr izen
geben,
abernicht allequadr
atischenMatr izen
habeneine Inverse
.
reguläre
− →
oder inver tierbare
Matriz envs . singuläre
Standardisierung. k Univar iateStatistik:
Stichprobestandardisieren,
z
=(
ix
−
i)/ x b σ
.
Multivar iat:
gegeben,
x
− →
,
x
|
b Σ
Gesuchtlineare Transf
ormation zu
,so
z
dass
=0 z c var
undh i Z I =
.
=0 z
einfach zuerreichen:
z
=
ix
−
i.
x
c var
Fürh i Z I =
brauchen wirein
Resultatder lin.Alg.:
|
b Σ
istsymmetr ischund
positivsemidefinit
⇔
T
b
|
b Σ
≥ b
fürbel.
0
.
b
Satz:Es gibt
,so
B
dass
T
BB b =
|
Σ
–sogar viele!
∞
Cholesky-Zerlegung liefer
teine davon,
eineDreiec ksmatrix
= B 0 h 222 .
0 0.168 0.135
i
0.222 h
0 0.168 0.135
0.222 ih
0.135 0
0.168 i
= 0.0492 h 0.
0300 0. 0.0300
0467 i .
Setze
= z (x C
b µ) −
,
= C
−
B
,und 1
prüfe!
z
=
i(x C
−
i− x)=
C + x C x
i
= z (x C
x)= − 0
c var h i Z C =
|
b ΣC
=
TCB
T
B
T
C CC =
1 −
C (
1 − T
)
T
C I =
.
Zielerreicht!
...falls inver
C
tierbarist
b ⇔
|
Σ
nichtsingulär
= C 4.51 h
0 5.94 3.62 −
i z ,
x = C
c=
T 0.153
1.781 − 1.063
1.188 0.564 −
0 0.594 − 0.652 −
Rotation,or l thogonaleT
ransf ormation.
Drehungen und Spiegelungen
lassen
dieLängen von
Strecken unddie
„For men"v
onFiguren unveränder
t.
Drehungenum denNullpunkt
ohneoder mitSpiegelung
anv ert.
Achse:
= B cos h h i β sin −
h
i i β β h cos i β h sin
i
resp.
=
− h h cos
i β h sin
i β β h cos i β h sin
i i
−2
−1 0
1 2
3 4
5 6
7
01234
Transf m ormation
rückgängig machen!Drehung
−
um.
β i β h− sin − i β h− cos h
h− sin i β h− cos
i β i
= cos h
h i β h sin
i β β h cos i β h sin −
i i B =
.
TT
B B =
1 −
,oder
T
B
= B I .
Auch fürSpiegelungen.
„orthogonale
− →
Matriz en"und
Transf ormationen.
Längenv onV ektoren
k y k
i=
2 Ty y
i=
i Tx
B
iB
Tx
=
i Tx
I
ix
=
i Tx
x
i=
ik x k
i.
2Anmerkung.
Drehungenmit Verschieb
ungebenso .
*
n Lösungenvon
= BB
|
b Σ
?
Wenn
B
eineLösung c
ist,dann auch
B B
cmitor o
thog.
B
,denn o
B B
c(
oB B
c)
o=
TB B
cB
o T o TB
=
cB IB
c T cB = B
c T cb =
|
Σ
.
Umgekehr t:Zw eiLösungen
unterscheidensich immerum
eineor thog.Mx.
Anschaulich:Standardisier teDaten
mitor thogonalerMatr
ixtr ansfor
mieren
bleiben
− →
standardisiert.
(Standardis.-T .,dann orthogonale)
=wieder eineStandardis
.-T.
Basis-Transf o ormation.
StattDrehung allerPunkte
um Drehungdes
β
Koordinatenkreuz
−
esumβ
beideV orstellungenführen
zuden gleichen„neuen
Koordinaten"
y
. i
2.6 Projektion
Pursuit
Grundidee a .
Explorativ em ultivar
iateStatistik sollinteressante
Strukturen
inden Datenfinden.
Werden evtl.
sichtbarbei geeigneterV
eränderung desK
oordinatensystems
Suchenach
„Richtungenim Raum",die
interessanteStr ukurenz
eigen.
Manuelle b Suche.
InteressanteProjektionen c mit
numer ischerOptimier
ung eines
„Interessantheits-Masses"einer Projektion,
Projektionsindex
Q
*
dh Q + a i by
Q = h i y
Genaueressiehe Block
Mu-2b.
Merkpunkte BeschreibendeStatistik
Grafische
•
Methodener laubenauch
dieDarstellung
von mehrerenV
ariab lenmit
Symbolen,F arben,etc.
Dynamischeund
•
interaktiv eGr
afikbietet zusätxlicheMöglichk
eiten.
WichtigsteK
•
ennzahlen:Mittelw ertsv
ektorund Kov
arianzmatr ix;
Korrelationsmatr ix
LineareT
•
ransf ormation
führtzu einfachen
Regeln:
= y + a
B
,
x c var
h i Y B =
c var h i X
T
B
.
Standardisierung:
• z
=
i(x C
−
i,
x)
= C
−
B
, 1 T
BB
b =
|
Σ
Orthogonale Transf
ormation (resp.Matr
ix):
T
BB I =
Basis-Transf ormation
äquivalent zu(nicht-sing.)
linearerT .