12
III. Miszellen Werner Vofi Einige Beispiele zum Computereinsatz in der beschreibenden Statistik 1. Zielsetzung Diese Abhandlung besch~ftigt sich mit der Frage, inwieweit sich Com- puter dazu eignen, die Arbeit mit den Methoden der beschreibenden oder deskriptiven Statistik zu vereinfachen, zu erleichtern und zu verbessern. Dabei ist nicht daran gedacht, traditionelle und bew~ihrte Verfahren ab- zul6sen und zu ersetzen - vielmehr geht es um deren Erg~lnzung, um ihre Effizienz zu steigern und die Arbeit des Statistikers zu erleichtern. Ich will versuchen, dies an einigen illustrativen Beispielen zu demon- strieren, die zum Tell recht einfacher Natur sind, um eine leichte Uber- schaubarkeit zu gew~hrleisten; andererseits abet auch Ausblick geben sollen auf laufende, anspruchsvollere Forschungsarbeiten. Auf diese Weise soil mit dazu beigetragen werden, die Anwendung ]eistungsf~ihi- get Verfahren zu vereinfachen; daneben soll darauf hingewiesen werden, welche Entwicklungstendenzen sich far die statistische Methodenlehre heute als niitzlich erweisen kSnnten. 2. Die beschreibende Statistik Unter "beschreibender Statistik" soll in Anlehnung an gebr~luchliche Be- griffskl~irungen eine Sammlung yon Verfahren und Methoden verstanden werden, die dazu dienen, Massenerscheinungen zu quantifizieren und zu interpretieren. Viele dieser Methoden beziehen sieh auf die Verarbei- tung gro2er Datenkollektive wie beispielsweise: - Gruppierung yon statistischen Daten, - Berechnung yon Vertei]ungsma2zahlen (Mittelwerte, Streuungs:ma2- zahlen etc. ) - Regressions- und Korrelati0nsrechnungen , - Bestimmung yon Zeitreihentrends, - Erstellung grafischer Darstellungen etc. Diese und ~hnliche Aufgabenstellungen, fiber die im einzelnen noch bei den Anwendungsbeispielen gesprochen wird, verursachen oft Rechenope- rationen, die maschinell wesentlich schneller und pr~ziser zu bew~ltigen sind als "per Hand". Der Einsatz yon Rechenanlagen setzt allerdings voraus, daft sich der anwendende Statistiker auch mit den Grundzfigen der Computer-Programmierung vertraut macht. Es scheint deshalb sinnvoll, wenn die Darstellung der Verfahren der deskriptiven Statistik im statistischen Unterricht mit der Vermittlung der notwendigen Pro- grammiertechniken gekoppelt wird, um auf diese Weise den Charakter 181

Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

Embed Size (px)

Citation preview

Page 1: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

III. M i s z e l l e n

W e r n e r Vofi

E in ige B e i s p i e l e zum C o m p u t e r e i n s a t z in d e r b e s c h r e i b e n d e n S t a t i s t i k

1. Z i e l s e t z u n g

D i e s e Abhandlung besch~f t ig t s i ch mi t d e r F r a g e , i nwiewe i t s i ch C o m - p u t e r dazu eignen, d ie A r b e i t m i t den Methoden d e r b e s c h r e i b e n d e n ode r d e s k r i p t i v e n S t a t i s t i k zu v e r e i n f a c h e n , zu e r l e i c h t e r n und zu v e r b e s s e r n . Dabe i i s t n icht d a r a n gedacht , t r a d i t i o n e l l e und bew~ihrte V e r f a h r e n ab- zu l6 sen und zu e r s e t z e n - v i e l m e h r geht es um d e r e n Erg~lnzung, u m i h r e E f f i z i enz zu s t e i g e r n und die A r b e i t des S t a t i s t i k e r s zu e r l e i c h t e r n . Ich wi l l v e r s u c h e n , d i e s an e in igen i l l u s t r a t i v e n B e i s p i e l e n zu d e m o n - s t r i e r e n , die zum T e l l r e c h t e i n f a c h e r Na tu r s ind, u m e ine l e i c h t e U b e r - s c h a u b a r k e i t zu g e w ~ h r l e i s t e n ; a n d e r e r s e i t s a b e t auch A u s b l i c k geben so l l en auf laufende , a n s p r u c h s v o l l e r e F o r s c h u n g s a r b e i t e n . Auf d i e s e W e i s e s o i l m i t dazu b e i g e t r a g e n w e r d e n , die Anwendung ]eis tungsf~ihi- g e t V e r f a h r e n zu v e r e i n f a c h e n ; daneben s o l l d a r a u f h i n g e w i e s e n werden , welche E n t w i c k l u n g s t e n d e n z e n s i ch f a r die s t a t i s t i s c h e M e t h o d e n l e h r e heute a ls n i i tz l ich e r w e i s e n kSnnten.

2. Die b e s c h r e i b e n d e S t a t i s t i k

U n t e r " b e s c h r e i b e n d e r S t a t i s t i k " so l l in Anlehnung an gebr~luchl iche Be- gr i f f sk l~i rungen e ine S a m m l u n g yon V e r f a h r e n und Methoden v e r s t a n d e n werden , die dazu d ienen, M a s s e n e r s c h e i n u n g e n zu q u a n t i f i z i e r e n und zu i n t e r p r e t i e r e n . Vie le d i e s e r Methoden b e z i e h e n s i eh auf die V e r a r b e i - tung g r o 2 e r D a t e n k o l l e k t i v e wie b e i s p i e l s w e i s e :

- G r u p p i e r u n g yon s t a t i s t i s c h e n Daten , - B e r e c h n u n g yon V e r t e i ] u n g s m a 2 z a h l e n ( M i t t e l w e r t e , S t reuungs :ma2-

zah l en e tc . ) - R e g r e s s i o n s - und K o r r e l a t i 0 n s r e c h n u n g e n , - B e s t i m m u n g yon Z e i t r e i h e n t r e n d s , - E r s t e l l u n g g r a f i s c h e r D a r s t e l l u n g e n e tc .

D i e s e und ~hnliche A u f g a b e n s t e l l u n g e n , f iber die i m e i n z e l n e n noch be i den A n w e n d u n g s b e i s p i e l e n g e s p r o c h e n wi rd , v e r u r s a c h e n oft R e c h e n o p e - r a t i o n e n , d ie m a s c h i n e l l w e s e n t l i c h s c h n e l l e r und p r ~ z i s e r zu bew~l t igen s ind a l s " p e r Hand" . D e r E i n s a t z yon R e c h e n a n l a g e n s e t z t a l l e r d i n g s v o r a u s , daft s i ch d e r anwendende S t a t i s t i k e r auch mi t den Grundzf igen d e r C o m p u t e r - P r o g r a m m i e r u n g v e r t r a u t mach t . E s s c h e i n t desha lb s innvo l l , wenn die D a r s t e l l u n g d e r V e r f a h r e n d e r d e s k r i p t i v e n S t a t i s t i k i m s t a t i s t i s c h e n U n t e r r i c h t mi t d e r V e r m i t t l u n g d e r no twend igen P r o - g r a m m i e r t e c h n i k e n gekoppe l t wi rd , u m auf d i e s e W e i s e den C h a r a k t e r

181

Page 2: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

d e r gegense i t i gen E r g ~ n z u n g b e s o n d e r s zu v e r d e u t l i c h e n . Wenn die H e r - s t e l l ung d i e s e s Z u s a m m e n h a n g e s gelungen i s t , ze ig t s ich r a s c h , da~ de r C o m p u t e r e i n s a t z d e m S t a t i s t i k e r die L a s t s c h w i e r i g e r oder ze i t au fwen- d i g e r R e c h e n o p e r a t i o n e n a b n i m m t und ihn s o m i t in die Lage v e r s e t z t , s i ch m e h r den s a c h l o g i s c h e n und a n w e n d u n g s s p e z i f i s c h e n und w e n i g e r den m e t h o d o l o g i s c h e n A s p e k t e n s e i n e r F r a g e s t e l l u n g e n zuzuwenden.

Ein e in faches B e i s p i e l s o l l den w e s e n t l i c h s t e n V o r t e i l d i e s e r A r b e i t s - w e i s e v e r d e u t l i c h e n : V e r s u c h t d e r S t a t i s t i k e r , an eine e m p i r i s c h e Z e i t - r e i h e d e r Bev61kerungsen twick lung e i n e r V o l k s w i r t s c h a f t eine t h e o r e t i - s che T r e n d l i n i e a n z u p a s s e n , so wi rd e r aus Gr i lnden d e r v e r e i n f a c h t e n R e c h e n w e i s e oft auf e inen e infachen , l i n e a r e n T r e n d zu r t l ckg re i f en , ob- wohl e r - yon s a c h l o g i s c h e n 0 b e r l e g u n g e n ausgehend - ehe r u n t e r s t e l l e n muff, da/~ eine W a c h s t u m s f u n k t i o n d e r g e e i g n e t e r e Typ fitr den T r e n d s e in milf~te. Die B e r e c h n u n g e ines d e r a r t i g e n T r e n d s b e r e i t e t a b e r be - t r~[chtl iche S c h w i e r i g k e i t e n , so da/~ man u n t e r Umst~nden die s a c h l o g i - schen Uber l egungen zuguns ten d e r v e r e i n f a c h t e n Be rechnung v e r n a c h - l~lssigt . E r s t d e r E i n s a t z yon R e c h e n a n l a g e n e r m 6 g l i c h t es, u n b e l a s t e t yon Rec .henprob lemen d ie S a c h f r a g e n deu t l i ch in den V o r d e r g r u n d d e r 0 b e r l e g u n g e n zu r t lcken.

Die E r s t e l l u n g und Anwendung yon C o m p u t e r p r o g r a m m e n bedeu te t n icht , da/t ein v i e l l e i c h t u n e r w f l n s c h t e r Hang zu~" t i b e r t r i e b e n e n M a t h e m a t i s i e - rung in die S t a t i s t i k e i n g e b r a c h t wtirde. Die M a t he m a t i k b le ib t nach wie v o r zun~ichst " H i l f s w i s s e n s c h a f t " bzw. I n s t r u m e n t a r i u m d e r S t a t i s t i k , d ie - g e r a d e auch a l s s o z i a l w i s s e n s c h a f t l i c h e D i s z i p l i n - e m p i r i s c h nachpr~tfbare E r f a h r u n g und d e r e n m a t h e m a t i s c h e Behandlung a ls t y p i - s che M e r k m a l e aufweis t (1). Um die F r a g e des i n s t r u m e n t a l e n C h a r a k - t e r s d e r M a t h e m a t i k geht es a b e r be i d i e s e r D i s k u s s i o n e igen t l i ch nicht . V i e l m e h r i n t e r e s s i e r t das P r o b l e m , ob die m a t h e m a t i s c h e Denkungs- we i se , so wie s ie e twa D. H i l b e r t r e p r ~ s e n t i e r t , h i e r Verwendung f in- den kann. Um d i e s e F r a g e i s t e ine s e h r a n s p r u c h s v o l l e D i s k u s s i o n ge- f i lhr t worden, die an d i e s e r S te t l e nicht nachvo l l zogen werden kann (2,). Ihr w i c h t i g s t e s E r g e b n i s i s t d ie F e s t s t e ! l u n g , da~ die M a t h e m a t i k in den S o z i a l w i s s e n s c h a f t e n und d a m i t auch in d e r S t a t i s t i k m e h r a l s nur eine H i l f s w i s s e n s c h a f t geworden i s t , wel l s i e E i n s i c h t e n in komplexe Z u s a m - menh~nge e r m b g l i c h t hat , d ie ohne i h r e Anwendung kaum h~tten gefun- den w e r d e n k6nnen. Ein d e u t l i c h e s B e i s p i e l d~fttr b i e t e t in d e r S t a t i s t i k das P r o b l e m d e r M u l t i k o l i n e a r i t ~ t : Be i d e r U n t e r s uc hung v e r m u t e t e r Zusammenh~inge z w i s c h e n m e h r e r e n s t a t i s t i s c h e n V a r i a b l e n begnfigte man s i ch so lange mi t einfacl~en, f i b e r s c h a u b a r e n und z u m e i s t wegen i h r e r Sch l i ch the i t u n b e f r i e d i g e n d e n E r k l ~ r u n g s v e r s u c h e n , so lange man auf die M a t h e m a t i k v e r z i c h t e t e . E r s t d ie H e r a n z i e h u n g a n s p r u c h s v o l l e - r e r m a t h e m a t i s c h e r V e r f a h r e n hat in v i e l en F~illen zu b r a u c h b a r e n und real i t~i tsn~iheren E r g e b n i s s e n gef t lhr t .

Es wi rd dabe i a b e r n icht f ibe r sehen , da/~ auch die a n s p r u c h s v o l l s t e n V e r - f a h r e n keine b r a u c h b a r e n E r g e b n i s s e b r ingen , wenn die z u g r u n d e l i e g e n - den s t a t i s t i s c h e n Daten nicht den notwendigen qua l i t a t i ve n und quan t i t a - t i ven A n f o r d e r u n g e n genitgen.

182

Page 3: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

Es t r i f f t a l s o nicht zu, daft be i d e r Benutzung m a t h e m a t i s c h e r V e r f a h - ren , bzw. bei d e r Verwendung yon C o m p u t e r n d e r so no twendige R e a l i - t ~ t sbezug v e r l o r e n gehen muff, i n d e m d e r Abs t and z w i s c h e n t h e o r e t i - s c h e m Konzep t und P r a x i s b e z u g v e r g r 6 f t e r t wfirde. E h e r i s t das Gegen- t e l l d e r F a l h Wei l d e r S t a t i s t i k e r yon d e r L a s t s c h w i e r i g e r R e c h e n o p e - r a t i o n e n b e f r e i t w e r d e n kann, i s t e r in d e r Lage , s i ch ve r s t~ i rk t den in- h a l t l i c h e n und p r a x i s b e z o g e n e n A s p e k t e n s e i n e r A r b e i t zuzuwenden - wie m i r s che in t , e ine s e h r begr~i f tenswer te und e r f r e u l i c h e Konsequenz . D a r f i b e r h i n a u s wi rd e r in die Lage v e r s e t z t , Methoden zu e r p r o b e n , d e r e n Anwendung ohne d ie Benutzung yon R e c h e n a n l a g e n undenkba:r w~re . Bedenkt man zudem, daft d ie Ausnu tzung yon R e c h e n a n l a g e n s e h r pr~izise l o g i s c h e Denkvorg~nge be i d e r P r o b l e m a n a l y s e , d e r P r o b l e m s t e l l u n g , d e r E r s t e l l u n g des C o m p u t e r p r o g r a m m s zu r P r o b l e m l 6 s u n g und be i d e r E r g e b n i s i n t e r p r e t a t i o n e r f o r d e r t , so e r k e n n t man, da~ auch u n t e r d i e - sen G e s i c h t s p u n k t e n d e r E i n s a t z yon R e c h e n a n l a g e n d u r c h a u s von Vor - t e l l (ffir den B e n u t z e r , wie ffir d ie zu 16senden P r o b l e m e ) s e in wird .

E s i s t a l s o an d e r Ze i t , in 6 k o n o m e t r i s c h e n und s t a t i s t i s c h e n Lehrbf i - c h e r n d a r a u f zu v e r z i c h t e n , " V e r f a h r e n z u r v e r e i n f a c h t e n Rechnung" anzugeben . S i n n v o l l e r i s t es , S t u d i e r e n d e wie P r a k t i k e r auf die M6g- l i c h k e i t e n h inzuwe i sen , die G r o f t r e c h e n a n l a g e n b ie t en , wenn es d a t u m geht, Rechnungen zu e r l e i c h t e r n , neue V e r f a h r e n zu e r p r o b e n und ge- n e r e l l m 6 g l i c h s t r e a l i t ~ t s n a h zu a r b e i t e n .

3. A n w e n d u n g s b e i s p i e l e

Nach d i e s e n a l l g e m e i n e n , grunds~l tz l ichen Ausf f ih rungen i s t es nun an d e r Ze i t , an e in igen B e i s p i e l e n zu d e m o n s t r i e r e n , we l che M 6 g l i c h k e i - ten d e r C o m p u t e r e i n s a t z in d e r P r a x i s b i e t e t . Gem~i8 d e r T h e m e n s t e l - lung wi l l ich mich dabe i auf P r o b l e m e d e r b e s c h r e i b e n d e n S t a t i s t i k b e - schr~inken - muft d a b e i a b e t be tonen , daft d a m i t n u t e in s e h r eng b e g r e n z - t e r A n w e n d u n g s b e r e i c h a n g e s p r o c h e n wi rd . Aus Grf inden d e r A n s c h a u - l i c h k e i t s o l l e n dabe i zun~chs t e in fache und f i b e r s c h a u b a r e B e i s p i e l e ge- w~ihlt we rden , die schon T e l l u n s e r e s L e h r p r o g r a m m s g e w o r d e n s ind.

a) B e r e c h n u n g c h a r a k t e r i s t i s c h e r MaBzahlen

E ine d e r w i c h t i g s t e n Aufgaben d e r d e s k r i p t i v e n S t a t i s t i k b e s t e h t da r in , e m p i r i s c h e D a t e n k o l l e k t i v e , d ie in F o r m yon H~iu f igke i t sve r t e i lungen v o r l i e g e n , durch z u s a m m e n f a s s e n d e Ma~zah len zu c h a r a k t e r i s i e r e n . U b l i c h e r w e i s e benu tz t man Ma~zah len d e r z e n t r a l e n T e n d e n z und S t r e u - ungsmaf tzah len , wobei e r s t e r e e ine A u s s a g e f iber den D u r c h s c h n i t t s - wer t , l e t z t e r e f iber d ie S t r e u u n g s v e r h ~ l t n i s s e in d e r V e r t e i l u n g e r l a u - ben so l l en .

Das wohl a m h~uf igs ten benutz te Ma~ d e r z e n t r a l e n T e n d e n z i s t da s a r i t h m e t i s c h e Mi t t e l :

A M -

n AM = a r i t h m e t i s c h e s Mi t t e l , xi fi x. = M e r k m a l s w e r t ,

i : l f.1 = K l a s s e n b e s e t z u n g s z a h l .

i i

183

Page 4: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

Als S t reuungsma8 be rechne t man h~iufig die mi t t l e r e quadra t i sche Ab- weichung, die sog. Standardabweichung:

'

. AM)2f. SIGMA = i=l (xi 1 Symbole wie bei AM

fi

Die Berechnungen d i e s e r und ~hnl icher Ma~zahlen, die in e infachen Beisp ie len noch r a s c h pe r Hand durchgeff lhr t werden kbnnen, werden bei gr6fieren Datenkollekt iven seh r zei taufwendig. Es empfiehlt s ich deshalb die E r s t e l l u n g yon U n t e r p r o g r a m m e n , die dann bei Beda r f nu r aufgerufen zu werden brauchen . In der P r o g r a m m i e r s p r a c h e FORTRAN IV ergibt s ich z .B . for die E r r e c h n u n g des a r i t hme t i s chen Mittels fol- gendes einfaches und ku rze s P r o g r a m m :

SUBROUTINE ARMIT (X, N, K, A) DIMENSION X(N}, K(N) S = o . o NEN = o D O 1 I = I , N S = S +X(I) ~K(I ) NEN = NEN + K(I) A = S/FLOAT(NEN) RETURN END

Dieses P r o g r a m m kann unver~nder t i m m e r wieder verwendet werden, wenn aus i rgende inem Datenbes tand ein a r i t h m e t i s c h e s Mittel be rechne t werden sol l (FOr andere Mafizahlen l a s sen sich ~lhnliche P r o g r a m m e fo rmul i e ren ) . Die Rechenze i t l iegt bei wenigen Sekunden.

b) R e g r e s s i o n s - und K o r r e l a t i o n s r e c h n u n g

Wei te re wichtige Anwendungsgebie te de r deskr ip t iven Stat is t ik sind die R e g r e s s i o n s r e c h n u n g , mit de ren Hilfe eine Aussage ilber die Ar t des Z u s a m m e n h a n g e s zwischen m e h r e r e n s t a t i s t i s chen Var iablen gemacht werden soll, und die K o r r e l a t i o n s r e c h n u n g , die fiber die St~lrke d ieses Z u s a m m e n h a n g s Aufschlul~ geben soll. Dazu folgendes Beispiel , wobei ich reich der Anschaul ichkei t ha lber auf zwei Var iablen beschr~,nken will.

Gegeben se ien die folgenden Ausgangsda ten fiber den t agesdu rchschn i t t - l ichen Z i g a r e t t e n v e r b r a u c h yon Ehepaa ren :

Tab. 1: Ausgangsda ten zur R e g r e s s i o n s - und K o r r e l a t i o n s r e c h n u n g

Konsum des Mannes Konsum der F r a u

8, 25 6, 52 10, 22 7, 88

184

Page 5: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

Konsum des Mannes Konsum d e r F r a u 16, 92 10, 12 12, 08 8, 20

9, 23 6, 62 11, 86 7, 92 13, 36 8, 92 15, 11 9, 20

8, 23 6, 10 11, 70 7, 62

Zeichnet man diese W e r t e p a a r e in ein K o o r d i n a t e n s y s t e m ein, so zeigt s ich, da~ zur Cha rak t e r i s i e rung^des Z u s a m m e n h a n g s zwischen beiden Var iab len X und Y eine Gerade Y -- a + bX b e s t i m m t we rden kann. Diese B e s t i m m u n g erfolgt im a l lgemeinen mit de r Methode de r k le ins ten Qua- d ra te . Bei d ies~r Methode werden die P a r a m e t e r a und b de r t heo re t i - schen Geraden Y so bes t immt , da~ die Summe der q u a d r i e r t e n Abwei- chungen zwischen den e m p i r i s c h e n Wer t en Yi und den t h e o r e t i s c h e n W e r - ten Yi m i n i m i e r t wird. Zur Kontro l le de r Gfite der A n p a s s u n g der theo- r e t i s c h e n Funkt ion kann dann als Prf i fgr68e CHI, die Summe de r r e l a - r iven quad r i e r t en Abweichungen zwischen t h e o r e t i s c h e n und e m p i r i s c h e n Wer ten gebildet werden und schl ie~l ich kann der B r a v a i s - P e a r s o n ' sche Kor re l a t i onskoe f f i z i en t r Aufschlu~ fiber die St~irke des Z u s a m m e n h a n g s zwischen X und Y geben. Man ben6tigt a l so die fo lgenden F o r m e l n :

n • ~ xiY i - ~. x i • ~ .y i Ste igung de r R e g r e s s i o n s g e r a d e n : b = 2

n • ~ X i - ( ~.Xi)2

Ordinatenabschnitt der Regressionsgeraden:

a:7-b.

dabei ist ~ der Mittelwert der y-Werte, x der Mittelwert der x-Werte.

Summe de r r e la t iven qua d r i e r t en Abweichungen:

Kor re l a t ionskoe f f i z i en t :

CHI =

n. ~.xiY i - Zx i " ~.Yi r =

(auf den Index i be im Summenze iehen wurde jewei ls ve rz i eh te t )

Zur Durchffihrung der gestellten Aufgabe benStigt man das folgende Pro- gramm, dessen Reehen- und Ausdruekzeit weniger als 40 Sekunden be- tr~igt:

185

Page 6: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

C

C

I

C 99

C

10

11

REGRESSIONS- UND KORRELATIONSRECHNUNG

2

100

101

DIMENSION X(10), Y(10), YT(.10) LX = 10 DO i I = 1, LX READ(S , 99) X(1), Y(1) F O R M A T ( 2 F 6 . 2 )

CALL GERADE(X, Y, LX, A, B) CALL GERADE(Y, X, LX, C, D) R = SQRT(B+D) CHI = o.o DO2 1 = I, LX YT(1) = A+B*X(1) CHI = CHI + (Y(1)-YT(1))**2 / (YT(1)*YT(1)) WRITE(6, I00) A, B, C, D, R: CHI FORMAT(IHI, 6F8.2///) WRITE(6, 101)(X(1), Y(1), YT(1)),I = I, 10) FORMAT(3F 10.2) STOP END

SUBROUTINE GERADE (X, Y, L, A, B) DIMENSION X(L), Y(L)

S1 = P(L,X,Y) $2 = S(L, X) $3 = S(L, Y) $4 = P(L, X, X) $5 = P(L,Y,Y) XL = FLOAT(L) B = (XL*SI - S2*S3)/(XL*S4 - $2-$2) A = S 3 / X L - B ~ S 2 / X L R E T U R N END

REAL FUNCTION P(L, X, Y) DIMENSION X(L), Y(L) P=o.o DO i0 I = I, L P = P + X(1)*Y(I) RETURN END

REAL FUNCTION S(L, X) DIMENSION X(L). S = o . o DO11 I = I ,L S -- S+X(I) RETURN END

186

Page 7: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

Als E r g e b n i s s e e rha l t en wir:

a = 2,8745 b = 0,4309 CHI = 0 ,015 r = 0,97202

c) T rendbe rechnungen

Bis lang wurden nur Beisp ie le be t rach te t , bei denen ein t r ad i t ione l l e s V e r f a h r e n in ein funkt ion ie rendes C o m p u t e r p r o g r a m m zu t iberse tzen war und damit noch nichts e igent l ich Neues b rach te . Das Beisp ie l fiber die R e g r e s s i o n s r e c h n u n g weis t jedoch schon da rauf hin, daft die de- skr ip t ive Stat is t ik auch P r o b l e m s t e l l u n g e n bie te t , die ohne den Compu- t e r e i n s a t z s innvo l l e rwe i se nicht m e h r gel6st werden k6nnen. Als Bei- spiel sei h ie r das P r o b l e m der T r e n d b e r e c h n u n g behandel t , wo an eine e m p i r i s c h e Ze i t r e ihe eine t h e o r e t i s c h e Funkt ion zu r C h a r a k t e r i s i e r u n g l a n g f r i s t i g e r Entwicklungs tendenzen angepa f t werden sol l . Dies kann auch mit der Methode de r k le ins ten Quadra te geschehen , bei de r die Zielfunkt ion - wie oben b e s p r o c h e n - lautet:

n

Z = ~ (Yt- Yt )2 t=l

= min !

B e s t i m m t man aufgrund der e m p i r i s c h e n Ausgangsda ten einen l inearen Trend

A

Yt = a + bt

so u n t e r s c h e i d e t s ich des sen Be rechnungswe i se nicht yon der- oben d a r - ges te l l ten R e g r e s s i o n s r e c h n u n g . Anders dagegen is t zu ve r f ah ren , wenn die In t e rp re t a t i on der zugrunde l iegenden Daten ergibt , daf~ ein l i n e a r e r Trend nicht angebrach t ist . B e t r a c h t e n wir das folgende einfache Bei- spiel :

Gegeben se i die Entwicklung de r ch ines i s chen Bevb lke rungszah l :

Tab. 2: Bevblkerungszahl der VR China

Jahr Bevblkerung in Mill. 1953 588 1954 599 1955 612 1956 620 1957 631 1958 644 1959 657 1960 669 1961 681 1962 695

An diese Daten soll eine Funktion vonder approximiert werden:

A

B t -- a • (I + r) t

folgenden Form als Trend

187

Page 8: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

Dies i s t e ine Wach~tumsfunkt ion mi t den P a r a m e t e r n a und r , die die Bev61kerungszah l B t d e r P e r i o d e t b e s t i m m e n so l l . Zu m i n i m i e r e n i s t a l s o die ZieHunkt ion Z:

n

Z = ~. (B t - a ( l+ r ) t ) 2 = rain ! t= l

D ies i s t e ine Aufgabe, d ie " p e r Hand" n icht m e h r s innvo l l bew~fltigt w e t - den kanm Die " t r a d i t i o n e l l e n " M i n i m i e r u n g s v e r f a h r e n e r m 6 g l i c h e n in d i e s e m F a l l (und in a l l en ~hnl ichen bzw. in a l l en k o m p l i z i e r t e r e n F~ l l e n , yon denen d ie 0 k o n o m e t r i e b e l i e b i g v i e l e zu b i e t en hat) n icht die ge- w~inschte LGsung. Be i so lchen P r o b l e m s t e t l u n g e n k o m m e n de s ha l b heu- r i s t i s c h e S u c h v e r f a h r e n zum Zuge, die in e i n e r F o l g e yon i t e r a t i v e n R e c h e n s c h r i t t e n s i ch dem gesuch ten M i n i m u m j e d e r b e l i e b i g e n Z i e l - funkt ion Z n~hern.

E s gibt v e r s c h i e d e n e A r t e n d i e s e r S u c h p r o g r a m m e . Bei me inen U n t e r - suchungen i m Z u s a m m e n h a n g mi t d e r E r s t e l l u n g e ines m e h r s e k t o r a l e n P r o g n o s e s y s t e m s f(ir die w i r t s c h a f t l i c h e En twick lung d e r V o l k s r e p u b l i k China (3) und danach bei d e r H e r l e i t u n g e ines g e n e r e l l e n O p t i m i e r u n g s - a l g o r i t h m u s haben s ich zwei V e r f a h r e n a l s b e s o n d e r s w e r t v o l l e r w i e s e n :

1) Das R o s e n b r o c k - V e r f a h r e n (4), auf d e m aufbauend w i r das I t e r a t i o n s - p r o g r a m m PAMIRO en twicke l t haben und

2) Das S i m p l e x - V e r f a h r e n nach N e l d e r und Mead (5) (nicht zu v e r w e c h - s e ln mi t dem S i m p l e x a l g o r i t h m u s z u r L6sung l i n e a r e r O p t i m i e r u n g s - p r o b l e m e ) , aus d e m wi r das M i n i m i e r u n g s p r o g r a m m R E F L E X h e r - g e l e i t e t haben.

W i r wol len die F u n k t i o n s w e i s e d i e s e r P r o g r a m m e h i e r n icht e r 6 r t e r n (6). Ihnen i s t g e m e i n s a m , daS s ie in e inem i t e r a t i v e n Suchproze~ die die Funk t ion Z m i n i m i e r e n d e P a r a m e t e r k o m b i n a t i o n l inden.

In u n s e r e m B e i s p i e l geht es a l so d a r u m , die P a r a m e t e r a und r so zu b e s t i m m e n , da~ Z m i n i m i e r t w i rd (es k6nnten nun a b e r auch b e l i e b i g e a n d e r e Z ie l funk t ionen f o r m u l i e r t werden) . Wi r e r r e c h n e n mi t Hi l fe des M i n i m i e r u n g s p r o g r a m m s PAMIRO:

a = 588,072 r = 0 ,01855

Die S u m m e d e r q u a d r i e r t e n Abweichungen Z e r r e i c h t i h r M i n i m um be i Z = 11,405.

B e r e c h n e t m a n m i t den op t ima len P a r a m e t e r w e r t e n t h e o r e t i s c h e BevS1- k e r u n g s w e r t e B t, s t e l l t man a l le Daten t a b e l l a r i s c h und in F o r m e ines g r a f i s c h e n A u s d r u c k s dar , so be t r~g t die g e s a m t e Rechen- und A u s - d r u c k z e i t 1 min 35 sec . Das z u g r u n d e l i e g e n d e P r o g r a m m , be i d e m auch e ine T r e n d p r o g n o s e b i s zum J a h r 1990 durchgef ( ih r t wi rd , s i e h t f o l g e n d e r m a ~ e n aus :

188

Page 9: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

EXTERNAL FUN R E A L ~e 8 B(38), VAR(2) /590. , 0 . 0 2 / , DEL(2), TSW(2), FUNMIN, FUN, VKL, A w 4(38, 3) LOGICAL ~* 1 ZEI(2) /2H ~ o/ INTEGER JAHR (40), T(40)

COMMON B, T

I00

1

11

D O I I = 1,10 READ (5, 100) JAHR(I), B(I) FORMAT (15, F7.2) T(I) = JAHR(I) - 1953 DO 11 I = i , 2 TSW(1) = VAR(I) * 0.01 NN= 2 V K L = 8. D - I ITMAX = 20 IDR = 3 0

C A L L PAMIRO(FUN, FUNMIN, VAR, TSW, NN, VKL, ITMAX, IDR)

95

AA = VAR(1)

R = VAR(2)

JJAHR = 1953 DO 2 I = i , 38 IT = J JAHR- 1953 BB = B(I)

BT = AA ~ (I. + R) w~ IT

WRITE(6, 95) JJAHR, IT, BB, BT

FORMAT(2110, 2 F15.2)

JJAHR = JJAHR + 1

A(I, I) = IT A(I, 2) : BT A(I, 3) = BB C A L L F P L O T ( A , 38, 3 , . F A L S E . , 2, 75, ZEI, o) STOP END

REAL FUNCTION FUN ~ 8 (VAR, N) REAL ~ 8 B(38), VAR(N) INTEGER T(40) COMMON B, T

FUN = o. o

DOS I = 1,10

3 FUN=FUN+DABS(B(I)-(VAR(1)~ ((1. +VAR(2)) ~T(1))))~ 2. RETURN END

Notwendig sind zudem: SUBROUTINE PAMIRO SUBROUTINE F P L O T 1)

l ) s i ehe dazu: W. Voss: Desk r ip t ive Sta t i s t ik p r o g r a m m i e r t . . . . a . a . O . , Anhang.

189

Page 10: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

Es i s t k l a r , dab s ich d e r a r t i g e n M i n i m i e r u n g s p r o g r a m m e n ein s e h r b r e i t e s Bet~lt igungsfeld 6ffnet. I n s b e s o n d e r e kbnnen s i e dazu v e r w e n - det werden , die so wicht igen O p t i m i e r u n g s p r o b l e m e zu 16sen, be i denen e ine Z ie l funk t ion Z zu m i n i m i e r e n i s t , wobei e in v o r g e g e b e n e r Be- schr~ lnkungsraum nicht v e r l a s s e n w e r d e n da r f . L b s u n g s a n s ~ t z e f i i r d e r a r t i g e O p t i m i e r u n g s p r o b l e m e , die in a l l e n w i s s e n s c h a f t l i c h e n Be- r e i c h e n a b e t auch in d e r P r a x i s yon g r 6 ~ t e r Bedeutung s ind, wurden in g r o f e r Zah l en twicke l t . Sie s ind a b e r a l l e auf Spez ia l f f i l l e b e s c h r ~ n k t . E in g e n e r e l l e r A l g o r i t h m u s e x i s t i e r t e b i s l a n g nicht , konnte nun a b e r mi t Hilfe d e r i t e r a t i v e n M i n i m i e r u n g s p r o g r a m m e f o r m u l i e r t we rden . Der W e r t des E i n s a t z e s von G r o B r e c h e n a n l a g e n w i r d h i e r o f fens ich t l i ch .

4. A u s b l i c k

D i e s e wenigen B e i s p i e l e m6gen geniigen, um zu v e r d e u t l i c h e n , welche Anwendungsm6g l i chke i t en s i ch dem E i n s a t z yon G r o B r e c h e n a n l a g e n in d e r P r a x i s d e r b e s c h r e i b e n d e n S t a t i s t i k und d a r i i b e r h i n a u s b i e i en . Na- t l t r l i ch konnten nicht zu a l l en P r o b l e m e n , mi t denen die d e s k r i p t i v e S t a t i s t i k zu tun hat , B e i s p i e l e f o r m u l i e r t werden . So mu~ten aus P l a t z - gr i lnden z . B . a l l e F r a g e n v e r n a c h l f i s s i g t we rden , d ie mi t M a r k t b e o b - achtungen und M a r k t a n a l y s e n zu tun haben (man denke z . B . an die s t a - t i s t i s c h e A u s w e r t u n g yon U m f r a g e e r g e b n i s s e n , an die P r o b l e m e d e r c o m p u t e r g e r e c h t e n Anlage yon F r a g e b 6 g e n usw. ). E b e n f a l l s v611ig aus d e r B e t r a c h t u n g a u s g e s c h l o s s e n wurden a l l e P r o b l e m e d e r B e t r i e b s - s t a t i s t i k , obwohl auch d i e s e u n t e r dem A s p e k t des C o m p u t e r e i n s a t z e s yon z u n e h m e n d e r p r a k t i s c h e r Re levanz s ind. Schl ieBl ich s e i auch noch an die Aufgabens t e l l ungen e r i n n e r t , d ie mi t d e m S t i chwor t d e r "D a t e n - banken" zusammenh~ingen (Aufbau yon I n f o r m a t i o n s s y s t e m e n , o p t i m a l e D a t e n e r f a s s u n g und - b e r e i t s t e l l u n g usw. ). Auch d i e s e k6nnen dem B e - r e i c h d e r d e s k r i p t i v e n S t a t i s t i k z u g e r e c h n e t werden .

T r o t z d i e s e r Besch r~nkung in d e r Auswah l r e l e v a n t e r s t a t i s t i s c h e r F r a - ge s t e l l ungen und d e r Be legung du tch R e c h e n b e i s p i e l e hoffe ich, dab es gelungen i s t , e inen E inb l i ck in e in ige d e r fiir die p r a k t i s c h e s t a t i s t i s c h e A r b e i t i n t e r e s s a n t e n Anwendungsgeb ie te yon R e c h e n a n l a g e n zu v e r m i t - t e ln . Es i s t nun zu sehen, dab ~hnlich g e l a g e r t e P r o b l e m e in Anlehnung an die h i e r d a r g e s t e l l t e n B e i s p i e l e mi t Hilfe des C o m p u t e r e i n s a t z e s ge- 15st w e r d e n k6nnen und dab es m6gl ich i s t , auch w e i t e r f i i h r e n d e und k o m p l i z i e r t e r e F r a g e n e r f o l g r e i c h zu b e a r b e i t e n . W i r s ind de s ha l b zu r Z e i t dabei , f i ir Zwecke d e r d e s k r i p t i v e n S t a t i s t i k e ine P r o g r a m m b i b l i o - thek aufzubauen, die die wich t igs ten V e r f a h r e n d e m i n t e r e s s i e r t e n B e - n u t z e r zu r Anwendung z u r Verf i igung s t e l l t .

L e t z t l i c h geht es d a r u m , e inen B e i t r a g zu l e i s t e n z u r K o r r e k t u r d e r noch v i e l f ach anzu t r e f f enden Meinung, daft d ie Verwendung yon Re c he n - an lagen d u r c h a u s i ibe r f l f i s s ig , v i e l l e i c h t s o g a r ge f~hr l i ch se i . Wi r g lau- ben, das G e g e n t e i l f e s t g e s t e l l t zu haben: Du tch den C o m p u t e r wi rd d e r S t a t i s t i k e r yon z e i t r a u b e n d e n m e c h a n i s c h e n A r b e i t e n e n t l a s t e t und d a r - i tbe rh inaus in die Lage v e r s e t z t , Methoden zu e r p r o b e n , d e r e n Anwen- dung ohne die Benutzung yon Rechenan l agen u n d e n k b a r w~re . B e i d e s fGrde r t die M6gl ichke i t , den i nha l t l i chen A s p e k t e n d e r s t a t i s t i s c h e n

190

Page 11: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

P r o b l e m s t e l l u n g e n m e h r A u f m e r k s a m k e i t als b i s h e r w idmen zu k6nnen - ein Effekt, der f~tr alle Te i lgebie te de r W i r t s c h a f t s - und Soz ia l s t a t i s t ik yon grofiem Nutzen sein k6nnte.

L i t e r a t u r v e r z e i c h n i s

D. Hi lber t : Ax ioma t i s ches Denken, in: Ma themat i sche Annalen, 78, 1918, S, 405 ff.

R. J o e h i m s e n und H. Knobeh Zum Gegenstand und zu r Methodik der Na- t ional6konomie, in: Gegenstand und Methoden der Nat iona l6konomie , H r s g . : R. J o c h i m s e n u n d H . Knobel, K61n 1971, S. 11 f f . ,

L . R . Klein: Die Be i t r~ge der Mathemat ik zu r W i r t s c h a f t s w i s s e n s c h a f t , in: Gegenstand und Methoden . . . . S. 218 ff.

O. Morgens t e r n : Logis t ik und Soz ia lwissenschaf ten , in: Logik de r So- z i a lwis senscha f t en , Hrsg. : E. Topi tsch , 2. Auflage, K61n 1965, S. 315ff.

N e l d e r / M e a d : A s implex method for funct ion min imiza t ion , in: The C o m - pu te r Journa l , Vol. 7 (1965), S. 308-313.

D. Novick: Mathemat ik : Logik, Quantit~t und Methode, in: Gegens tand und Methoden . . . . S. 215 ff.

K . R . Poppe r : P r o g n o s e und Prophe t i e in den Soz ia lwissenschaf t en , in: Logik der Soz ia lwissenschaf ten . . . . , S. 113 ff.

H.H. Rosenbrock : An automat ic method for finding the g r e a t e s t or leas t value of a function, in: The Compu te r Journa l , Vol. 3 (1960).

M. T iede : Theo r i e und P rax i s eines v e r b e s s e r t e n Suchve r f ah rens , in: S ta t i s t i sche Hefte, Heft 1 (1973).

W. Voss : Die wi r t schaf t l i che Entwicklung der Volks repub l ik China, D a r - s te l lung und P r o g n o s e , F r e i b u r g 1970 (Haufe Ver lag) .

W. r o s s : Deskr ip t ive Stat is t ik p r o g r a m m i e r t , Le i t faden ffir E r s t e l l u n g und Anwendung yon C o m p u t e r p r o g r a m m e n (FORTRAN IV), K61n 1972 (Bund Verlag) ,

R. Wagenf~lhr: Stat is t ik leieht gemacht , Band 1: Einf~ihrung in die des- k r ip t ive Stat ist ik, K61n, 6. Auflage, 1971 (Bund Ver lag) .

Anmerkungen

I) R. Joehimsen und H. Knobeh Zum Gegenstand und zur Methodik der National6konomie, in: Gegenstand und IV[ethoden der National- 6konomie, Hrsg°:R. Jochimsen und H. Knobel, K61n 1971, S.

191

Page 12: Einige Beispiele zum Computereinsatz in der beschreibenden Statistik

2)

3)

4)

5)

6)

11 ff., S. 14. R. Jochimsen und H. Knobeh siehe I) O. Morgenstern: Logistik und Sozialwissenschaften, in: Logik der Sozialwissenschaften, Hrsg. :E. Topitsch, 2. Auflage, K61n 1965, S. 315 ff. K.R. Popper: Prognose und Prophetie in den Sozialwissenschaf- ten, in: Logik der Sozialwissenschaften .... S. 113 ff. D. Hilbert: Axiomatisches Denken, in: Mathematische Annalen, 78, 1918, S. 405 ft. D. Novick: Mathematik: Logik, Quantit~it und Methode, in: Ge- genstand und Methoden .... S. 215 ff. L.R. Klein: Die Beitr~Ige der Mathematik zur Wirtschaftswis- senschaft, in: Gegenstand und Methoden .... S. 218 ft. W. Voss: Die wirtschaftliche Entwicklung der Volksrepublik China, Darstellungund Prognose, Haufe-Verlag, Freiburg 1970. H.H. Rosenbrock: An automatic method for finding the greatest or least value of a function, in: The Computer Journal, Vol. 3 (1960). Nelder /Mead: A simplex method for function minimization, in: The Computer Journal, Vol. 7 (1965). Zu PAMIRO siehe W. Voss: Deskript ive Statistik p rog rammie r t , Leitfaden ffir Ers te l lung und Anwendung yon Compute rp rogram- men (FORTRAN IV), Bund-Verlag, K~in 1972, S. 83 ff. Zu REFLEX siehe M. Tiede: Theorie und Praxis eines verhes- serten Suchverfahrens, in: Statistische Hefte, Heft-i (1973).

192